Error you must define at least one round robin archive

This issue has been migrated from Redmine: https://dev.icinga.com/issues/11471 Created by peter_m on 2016-03-29 15:04:48 +00:00 Assignee: vkhatri Status: Assigned Target Version: (none) Last Update...

This issue has been migrated from Redmine: https://dev.icinga.com/issues/11471

Created by peter_m on 2016-03-29 15:04:48 +00:00

Assignee: vkhatri
Status: Assigned
Target Version: (none)
Last Update: 2016-04-17 07:48:52 +00:00 (in Redmine)


Ubuntu 14.04 using the latest commit (e5c8e6e) of the chef-icinga2 cookbook.

I set pnp=true and the icinga2::server_pnp recipe runs successfully.

attributes/default.rb

default['icinga2']['version'] = '2.4.4-1'
default['icinga2']['classic_ui']['enable'] = true
default['icinga2']['classic_ui']['version'] = '2.4.4-1'
default['icinga2']['pnp'] = true

The services are all running and can be restarted successfully.

root@icinga2-host:~# service icinga2 status
 * icinga2 is running
root@icinga2-host:~# service apache2 status
 * apache2 is running
root@icinga2-host:~# service rrdcached status
rrdcached (7867) is running.
root@icinga2-host:~# service npcd status
 * Checking status of Nagios Performance C Daemon (PNP4Nagios) npcd                                                                             [ OK ]

The following config files exist:

root@icinga2-host:~# ls -la /etc/pnp4nagios/
total 120
drwxr-xr-x  5 nagios nagios  4096 Mar 29 14:28 .
drwxr-xr-x 99 root   root    4096 Mar 29 14:28 ..
-rw-r--r--  1 nagios nagios 29383 Mar 29 14:28 background.pdf
drwxr-xr-x  2 nagios nagios  4096 Mar 29 14:28 check_commands
drwxr-xr-x  2 nagios nagios  4096 Mar 29 14:28 config.d
-rw-r--r--  1 nagios nagios  9570 Mar 29 14:28 config_local.php
-rw-r--r--  1 nagios nagios  9558 Mar 29 14:28 config.php
-rw-r--r--  1 nagios nagios  9570 Mar 29 14:28 config.php.0.6.24
-rw-r--r--  1 nagios nagios  1350 Mar 29 14:28 misccommands.cfg-sample
-rw-r--r--  1 nagios nagios  1682 Mar 29 14:28 nagios.cfg-sample
-rw-r--r--  1 nagios nagios  4186 Mar 29 14:28 npcd.cfg
drwxr-xr-x  2 nagios nagios  4096 Mar 29 14:28 pages
-rw-r--r--  1 nagios nagios   522 Mar 29 14:28 pnp4nagios_release
-rw-r--r--  1 nagios nagios  2523 Mar 29 14:28 process_perfdata.cfg
-rw-r--r--  1 nagios nagios   676 Mar 29 14:28 rra.cfg
-rw-r--r--  1 nagios nagios   651 Mar 29 14:28 rra.cfg-sample

I see the recurring error «RRDs::create ERROR you must define at least one Round Robin Archive» in /var/log/pnp4nagios/perfdata.log:

2016-03-29 14:29:18 [7963] [0] RRDs::create /var/rrdtool/cache/3tw-icinga2-berkshelf/_HOST_.rrd  DS:1:GAUGE:8460:U:U DS:2:GAUGE:8460:U:U --start=1459261782 --step=60
2016-03-29 14:29:18 [7963] [0] RRDs::create ERROR you must define at least one Round Robin Archive
2016-03-29 14:29:18 [7963] [0] RRDs::create /var/rrdtool/cache/.pnp-internal/runtime_runtime.rrd  DS:1:GAUGE:8460:U:U --start=1459261728 --step=60
2016-03-29 14:29:18 [7963] [0] RRDs::create ERROR you must define at least one Round Robin Archive
2016-03-29 14:29:18 [7963] [0] RRDs::create /var/rrdtool/cache/.pnp-internal/runtime_rows.rrd  DS:1:GAUGE:8460:U:U --start=1459261728 --step=60
2016-03-29 14:29:18 [7963] [0] RRDs::create ERROR you must define at least one Round Robin Archive
2016-03-29 14:29:18 [7963] [0] RRDs::create /var/rrdtool/cache/.pnp-internal/runtime_errors.rrd  DS:1:GAUGE:8460:U:U --start=1459261728 --step=60
2016-03-29 14:29:18 [7963] [0] RRDs::create ERROR you must define at least one Round Robin Archive
2016-03-29 14:29:18 [7963] [0] RRDs::create /var/rrdtool/cache/.pnp-internal/runtime_invalid.rrd  DS:1:GAUGE:8460:U:U --start=1459261728 --step=60
2016-03-29 14:29:18 [7963] [0] RRDs::create ERROR you must define at least one Round Robin Archive
2016-03-29 14:29:18 [7963] [0] RRDs::create /var/rrdtool/cache/.pnp-internal/runtime_skipped.rrd  DS:1:GAUGE:8460:U:U --start=1459261728 --step=60
2016-03-29 14:29:18 [7963] [0] RRDs::create ERROR you must define at least one Round Robin Archive
2016-03-29 14:29:18 [7963] [0] RRDs::create /var/rrdtool/cache/.pnp-internal/runtime_update.rrd  DS:1:GAUGE:8460:U:U --start=1459261728 --step=60
2016-03-29 14:29:18 [7963] [0] RRDs::create ERROR you must define at least one Round Robin Archive
2016-03-29 14:29:18 [7963] [0] RRDs::create /var/rrdtool/cache/.pnp-internal/runtime_create.rrd  DS:1:GAUGE:8460:U:U --start=1459261728 --step=60
2016-03-29 14:29:18 [7963] [0] RRDs::create ERROR you must define at least one Round Robin Archive
2016-03-29 14:29:18 [7962] [0] RRDs::create /var/rrdtool/cache/3tw-icinga2-berkshelf/ping6.rrd  DS:1:GAUGE:8460:U:U DS:2:GAUGE:8460:U:U --start=1459261721 --step=60
2016-03-29 14:29:18 [7962] [0] RRDs::create ERROR you must define at least one Round Robin Archive
2016-03-29 14:29:18 [7962] [0] RRDs::create /var/rrdtool/cache/3tw-icinga2-berkshelf/http.rrd  DS:1:GAUGE:8460:U:U DS:2:GAUGE:8460:U:U --start=1459261725 --step=60
2016-03-29 14:29:18 [7962] [0] RRDs::create ERROR you must define at least one Round Robin Archive
2016-03-29 14:29:18 [7962] [0] RRDs::create /var/rrdtool/cache/3tw-icinga2-berkshelf/icinga.rrd  DS:1:GAUGE:8460:U:U DS:2:GAUGE:8460:U:U DS:3:GAUGE:8460:U:U DS:4:GAUGE:8460:U:U DS:5:GAUGE:8460:U:U DS:6:GAUGE:8460:U:U DS:7:GAUGE:8460:U:U DS:8:GAUGE:8460:U:U DS:9:GAUGE:8460:U:U DS:10:GAUGE:8460:U:U DS:11:GAUGE:8460:U:U DS:12:GAUGE:8460:U:U DS:13:GAUGE:8460:U:U DS:14:GAUGE:8460:U:U DS:15:GAUGE:8460:U:U DS:16:GAUGE:8460:U:U DS:17:GAUGE:8460:U:U DS:18:GAUGE:8460:U:U DS:19:GAUGE:8460:U:U DS:20:GAUGE:8460:U:U DS:21:GAUGE:8460:U:U DS:22:GAUGE:8460:U:U DS:23:GAUGE:8460:U:U DS:24:GAUGE:8460:U:U DS:25:GAUGE:8460:U:U DS:26:GAUGE:8460:U:U DS:27:GAUGE:8460:U:U DS:28:GAUGE:8460:U:U DS:29:GAUGE:8460:U:U DS:30:GAUGE:8460:U:U DS:31:GAUGE:8460:U:U DS:32:GAUGE:8460:U:U DS:33:GAUGE:8460:U:U DS:34:GAUGE:8460:U:U DS:35:GAUGE:8460:U:U DS:36:GAUGE:8460:U:U DS:37:GAUGE:8460:U:U DS:38:GAUGE:8460:U:U DS:39:GAUGE:8460:U:U --start=1459261725 --step=60
2016-03-29 14:29:18 [7962] [0] RRDs::create ERROR you must define at least one Round Robin Archive
2016-03-29 14:29:18 [7962] [0] RRDs::create /var/rrdtool/cache/3tw-icinga2-berkshelf/load.rrd  DS:1:GAUGE:8460:U:U DS:2:GAUGE:8460:U:U DS:3:GAUGE:8460:U:U --start=1459261728 --step=60

The /var/spool/icinga2/perfdata folder is empty.

I only see xml files in the cache folder:

root@icinga2-host:~# ls -la /var/rrdtool/cache/icinga2-host/
total 88
drwxrwxr-x 2 nagios nagios  4096 Mar 29 14:46 .
drwxr-xr-x 4 nagios nagios  4096 Mar 29 14:29 ..
-rw-rw-r-- 1 nagios nagios  2630 Mar 29 14:46 apt.xml
-rw-rw-r-- 1 nagios nagios  1971 Mar 29 14:44 disk__.xml
-rw-rw-r-- 1 nagios nagios  4980 Mar 29 14:46 disk.xml
-rw-rw-r-- 1 nagios nagios  2577 Mar 29 14:45 _HOST_.xml
-rw-rw-r-- 1 nagios nagios  2588 Mar 29 14:46 http.xml
-rw-rw-r-- 1 nagios nagios 27973 Mar 29 14:46 icinga.xml
-rw-rw-r-- 1 nagios nagios  3300 Mar 29 14:45 load.xml
-rw-rw-r-- 1 nagios nagios  2649 Mar 29 14:46 ping4.xml
-rw-rw-r-- 1 nagios nagios  2649 Mar 29 14:45 ping6.xml
-rw-rw-r-- 1 nagios nagios  1948 Mar 29 14:44 procs.xml
-rw-rw-r-- 1 nagios nagios  1974 Mar 29 14:46 ssh.xml
-rw-rw-r-- 1 nagios nagios  1950 Mar 29 14:46 swap.xml
-rw-rw-r-- 1 nagios nagios  1934 Mar 29 14:46 users.xml

I tried to use the verify_pnp_config tool but have not been able to find the correct config file to pass to it so I always get the same error (I have tried process_perfdata.cfg, rra.cfg and npcd.cfg):

root@icinga2-host:/usr/local/pnp4nagios# wget http://verify.pnp4nagios.org/verify_pnp_config
root@icinga2-host:/usr/local/pnp4nagios# perl verify_pnp_config --mode npcdmod --config=/etc/pnp4nagios/npcd.cfg --pnpcfg=/etc/pnp4nagios/
[INFO]  ========== Starting Environment Checks ============
[INFO]  My version is: verify_pnp_config-0.6.25-R.40
[INFO]  Start Options: verify_pnp_config --mode npcdmod --config=/etc/pnp4nagios/npcd.cfg --pnpcfg=/etc/pnp4nagios/
[INFO]  Reading /etc/pnp4nagios/npcd.cfg
[INFO]  Can´t determine product while reading /etc/pnp4nagios/npcd.cfg
[CRIT]  /etc/pnp4nagios/npcd.cfg does not look like a valid config file

How should I continue to troubleshoot this?

Thanks!

Moderators: Developers, Moderators

shraga

Posts: 3
Joined: Sun Apr 13, 2003 4:52 pm

CANNOT FIND DATA SOURCE

Hello,

for some reason I am getting this error and the rra is empty.
The permissions are fine and the cacti user is the owner.

however when I try to run the command manually i.e:
/usr/local/bin/rrdtool create <cacti installation>/rra/ping_uunet_phi.rrd

ERROR: you must define at least one Round Robin Archive

when I tried to run the cron job manually I received
# php<cacti installation>/cmd.php > /dev/null 2 > & 1
Ambiguous output redirect.

any ideas

thanks in advance

shraga

wmelick

Posts: 34
Joined: Fri Apr 11, 2003 4:11 pm
Location: Wilmington, Delaware

Spaces

Post

by wmelick » Mon Apr 14, 2003 4:31 pm

I think I see some spaces in your output redirect….try /dev/null 2>&1 (no spaces except before the 2)

Also, it can take a full poll interval (time between running cmd.php as defined in your crontab) before the RRD data sources will be created…..that is unless you run the cmd.php manually in which case it should be created right away.

shraga

Posts: 3
Joined: Sun Apr 13, 2003 4:52 pm

Post

by shraga » Mon Apr 14, 2003 4:40 pm

I removed the spaces, same result.
also when I run it manually

thanks in advance
/shraga.

wmelick

Posts: 34
Joined: Fri Apr 11, 2003 4:11 pm
Location: Wilmington, Delaware

Actually

Post

by wmelick » Mon Apr 14, 2003 4:50 pm

The rrdtool create actually gives a lot of flags (as separated by the ):
(an example from my config):

/usr/local/rrdtool/bin/rrdtool create
/var/www/html/cacti/rra/welles_int_e151_in.rrd
—step 300
DS:welles_int_e151_in:COUNTER:600:0:10000000000
RRA:AVERAGE:0.5:1:600
RRA:AVERAGE:0.5:6:700
RRA:AVERAGE:0.5:24:775
RRA:AVERAGE:0.5:288:797
RRA:MAX:0.5:1:600
RRA:MAX:0.5:6:700
RRA:MAX:0.5:24:775
RRA:MAX:0.5:288:797

So you have a Data Source (DS: flag) and several RRA’s (RRA: flag)

wmelick

Posts: 34
Joined: Fri Apr 11, 2003 4:11 pm
Location: Wilmington, Delaware

Check some details

Post

by wmelick » Mon Apr 14, 2003 5:00 pm

From the # prompt, looks like you’re running as root. Is this OK?

Next, make sure «which php» shows the path to php…for me ‘s /usr/local/bin/php

then make sure you have a space between php and the path to cmd.php…e.g.

prompt>php /var/www/html/cacti/cmd.php > /dev/null 2>&1

(note the spaces after the first php, then before the first > and one after it before /dev/null)

does this help?

Guest

Post

by Guest » Mon Apr 14, 2003 5:22 pm

php can be found at /usr/local/bin/php
and php -v provides the corrct status

I tried to run the cmd both in root and cacti user.
also all the spaces are in the correct place.

again thanks for your efforts

Who is online

Users browsing this forum: No registered users and 1 guest

View previous topic :: View next topic  
Author Message
midnite
Guru
Guru

Joined: 09 Apr 2006
Posts: 417
Location: Hong Kong

PostPosted: Tue Jul 24, 2007 2:55 pm    Post subject: lm_sensors logging (format, round robin) Reply with quote

i have lm_sensors and syslog-ng installed. When i have a look at /var/log/syslog produced by sensord through syslog-ng, it is not in my favorite format. Can i alter its output format such that i can be more easy to plot graphs and perform some statistics by other programs (eg PHP)?

In man sensord, it talks about round robin databases. How can i use it? rrdtool? Do i have to install something else, or it is already in my system? i tried rrdtool create sensord.rrd, but is returns ERROR: you must define at least one Round Robin Archive. What mean? How?

Back to top

View user's profile Send private message

mattsteven
Apprentice
Apprentice

Joined: 27 Oct 2003
Posts: 240
Location: Your Planet

PostPosted: Tue Jul 24, 2007 7:55 pm    Post subject: Reply with quote

http://hotsanic.sourceforge.net/

That is an example of a program (perl) that uses RRD and it also supports logging/graphing lm_sensor data, maybe it will help you. It has not been updated for a long time, and requires rrdtool 1.x, but it still works just fine when you have that requirement met.
_________________
Matthew Steven

Linux-only desktop since 1998

Graying hair since 2006

Back to top

View user's profile Send private message

midnite
Guru
Guru

Joined: 09 Apr 2006
Posts: 417
Location: Hong Kong

PostPosted: Wed Jul 25, 2007 7:36 am    Post subject: Reply with quote

It sounds great! But it is not support in the Gentoo Online Package Database. May i ask a foolish question: how can i get it installed?

On the other hand, is there any other alternatives that are supported by Gentoo Package?

And also, i use mySQL for my web server. Is it a good idea to put those data (from lm_sensors) into mySQL table directly? And how?

Thanks!!

Back to top

View user's profile Send private message

mattsteven
Apprentice
Apprentice

Joined: 27 Oct 2003
Posts: 240
Location: Your Planet

