RRD files not being created

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

vertigo23
Posts: 15
Joined: Fri Apr 20, 2007 4:30 pm

RRD files not being created

Post by vertigo23 »

We're working off a brand-new install of Cacti, and have run into a problem with graph creation. First off, here's some background information about our system

Ubuntu 6.06.1 with default LAMP install:
Apache 2
PHP 5
MySQL 5
rrdtool 1.2.11

I'm able to create devices just fine, but when I try to create any graph for any device, I get the following error:

Code: Select all

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 \
DEF:a="/var/www/cacti/rra/localhost_load_1min_29.rrd":load_1min:AVERAGE \
DEF:b="/var/www/cacti/rra/localhost_load_1min_29.rrd":load_5min:AVERAGE \
DEF:c="/var/www/cacti/rra/localhost_load_1min_29.rrd":load_15min:AVERAGE \
CDEF:cdefg=TIME,1177104187,GT,a,a,UN,0,a,IF,IF,TIME,1177104187,GT,b,b,UN,0,b,IF,IF,TIME,1177104187,GT,c,c,UN,0,c,IF,IF,+,+ \
AREA:a#EACC00:"1 Minute Average"  \
GPRINT:a:LAST:" Current\:%8.2lf\n"  \
AREA:b#EA8F00:"5 Minute Average":STACK \
GPRINT:b:LAST:" Current\:%8.2lf\n"  \
AREA:c#FF0000:"15 Minute Average":STACK \
GPRINT:c:LAST:"Current\:%8.2lf\n"  \
LINE1:cdefg#000000:"" 

RRDTool Says:

ERROR: opening '/var/www/cacti/rra/localhost_load_1min_29.rrd': No such file or directory
This also happens when running the above rrdtool command by hand from a prompt, as root. It's not a permissions problem - the cactiuser account definitely has write access to rrd/ and log/

Also, nothing is getting put into the log file.

Any help would be very appreciated! Please let me know if there's any other infomation I can give that would be useful in figuring out what's going wrong.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

This error occurs e.g. in cases where cacti detects the target as "down". See your devices list for that status. Find more help at the second link of my signature (reading the first one should not be a waste of time, though :wink: )
Reinhard
Kabar
Posts: 3
Joined: Sat Apr 21, 2007 4:16 pm

Post by Kabar »

I faced a similar problem a few days ago and the reason was a bad command in my crontab file. Be sure to specify the exact path to your php binary and poller.php file.
Jeffe
Posts: 1
Joined: Wed Apr 18, 2007 5:38 pm

Signature?

Post by Jeffe »

Hi,

I work w/ the guy who made the initial post in this thread, and we've tried adding the full paths, but that hasn't solved our problem. We'll try the second link, however. Thank you much.
vertigo23
Posts: 15
Joined: Fri Apr 20, 2007 4:30 pm

Post by vertigo23 »

The device in question is defintely not down, as it's localhost. Here's our poller command from crontab:

*/5 * * * * cactiuser /usr/bin/php /var/www/cacti/poller.php

I've confirmed that cactiuser has write access to /var/www/cacti/log and rra

When I sudo to the cactiuser account and run '/usr/bin/php /var/www/cacti/poller.php' by hand, i get absolutely no output.

I've switched logging mode to 'debug', but we are getting absolutely nothing in the log.

Does anyone have any suggestions where to go from here?
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Should you rather do the following as root:

crontab -u cactiuser -e

And then enter the following:

*/5 * * * * /usr/bin/php /var/www/cacti/poller.php

That's hou you would do it in RedHat anyhow.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
vertigo23
Posts: 15
Joined: Fri Apr 20, 2007 4:30 pm

Post by vertigo23 »

Again, if I run poller.php by hand, after logging into the cactiuser account, it produces no output, no rrd files are created, and nothing goes in the log. This is a 100% stock Cacti install. Please let me know what other information I can give you to help us with this issue.
Sascha Henken
Posts: 6
Joined: Wed Apr 25, 2007 1:06 pm

Post by Sascha Henken »

This is interesting as this happened to my cacti installation suddendly, from one day to another. I have running over 300 hosts that are beeing monitored through cacti. We
Sascha Henken
Posts: 6
Joined: Wed Apr 25, 2007 1:06 pm

Post by Sascha Henken »

This is interesting as this happened to my cacti installation suddendly, from one day to another. I have running over 300 hosts that are beeing monitored through cacti. We
elyn
Posts: 2
Joined: Wed Apr 25, 2007 11:13 pm
Contact:

can't create rra files

Post by elyn »

