rdd Files Not Being Created
Moderators: Developers, Moderators
rdd Files Not Being Created
Hi,
I am a Cacti newbie. I have been reading all the documentation and forum posts that are available, but still cannot understand why I am not getting any rdd files created in the /usr/share/cacti/rra/ directory.
I have done directory permission checks and rechecked my installation settings. I am running the poller.php as my user id 'psterk', not as 'root'. Here is background info to help resolve this:
Here is system info
Cacti: 0.8.7g
RRDtool: 1.2.27
OS: CentOS 5.5 Final (Fedora), x86_64.
Here are the results when running poller.php:
bash-3.2$ whoami
psterk
bash-3.2$ /usr/bin/php /usr/share/cacti/poller.php
rra path: /usr/share/cacti/rra
07/07/2011 09:19:15 AM - SYSTEM STATS: Time:1.2789 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:6 RRDsProcessed:0
Here is the result:
bash-3.2$ ll /usr/share/cacti/rra/
total 0
What, no files???
Here is a directory permission check:
bash-3.2$ ll /usr/share/cacti|grep rra/
lrwxrwxrwx 1 psterk root 18 Jul 6 09:43 rra -> /var/lib/cacti/rra/
Here is my crobtab config:
*/5 * * * * psterk /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1
Here is what is in the cacti log:
07/07/2011 09:30:03 AM - POLLER: Poller[0] WARNING: Cron is out of sync with the Poller Interval! The Poller Interval is '300' seconds, with a maximum of a '300' second Cron, but 327 seconds have passed since the last poll!
07/07/2011 09:30:03 AM - CMDPHP: Poller[0] WARNING: SNMP GetNext Timeout for Host:'127.0.0.1', and OID:'.1.3'
07/07/2011 09:30:03 AM - SYSTEM STATS: Time:0.2986 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:6 RRDsProcessed:0
Note: I can't see any DEBUG messages. I realize there are messages about cron intervals, but I have run poller.php and gotten no such messages - still no rdd files.
Here is what is displayed in the Web UI when I try to run 'Localhost - Load Average' with Graph Debug Mode 'on':
RRDTool Command:
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title='Localhost - Load Average' \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--units-exponent='0' \
--vertical-label='processes in the run queue' \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/usr/share/cacti/rra/localhost_load_1min_5.rrd":load_1min:AVERAGE \
DEF:b="/usr/share/cacti/rra/localhost_load_1min_5.rrd":load_5min:AVERAGE \
DEF:c="/usr/share/cacti/rra/localhost_load_1min_5.rrd":load_15min:AVERAGE \
CDEF:cdefg=TIME,1310045886,GT,a,a,UN,0,a,IF,IF,TIME,1310045886,GT,b,b,UN,0,b,IF,IF,TIME,1310045886,GT,c,c,UN,0,c,IF,IF,+,+ \
AREA:a#EACC00FF:"1 Minute Average" \
GPRINTLAST:" Current\:%8.2lf\n" \
AREA:b#EA8F00FF:"5 Minute Average":STACK \
GPRINTLAST:" Current\:%8.2lf\n" \
AREA:c#FF0000FF:"15 Minute Average":STACK \
GPRINT:c:LAST:"Current\:%8.2lf\n" \
LINE1:cdefg#000000FF:""
RRDTool Says:
ERROR: opening '/usr/share/cacti/rra/localhost_load_1min_5.rrd': No such file or directory
Here is what is in the httpd log:
ERROR: opening '/usr/share/cacti/rra/localhost_load_1min_5.rrd': No such file or directory
Info from the cacti mysql database:
mysql> select * from rra;
+----+----------------------------------+----------------------------+----------------+-------+------+----------+
| id | hash | name | x_files_factor | steps | rows | timespan |
+----+----------------------------------+----------------------------+----------------+-------+------+----------+
| 1 | c21df5178e5c955013591239eb0afd46 | Daily (5 Minute Average) | 0.5 | 1 | 600 | 86400 |
| 2 | 0d9c0af8b8acdc7807943937b3208e29 | Weekly (30 Minute Average) | 0.5 | 6 | 700 | 604800 |
| 3 | 6fc2d038fb42950138b0ce3e9874cc60 | Monthly (2 Hour Average) | 0.5 | 24 | 775 | 2678400 |
| 4 | e36f3adb9f152adfa5dc50fd2b23337e | Yearly (1 Day Average) | 0.5 | 288 | 797 | 33053184 |
| 5 | 283ea2bf1634d92ce081ec82a634f513 | Hourly (1 Minute Average) | 0.5 | 1 | 500 | 14400 |
+----+----------------------------------+----------------------------+----------------+-------+------+----------+
5 rows in set (0.00 sec)
mysql> select * from rra_cf;
+--------+---------------------------+
| rra_id | consolidation_function_id |
+--------+---------------------------+
| 1 | 1 |
| 1 | 3 |
| 2 | 1 |
| 2 | 3 |
| 3 | 1 |
| 3 | 3 |
| 4 | 1 |
| 4 | 3 |
| 5 | 1 |
| 5 | 3 |
+--------+---------------------------+
10 rows in set (0.00 sec)
mysql> select * from poller_command;
Empty set (0.00 sec)
mysql> select * from poller_output;
Empty set (0.00 sec)
mysql> select * from poller_item;
+---------------+-----------+---------+--------+---------+-----------+----------------+--------------+---------------+---------------+--------------------+----------------------+--------------------+--------------+-----------+--------------+-------------+--------------------------------------------------+---------+----------+---------------+---------------------------------------------------------+------+------+
| local_data_id | poller_id | host_id | action | present | hostname | snmp_community | snmp_version | snmp_username | snmp_password | snmp_auth_protocol | snmp_priv_passphrase | snmp_priv_protocol | snmp_context | snmp_port | snmp_timeout | rrd_name | rrd_path | rrd_num | rrd_step | rrd_next_step | arg1 | arg2 | arg3 |
+---------------+-----------+---------+--------+---------+-----------+----------------+--------------+---------------+---------------+--------------------+----------------------+--------------------+--------------+-----------+--------------+-------------+--------------------------------------------------+---------+----------+---------------+---------------------------------------------------------+------+------+
| 3 | 0 | 1 | 1 | 1 | 127.0.0.1 | public | 3 | | | MD5 | | DES | | 161 | 500 | mem_buffers | /usr/share/cacti/rra/localhost_mem_buffers_3.rrd | 1 | 300 | 0 | perl /usr/share/cacti/scripts/linux_memory.pl MemFree: | | |
| 4 | 0 | 1 | 1 | 1 | 127.0.0.1 | public | 3 | | | MD5 | | DES | | 161 | 500 | mem_swap | /usr/share/cacti/rra/localhost_mem_swap_4.rrd | 1 | 300 | 0 | perl /usr/share/cacti/scripts/linux_memory.pl SwapFree: | | |
| 5 | 0 | 1 | 1 | 1 | 127.0.0.1 | public | 3 | | | MD5 | | DES | | 161 | 500 | | /usr/share/cacti/rra/localhost_load_1min_5.rrd | 1 | 300 | 0 | perl /usr/share/cacti/scripts/loadavg_multi.pl | | |
| 6 | 0 | 1 | 1 | 1 | 127.0.0.1 | public | 3 | | | MD5 | | DES | | 161 | 500 | users | /usr/share/cacti/rra/localhost_users_6.rrd | 1 | 300 | 0 | perl /usr/share/cacti/scripts/unix_users.pl | | |
| 7 | 0 | 1 | 1 | 1 | 127.0.0.1 | public | 3 | | | MD5 | | DES | | 161 | 500 | proc | /usr/share/cacti/rra/localhost_proc_7.rrd | 1 | 300 | 0 | perl /usr/share/cacti/scripts/unix_processes.pl | | |
+---------------+-----------+---------+--------+---------+-----------+----------------+--------------+---------------+---------------+--------------------+----------------------+--------------------+--------------+-----------+--------------+-------------+--------------------------------------------------+---------+----------+---------------+---------------------------------------------------------+------+------+
5 rows in set (0.00 sec)
mysql> select * from poller_reindex;
Empty set (0.00 sec)
mysql> select * from poller_time;
+----+-------+-----------+---------------------+---------------------+
| id | pid | poller_id | start_time | end_time |
+----+-------+-----------+---------------------+---------------------+
| 1 | 16146 | 0 | 2011-07-07 08:55:02 | 2011-07-07 08:55:02 |
| 2 | 16149 | 0 | 2011-07-07 08:55:02 | 2011-07-07 08:55:02 |
+----+-------+-----------+---------------------+---------------------+
2 rows in set (0.00 sec)
Ok, so what did I miss? Please help.
Thanks,
Paul
I am a Cacti newbie. I have been reading all the documentation and forum posts that are available, but still cannot understand why I am not getting any rdd files created in the /usr/share/cacti/rra/ directory.
I have done directory permission checks and rechecked my installation settings. I am running the poller.php as my user id 'psterk', not as 'root'. Here is background info to help resolve this:
Here is system info
Cacti: 0.8.7g
RRDtool: 1.2.27
OS: CentOS 5.5 Final (Fedora), x86_64.
Here are the results when running poller.php:
bash-3.2$ whoami
psterk
bash-3.2$ /usr/bin/php /usr/share/cacti/poller.php
rra path: /usr/share/cacti/rra
07/07/2011 09:19:15 AM - SYSTEM STATS: Time:1.2789 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:6 RRDsProcessed:0
Here is the result:
bash-3.2$ ll /usr/share/cacti/rra/
total 0
What, no files???
Here is a directory permission check:
bash-3.2$ ll /usr/share/cacti|grep rra/
lrwxrwxrwx 1 psterk root 18 Jul 6 09:43 rra -> /var/lib/cacti/rra/
Here is my crobtab config:
*/5 * * * * psterk /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1
Here is what is in the cacti log:
07/07/2011 09:30:03 AM - POLLER: Poller[0] WARNING: Cron is out of sync with the Poller Interval! The Poller Interval is '300' seconds, with a maximum of a '300' second Cron, but 327 seconds have passed since the last poll!
07/07/2011 09:30:03 AM - CMDPHP: Poller[0] WARNING: SNMP GetNext Timeout for Host:'127.0.0.1', and OID:'.1.3'
07/07/2011 09:30:03 AM - SYSTEM STATS: Time:0.2986 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:6 RRDsProcessed:0
Note: I can't see any DEBUG messages. I realize there are messages about cron intervals, but I have run poller.php and gotten no such messages - still no rdd files.
Here is what is displayed in the Web UI when I try to run 'Localhost - Load Average' with Graph Debug Mode 'on':
RRDTool Command:
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title='Localhost - Load Average' \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--units-exponent='0' \
--vertical-label='processes in the run queue' \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/usr/share/cacti/rra/localhost_load_1min_5.rrd":load_1min:AVERAGE \
DEF:b="/usr/share/cacti/rra/localhost_load_1min_5.rrd":load_5min:AVERAGE \
DEF:c="/usr/share/cacti/rra/localhost_load_1min_5.rrd":load_15min:AVERAGE \
CDEF:cdefg=TIME,1310045886,GT,a,a,UN,0,a,IF,IF,TIME,1310045886,GT,b,b,UN,0,b,IF,IF,TIME,1310045886,GT,c,c,UN,0,c,IF,IF,+,+ \
AREA:a#EACC00FF:"1 Minute Average" \
GPRINTLAST:" Current\:%8.2lf\n" \
AREA:b#EA8F00FF:"5 Minute Average":STACK \
GPRINTLAST:" Current\:%8.2lf\n" \
AREA:c#FF0000FF:"15 Minute Average":STACK \
GPRINT:c:LAST:"Current\:%8.2lf\n" \
LINE1:cdefg#000000FF:""
RRDTool Says:
ERROR: opening '/usr/share/cacti/rra/localhost_load_1min_5.rrd': No such file or directory
Here is what is in the httpd log:
ERROR: opening '/usr/share/cacti/rra/localhost_load_1min_5.rrd': No such file or directory
Info from the cacti mysql database:
mysql> select * from rra;
+----+----------------------------------+----------------------------+----------------+-------+------+----------+
| id | hash | name | x_files_factor | steps | rows | timespan |
+----+----------------------------------+----------------------------+----------------+-------+------+----------+
| 1 | c21df5178e5c955013591239eb0afd46 | Daily (5 Minute Average) | 0.5 | 1 | 600 | 86400 |
| 2 | 0d9c0af8b8acdc7807943937b3208e29 | Weekly (30 Minute Average) | 0.5 | 6 | 700 | 604800 |
| 3 | 6fc2d038fb42950138b0ce3e9874cc60 | Monthly (2 Hour Average) | 0.5 | 24 | 775 | 2678400 |
| 4 | e36f3adb9f152adfa5dc50fd2b23337e | Yearly (1 Day Average) | 0.5 | 288 | 797 | 33053184 |
| 5 | 283ea2bf1634d92ce081ec82a634f513 | Hourly (1 Minute Average) | 0.5 | 1 | 500 | 14400 |
+----+----------------------------------+----------------------------+----------------+-------+------+----------+
5 rows in set (0.00 sec)
mysql> select * from rra_cf;
+--------+---------------------------+
| rra_id | consolidation_function_id |
+--------+---------------------------+
| 1 | 1 |
| 1 | 3 |
| 2 | 1 |
| 2 | 3 |
| 3 | 1 |
| 3 | 3 |
| 4 | 1 |
| 4 | 3 |
| 5 | 1 |
| 5 | 3 |
+--------+---------------------------+
10 rows in set (0.00 sec)
mysql> select * from poller_command;
Empty set (0.00 sec)
mysql> select * from poller_output;
Empty set (0.00 sec)
mysql> select * from poller_item;
+---------------+-----------+---------+--------+---------+-----------+----------------+--------------+---------------+---------------+--------------------+----------------------+--------------------+--------------+-----------+--------------+-------------+--------------------------------------------------+---------+----------+---------------+---------------------------------------------------------+------+------+
| local_data_id | poller_id | host_id | action | present | hostname | snmp_community | snmp_version | snmp_username | snmp_password | snmp_auth_protocol | snmp_priv_passphrase | snmp_priv_protocol | snmp_context | snmp_port | snmp_timeout | rrd_name | rrd_path | rrd_num | rrd_step | rrd_next_step | arg1 | arg2 | arg3 |
+---------------+-----------+---------+--------+---------+-----------+----------------+--------------+---------------+---------------+--------------------+----------------------+--------------------+--------------+-----------+--------------+-------------+--------------------------------------------------+---------+----------+---------------+---------------------------------------------------------+------+------+
| 3 | 0 | 1 | 1 | 1 | 127.0.0.1 | public | 3 | | | MD5 | | DES | | 161 | 500 | mem_buffers | /usr/share/cacti/rra/localhost_mem_buffers_3.rrd | 1 | 300 | 0 | perl /usr/share/cacti/scripts/linux_memory.pl MemFree: | | |
| 4 | 0 | 1 | 1 | 1 | 127.0.0.1 | public | 3 | | | MD5 | | DES | | 161 | 500 | mem_swap | /usr/share/cacti/rra/localhost_mem_swap_4.rrd | 1 | 300 | 0 | perl /usr/share/cacti/scripts/linux_memory.pl SwapFree: | | |
| 5 | 0 | 1 | 1 | 1 | 127.0.0.1 | public | 3 | | | MD5 | | DES | | 161 | 500 | | /usr/share/cacti/rra/localhost_load_1min_5.rrd | 1 | 300 | 0 | perl /usr/share/cacti/scripts/loadavg_multi.pl | | |
| 6 | 0 | 1 | 1 | 1 | 127.0.0.1 | public | 3 | | | MD5 | | DES | | 161 | 500 | users | /usr/share/cacti/rra/localhost_users_6.rrd | 1 | 300 | 0 | perl /usr/share/cacti/scripts/unix_users.pl | | |
| 7 | 0 | 1 | 1 | 1 | 127.0.0.1 | public | 3 | | | MD5 | | DES | | 161 | 500 | proc | /usr/share/cacti/rra/localhost_proc_7.rrd | 1 | 300 | 0 | perl /usr/share/cacti/scripts/unix_processes.pl | | |
+---------------+-----------+---------+--------+---------+-----------+----------------+--------------+---------------+---------------+--------------------+----------------------+--------------------+--------------+-----------+--------------+-------------+--------------------------------------------------+---------+----------+---------------+---------------------------------------------------------+------+------+
5 rows in set (0.00 sec)
mysql> select * from poller_reindex;
Empty set (0.00 sec)
mysql> select * from poller_time;
+----+-------+-----------+---------------------+---------------------+
| id | pid | poller_id | start_time | end_time |
+----+-------+-----------+---------------------+---------------------+
| 1 | 16146 | 0 | 2011-07-07 08:55:02 | 2011-07-07 08:55:02 |
| 2 | 16149 | 0 | 2011-07-07 08:55:02 | 2011-07-07 08:55:02 |
+----+-------+-----------+---------------------+---------------------+
2 rows in set (0.00 sec)
Ok, so what did I miss? Please help.
Thanks,
Paul
Re: rdd Files Not Being Created
Does the user "psterk" have write permission to "/var/lib/cacti/rra/" directory?psterk wrote:Here is a directory permission check:
bash-3.2$ ll /usr/share/cacti|grep rra/
lrwxrwxrwx 1 psterk root 18 Jul 6 09:43 rra -> /var/lib/cacti/rra/
Please check:
$ ls -ld /var/lib/cacti/rra/
Re: rdd Files Not Being Created
Thanks for the response! Yes, I have permission:
bash-3.2$ whoami
psterk
bash-3.2$ ll /usr/share/cacti/ |grep rra
lrwxrwxrwx 1 psterk root 18 Jul 6 09:43 rra -> /var/lib/cacti/rra/
bash-3.2$ ls -ld /var/lib/cacti/rra
drwxrwxrwx 2 psterk root 4.0K Jul 7 08:04 /var/lib/cacti/rra/
bash-3.2$ /usr/bin/php /usr/share/cacti/poller.php
Starting poller
rra path: /usr/share/cacti/rra
bash-3.2$ ls /var/lib/cacti/rra
bash-3.2$
bash-3.2$ whoami
psterk
bash-3.2$ ll /usr/share/cacti/ |grep rra
lrwxrwxrwx 1 psterk root 18 Jul 6 09:43 rra -> /var/lib/cacti/rra/
bash-3.2$ ls -ld /var/lib/cacti/rra
drwxrwxrwx 2 psterk root 4.0K Jul 7 08:04 /var/lib/cacti/rra/
bash-3.2$ /usr/bin/php /usr/share/cacti/poller.php
Starting poller
rra path: /usr/share/cacti/rra
bash-3.2$ ls /var/lib/cacti/rra
bash-3.2$
Re: rdd Files Not Being Created
Hmm, then..
Oops, I didn't notice this.
Is snmpd running? (or configured properly?)
$ snmpwalk -v1 -c COMMUNITY localhost sysName
Oops, I didn't notice this.
What do you think about the above error?psterk wrote:Here is what is in the cacti log:
07/07/2011 09:30:03 AM - POLLER: Poller[0] WARNING: Cron is out of sync with the Poller Interval! The Poller Interval is '300' seconds, with a maximum of a '300' second Cron, but 327 seconds have passed since the last poll!
07/07/2011 09:30:03 AM - CMDPHP: Poller[0] WARNING: SNMP GetNext Timeout for Host:'127.0.0.1', and OID:'.1.3'
07/07/2011 09:30:03 AM - SYSTEM STATS: Time:0.2986 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:6 RRDsProcessed:0
Is snmpd running? (or configured properly?)
$ snmpwalk -v1 -c COMMUNITY localhost sysName
Re: rdd Files Not Being Created
Yes, snmpd is installed and running. Here is a test:
I was wondering about something: is the problem due to the fact that my poller_output table is empty:
The lib/poller.php file needs entries from this table:
sizeof($results) is 0
If this is the problem, could you please suggest reasons why this table could be empty?
Thanks!
Code: Select all
bash-3.2$ snmpwalk -v1 -c public localhost system
SNMPv2-MIB::sysDescr.0 = STRING: Linux <myhostname> 2.6.18-194.32.1.el5xen #1 SMP Wed Jan 5 18:44:24 EST 2011 x86_64
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (95778) 0:15:57.78
...
Code: Select all
mysql> SELECT * FROM poller_output;
Empty set (0.00 sec)
Code: Select all
/* create/update the rrd files */
$results = db_fetch_assoc("select
poller_output.output,
poller_output.time,
poller_output.local_data_id,
poller_item.rrd_path,
poller_item.rrd_name,
poller_item.rrd_num
from (poller_output,poller_item)
where (poller_output.local_data_id=poller_item.local_data_id and poller_output.rrd_name=poller_item.rrd_name)
$limit");
If this is the problem, could you please suggest reasons why this table could be empty?
Thanks!
Re: rdd Files Not Being Created
As someone pointed out earlier, I was having this failure in my log file:
This call was setting $snmp_value to false:
The upshot of this condition is that a code block in cmd.php failed to run, resulting in an empty poller_output table.
This command works in my terminal:
However, hardwiring the OID to 'sysUpTime.0' still fails.
So, a workaround for now is to hard code the $snmp_value to 'true'. If anyone has any suggestions on a proper solution, please let me know.
Code: Select all
CMDPHP: Poller[0] WARNING: SNMP GetNext Timeout for Host:'127.0.0.1', and OID:'.1.3'
Code: Select all
$snmp_value = @snmp3_getnext("$hostname:$port", "$username", $proto, $auth_proto, "$password", $priv_proto, "$priv_pass", "$oid", ($timeout * 1000), $retries);
This command works in my terminal:
Code: Select all
bash-3.2$ snmpget 127.0.0.1 -v1 -c public sysUpTime.0
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (1345777) 3:44:17.77
So, a workaround for now is to hard code the $snmp_value to 'true'. If anyone has any suggestions on a proper solution, please let me know.
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: rdd Files Not Being Created
There is (has been) some code in lib/snmp.php that defines the OID that is used to verify that an snmp host is up.
You may want to modify that OID (which will apply to ALL devices, then). Or you might use a UDP ping test for host availability instead
R.
You may want to modify that OID (which will apply to ALL devices, then). Or you might use a UDP ping test for host availability instead
R.
Who is online
Users browsing this forum: No registered users and 5 guests