PostPosted: Wed Jul 25, 2007 1:04 pm    Post subject: Reply with quote

That particular program can be downloaded (say to /usr/local) and set up in its own directory. Just follow the directions.

I know of no program like this living in portage.
_________________
Matthew Steven

Linux-only desktop since 1998

Graying hair since 2006

Back to top

View user's profile Send private message

Display posts from previous:   

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

У меня есть база данных RRD, которую я пытаюсь создать, и у меня есть пара циклов, написанных для построения команды, которая отлично работает и выдает ожидаемый результат. Проблема возникает, когда я на самом деле пытаюсь запустить команду rrdtool.create в Python. Этот цикл создает строку, мы будем называть ее rrdStr, содержащей следующее:

'"0x04.rrd", "--step","5",
"DS:TEMP:GAUGE:10:0:100",
"DS:HUMIDITY:GAUGE:10:0:100",
"DS:LIGHT:GAUGE:10:0:1024",
"DS:POT:GAUGE:10:0:1024",
"RRA:AVERAGE:0.5:1:17142",
"RRA:MIN:0.5:1:17142",
"RRA:MAX:0.5:1:17142",
"RRA:AVERAGE:0.5:12:7200",
"RRA:MIN:0.5:12:7200",
"RRA:MAX:0.5:12:7200",
"RRA:AVERAGE:0.5:60:8640",
"RRA:MIN:0.5:60:8640",
"RRA:MAX:0.5:60:8640",
"RRA:AVERAGE:0.5:360:17532",
"RRA:MIN:0.5:360:17532",
"RRA:MAX:0.5:360:17532"'

Насколько я могу судить, все кавычки и символы новой строки экранированы правильно.

Если я передаю rrdtool.create строковую переменную следующим образом: rrdtool.create(rrdStr), я получаю вывод

rrdtool.error: you must define at least one Round Robin Archive

Но если я скопирую и вставлю вышеприведенный вывод непосредственно в функцию rrdtool.create(), он будет работать так, как он должен, и создаст базу данных.

Любая идея, что вызывает это и как это исправить?

2 ответа

Лучший ответ

Вот и я наконец понял это. Вместо создания одной длинной строки, которая содержит все команды, правильно отформатированные, необходимо создать список, каждая строка команды rrd добавляется в список по мере ее создания.

Команда выше становится:

rrdStr = ["0x04.rrd", "--step","5"]
rrdStr += ["DS:TEMP:GAUGE:10:0:100"]
rrdStr += ["DS:HUMIDITY:GAUGE:10:0:100"]
rrdStr += ["DS:LIGHT:GAUGE:10:0:1024"]
rrdStr += ["DS:POT:GAUGE:10:0:1024"]
rrdStr += ["RRA:AVERAGE:0.5:1:17142"]
rrdStr += ["RRA:MIN:0.5:1:17142"]
rrdStr += ["RRA:MAX:0.5:1:17142"]
rrdStr += ["RRA:AVERAGE:0.5:12:7200"]
rrdStr += ["RRA:MIN:0.5:12:7200"]
rrdStr += ["RRA:MAX:0.5:12:7200"]
rrdStr += ["RRA:AVERAGE:0.5:60:8640"]
rrdStr += ["RRA:MIN:0.5:60:8640"]
rrdStr += ["RRA:MAX:0.5:60:8640"]
rrdStr += ["RRA:AVERAGE:0.5:360:17532"]
rrdStr += ["RRA:MIN:0.5:360:17532"]
rrdStr += ["RRA:MAX:0.5:360:17532"]

Затем вы можете передать список как единственную команду rrdtool.create(rrdStr) Та же команда, которая не была выполнена раньше, будет успешно выполнена


1

Butters
22 Авг 2013 в 02:20

Используйте rrdtool.create (* rrdStr) на python2.6 rrdtool-python-1.3.8-6.el6.x86_64


-1

GodPaKu
22 Сен 2014 в 08:17

Понравилась статья? Поделить с друзьями:
  • Error you cannot perform this operation unless you are root
  • Error you can find them in the drivers folder of flashtool
  • Error you are not using the aircoookie fork of the espasyncwebserver library
  • Error yaml scanner scannererror mapping values are not allowed here in docker compose yml
  • Error xvid codecs are not installed