dear all...
i've just installed cacti, my first device and graph were created successfully but after that everytime i add new device my new device status were always unknown n when i create grap the status were created but my graph shown as broken image and there are messege like this :

RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Webserver Check in - Processes" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="processes" \
--slope-mode \
DEF:a="/var/www/cacti/rra/webserver_check_in_proc_220.rrd":proc:AVERAGE \
AREA:a#F51D30:"Running Processes" \
GPRINT:a:LAST:"Current\:%8.0lf" \
GPRINT:a:AVERAGE:"Average\:%8.0lf" \
GPRINT:a:MAX:"Maximum\:%8.0lf"

RRDTool Says:

ERROR: opening '/var/www/cacti/rra/webserver_check_in_proc_220.rrd': No such file or directory

I allready did all the tips in the previous messege but it wasn't change anything
I do really appreciate any help..

thanx
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Status unknown is the initial status of a device until it is first polled. Polling will happen as soon as the first Graph is requested. Befor polling is performed. The host is checked by "Downed Host Detection". If this fails, neither polling is done nor rrd files are created. So I suspect, that downed host detection fails.
Do debug this, please follow second link of my signature (not precisely written for this case, but includes some common debugging techniques)
Reinhard
User avatar
adrianmarsh
Cacti User
Posts: 437
Joined: Wed Aug 17, 2005 8:51 am
Location: UK

Post by adrianmarsh »

Well.. I've the same result, but mines a different originating problem I think..

I've created a new set of perl scripts, and templates, based on an existing working set.

I see the poller is gathering the data:

04/26/2007 04:11:46 PM - CACTID: Poller[0] Host[4] DS[702] SCRIPT: /usr/bin/perl /var/www/cacti/scripts/exchange_mes_delivery.pl ubiq-serv1.ubiquisys.local, output: SMTPMessagesDelivered:4479
SMTPMessagesReceived:3137
SMTPMessagesSent:984
04/26/2007 04:11:46 PM - CACTID: Poller[0] Host[4] DEBUG: The POPEN returned the following File Descriptor 10



But for some reason the initial rrd file isn't being created. Poller is run as root, and I can create new rrds with other templates ok.

So I'm guessing that as the poller outputs the data, then its not being fed through to the rrd file..

I don't see much else in the debug log for it either..
vertigo23
Posts: 15
Joined: Fri Apr 20, 2007 4:30 pm

Still no progress.

Post by vertigo23 »

gandalf wrote:Befor polling is performed. The host is checked by "Downed Host Detection". If this fails, neither polling is done nor rrd files are created. So I suspect, that downed host detection fails.
I don't understand how "Downed host detection" could fail, since the only host we're currently polling is the local system. In any case, do you know why this command: /usr/bin/php /var/www/cacti/poller.php would produce absolutely no output? Also, when we try to create graphs for localhost linux load average, we're still getting the error posted above about the RRD file not being found.

Again, this is for the local system, using local shell scripts - SNMP is not being touched yet. We've repeatedly re-installed cacti and keep getting exactly the same errors. Any help would be greatly appreciated.
vertigo23
Posts: 15
Joined: Fri Apr 20, 2007 4:30 pm

Post by vertigo23 »

gandalf wrote: Do debug this, please follow second link of my signature (not precisely written for this case, but includes some common debugging techniques)
Reinhard
Reinhard - I've been through the complete debugging NaN page you have in your signature. In step three, when you suggest to run cmd.php manually with the ID of the device in question (e.g. /usr/bin/php -q /var/www/cacti/cmd.php 4 4), I get absolutely no output either in the log or on stdout. Zip, zero, nada.

We only have a single device (the local linux machine), and the devices section *is* able to get SNMP information about it. Its availability is listed as 100% (but the status is 'unknown').

FInally, no RRD files are ever being created (I've set the permissions on the rra/ directory to world-writable). When I turn debugging on for any data source and run the rrdtool create command manually, the RRD file *is* created. However, it's never created automatically by cacti.

At this point, I'm seriously running out of patience with this tool. I appreciate that it's free and I don't have the right to any expectations, I'm just frustrated that it's not working, and that all of the information I've received hasn't really related to the problems I (and it seems like other people) have been having.
vertigo23
Posts: 15
Joined: Fri Apr 20, 2007 4:30 pm

adodb libs are to blame!

Post by vertigo23 »

Well, I've traced the execution of poller.php, and it looks like it's failing in function _pconnect() in /var/www/cacti/lib/adodb/drivers/adodb-mysql.inc.php. I put an echo at the beginning of that function, and it was output when i ran poller.php. I put a second echo right below the if..then statement, and got nothing.

Is the distribution of adodb that comes with cacti broken with php5 and mysql5?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest