Cacti doesn't create RRD files

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
mattia
Posts: 2
Joined: Thu Jul 26, 2007 4:31 am

Cacti doesn't create RRD files

Post by mattia »

Hi,

I'm trying to setup Cacti on Red Hat Enterprise Linux 4 (update 5) - 32-bit, but I can't see any graph in the interface, because RRD files don't seem to get generated.

Turning on graph debug mode I see

Code: Select all

ERROR: opening '/var/www/cacti/rra/localhost_mem_buffers_3.rrd': No such file or directory
in fact rrd directory is empty

Code: Select all

[root@nagiosmi-col01 ~]# ll /var/www/cacti/rra/
total 0
cacti runs as "cacti" user in crontab

Code: Select all

*/5 * * * * cacti /usr/bin/php /var/www/cacti/poller.php &>/dev/null
and the permissions look fine

Code: Select all

[root@nagiosmi-col01 ~]# ll /var/www/cacti/
..
drwxrwxrwx  2 cacti cacti   4096 Jul 25 17:42 log
drwxrwxrwx  2 cacti cacti   4096 Jul 25 17:42 rra
..
but if I try to execute poller.php or cmd.php manually as this user I get

Code: Select all

-sh-3.00$ whoami 
cacti
-sh-3.00$ pwd
/var/www/cacti
-sh-3.00$ php -q poller.php 
07/26/2007 11:31:43 AM - POLLER: Poller[0] Maximum runtime of 292 seconds exceeded. Exiting.
07/26/2007 11:31:43 AM - SYSTEM STATS: Time:293.1850 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:9 RRDsProcessed:0
<br />
<b>Warning</b>:  pclose(): 45 is not a valid stream resource in <b>/var/www/cacti/lib/rrd.php</b> on line <b>48</b><br />
and

Code: Select all

-sh-3.00$ whoami 
cacti
-sh-3.00$ pwd
/var/www/cacti
-sh-3.00$ 
-sh-3.00$ php -q cmd.php 
07/26/2007 11:38:41 AM - CMDPHP: Poller[0] Time: 0.2288 s, Theads: N/A, Hosts: 1
BTW running the same scripts as root user produces the same output.

I've already seen this two posts
http://forums.cacti.net/about22362.html
http://forums.cacti.net/about21457.html
but the advices indicated didn't help me.

Operating system is RHEL4 U5 - 32bit
cacti-0.8.6j-1.el4.rf
rrdtool-1.2.23-1.el4.rf
perl-rrdtool-1.2.23-1.el4.rf
php-4.3.9-3.22.5
mysql-server-4.1.20-2.RHEL4.1
httpd-2.0.52-32.3.ent
net-snmp-5.1.2-11.EL4.10

I've already restarted from scratch twice on two different machines, but with no luck... thanks in advance for any clue!
Cheers

Mattia
Last edited by mattia on Fri Jul 27, 2007 3:40 am, edited 1 time in total.
mattia
Posts: 2
Joined: Thu Jul 26, 2007 4:31 am

Post by mattia »

I've figured it out by myself... setting loglevel to HIGH the following message appeared in the logs

Code: Select all

CMDPHP: Poller[0] WARNING: sockets support not enabled in PHP, falling back to SNMP ping
It looks like Cacti checks (using SNMP ping) if the host is down before probing it.
Navigating to Console --> Settings --> Poller I've switched from SNMP ping (the default) to UDP ping, the host is detected as online, and everything works now.

Code: Select all

07/26/2007 12:33:00 PM - SYSTEM STATS: Time:1.0465 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:15 RRDsProcessed:10
OK u:0.00 s:0.01 r:0.02
OK u:0.00 s:0.01 r:0.02
OK u:0.00 s:0.01 r:0.02
OK u:0.00 s:0.01 r:0.02
OK u:0.00 s:0.01 r:0.02
OK u:0.00 s:0.01 r:0.02
OK u:0.00 s:0.01 r:0.02
OK u:0.00 s:0.01 r:0.02
OK u:0.00 s:0.01 r:0.02
OK u:0.00 s:0.01 r:0.02
-sh-3.00$
I'm pretty satisfied with the solution, anyway does anyone sees any problem in using UDP ping insted of SNMP? Why is it considered to be less reliable?

Thanks anyway

Cheers

Mattia
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest