cacti + not plotting graphs

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

Moderators: Developers, Moderators

aeby
Posts: 11
Joined: Mon Aug 20, 2007 8:36 am

cacti + not plotting graphs

Post by aeby »

Hi all,

i have installed cacti but instead of displaying the grpahs it gives me a page with the following errors. I cant figure out why the graphs are not being plotted.




/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=1188137031 \
--end=1188223131 \
--title="Localhost - Memory Usage" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
COMMENT:"From 2007/08/26 16\:03\:51 To 2007/08/27 15\:58\:51\c" \
COMMENT:" \n" \
--vertical-label="kilobytes" \
--slope-mode \
DEF:a="/var/www/html/cacti/rra/localhost_mem_buffers_3.rrd":mem_buffers:AVERAGE \
DEF:b="/var/www/html/cacti/rra/localhost_mem_swap_4.rrd":mem_swap:AVERAGE \
AREA:a#FF4105:"Free" \
GPRINT:a:LAST:"Current\:%8.2lf %s" \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:a:MAX:"Maximum\:%8.2lf %s\n" \
AREA:b#FFC73B:"Swap":STACK \
GPRINT:b:LAST:"Current\:%8.2lf %s" \
GPRINT:b:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:b:MAX:"Maximum\:%8.2lf %s"



Thanks in advance.
Kind Regards
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please run

Code: Select all

/usr/bin/rrdtool graph /tmp/foo.png \
--imgformat=PNG \
--start=1188137031 \
--end=1188223131 \
--title="Localhost - Memory Usage" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
COMMENT:"From 2007/08/26 16\:03\:51 To 2007/08/27 15\:58\:51\c" \
COMMENT:" \n" \
--vertical-label="kilobytes" \
--slope-mode \
DEF:a="/var/www/html/cacti/rra/localhost_mem_buffers_3.rrd":mem_buffers:AVERAGE \
DEF:b="/var/www/html/cacti/rra/localhost_mem_swap_4.rrd":mem_swap:AVERAGE \
AREA:a#FF4105:"Free" \
GPRINT:a:LAST:"Current\:%8.2lf %s" \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:a:MAX:"Maximum\:%8.2lf %s\n" \
AREA:b#FFC73B:"Swap":STACK \
GPRINT:b:LAST:"Current\:%8.2lf %s" \
GPRINT:b:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:b:MAX:"Maximum\:%8.2lf %s"
from command line and post your findings
Reinhard
aeby
Posts: 11
Joined: Mon Aug 20, 2007 8:36 am

Post by aeby »

Hi gandhalf,
i see the text file i displayed only when i zoom into the page that gets diplayed, when i click on the graphs display option it gives me a page with a zooming icon but it doesnt didplay the graph, when i click on the zooming icon it gives me a link for viewing the source and diaplys the text file.

When i add a device it also gives me an SNMP error.

I tried running th text i displayed it gives me
ERROR: opening '/var/www/html/cacti/rra/localhost_mem_buffers_3.rrd': No such file or directory

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

Post by gandalf »

Please read careful installation instructions given at http://docs.cacti.net/node/5. And please post a screenshot of the failing graph along with version info for cacti, rrdtool, mysql, php, snmp. Make sure, cacti is fully patched http://www.cacti.net/download_patches.php
Reinhard
aeby
Posts: 11
Joined: Mon Aug 20, 2007 8:36 am

Post by aeby »

Thanks gandhalf for all the help . sorry for the cross posting.

cacti -0.8.6
rrdtool- 1.2.21
mysql - 5.0.2
php- 5.1.6
snmp NET-SNMP version: 5.4.1

i have followed the installtion in the cacti.net site. i have attched the screenshot.


Regards
Attachments
Screenshot.png
Screenshot.png (115.93 KiB) Viewed 6674 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

aeby wrote:When i add a device it also gives me an SNMP error.
Please have a look at http://docs.cacti.net/node/411 for help on correct setup of snmpd. Then, please try to use "ucd/net SNMP Host" Host template instead of "local Linux machine" and retry
Reinhard
aeby
Posts: 11
Joined: Mon Aug 20, 2007 8:36 am

Post by aeby »

Hi gandhalf,
the snmp error is gone but still it doesnot want to plot,it gives me the same page as before. i added a device and turned the debugging for the graphs. on it gives me the following error.


ERROR: opening '/var/www/html/cacti/rra/testmachine_load_1min_35.rrd': No such file or directory.
i checked the permission on the rra folder it is owned by cacti user
drwxr-xr-x 2 cactiuser root 4096 Aug 29 10:26 rra

how do i fix this. what else should i look into.
cacti is not creating files in rra ..?????????????????

Thanks gandhalf.
aeby
Posts: 11
Joined: Mon Aug 20, 2007 8:36 am

Post by aeby »

Hi Gandhalf,
i have not installed php-cli, i am running FC2 and i it is not installing via yum , it is running php-4.3 version,
but on another version running Centos 5 i manually ran php -q poller.php and it is generating the .rrf files and i have installed php-cli it is running on php-5., but the cron is not running, and i am able to see empty graphs .
is it coz the php-cli package is not there that it is not genertaing the .rrd files,

how will i get to generate the rrd files.

please advice
thanks for all the help

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

Post by gandalf »

Unless the following procedure produces reasonable output, you won't see anything:

Code: Select all

login as cactiuser
cd to the cacti directory
run "php -q poller.php"
Now, you should see reasonable output. If not, I suppose your php is broken
Reinhard
aeby
Posts: 11
Joined: Mon Aug 20, 2007 8:36 am

Post by aeby »

Hi gandhalf,
when i run php -q poller.php ot gives me the following error.

08/31/2007 09:33:06 AM - POLLER: Poller[0] Maximum runtime of 292 seconds exceeded. Exiting.
08/31/2007 09:33:06 AM - SYSTEM STATS: Time:292.7530 Method:cmd.php Processes:1 Threads:N/A Hosts:3 HostsPerProcess:3 DataSources:18 RRDsProcessed:0
PHP Warning: pclose(): 45 is not a valid stream resource in /var/www/html/cacti/lib/rrd.php on line 48

What is wrong.

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

Post by gandalf »

Please retry using verbosity level DEBUG (see: Settings)
Reinhard
aeby
Posts: 11
Joined: Mon Aug 20, 2007 8:36 am

Post by aeby »

Helo gandhalf,

i did change the settings level to debug
my log file is as follows
09/03/2007 09:49:15 AM - SYSTEM STATS: Time:292.9156 Method:cmd.php Processes:1 Threads:N/A Hosts:3 HostsPerProcess:3 DataSources:18 RRDsProcessed:0
09/03/2007 09:49:15 AM - POLLER: Poller[0] Maximum runtime of 292 seconds exceeded. Exiting.
09/03/2007 08:51:29 AM - SYSTEM STATS: Time:292.9010 Method:cmd.php Processes:1 Threads:N/A Hosts:3 HostsPerProcess:3 DataSources:18 RRDsProcessed:0
09/03/2007 08:51:29 AM - POLLER: Poller[0] Maximum runtime of 292 seconds exceeded. Exiting.
08/31/2007 10:00:32 AM - SYSTEM STATS: Time:292.8076 Method:cmd.php Processes:1 Threads:N/A Hosts:3 HostsPerProcess:3 DataSources:18 RRDsProcessed:0
08/31/2007 10:00:32 AM - POLLER: Poller[0] Maximum runtime of 292 seconds exceeded. Exiting.
08/31/2007 09:33:06 AM - SYSTEM STATS: Time:292.7530 Method:cmd.php Processes:1 Threads:N/A Hosts:3 HostsPerProcess:3 DataSources:18 RRDsProcessed:0
08/31/2007 09:33:06 AM - POLLER: Poller[0] Maximum runtime of 292 seconds exceeded. Exiting.
08/31/2007 09:08:15 AM - SYSTEM STATS: Time:292.7455 Method:cmd.php Processes:1 Threads:N/A Hosts:3 HostsPerProcess:3 DataSources:18 RRDsProcessed:0
08/31/2007 09:08:15 AM - POLLER: Poller[0] Maximum runtime of 292 seconds exceeded. Exiting.
08/31/2007 08:42:51 AM - SYSTEM STATS: Time:292.8304 Method:cmd.php Processes:1 Threads:N/A Hosts:3 HostsPerProcess:3 DataSources:18 RRDsProcessed:0
08/31/2007 08:42:51 AM - POLLER: Poller[0] Maximum runtime of 292 seconds exceeded. Exiting.
08/30/2007 04:00:41 PM - SYSTEM STATS: Time:293.8915 Method:cmd.php Processes:1 Threads:N/A Hosts:3 HostsPerProcess:3 DataSources:18 RRDsProcessed:0
08/30/2007 04:00:41 PM - POLLER: Poller[0] Maximum runtime of 292 seconds exceeded. Exiting.
08/30/2007 02:52:18 PM - SYSTEM STATS: Time:292.8532 Method:cmd.php Processes:1 Threads:N/A Hosts:3 HostsPerProcess:3 DataSources:18 RRDsProcessed:0
08/30/2007 02:52:18 PM - POLLER: Poller[0] Maximum runtime of 292 seconds exceeded. Exiting.

how to i get to generate the rra files,
now what ?? please advise

Thanks for all the help
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Aah, that's the double poller issue reported in the second link of my signature. Find the second crontab entry and delete it
Reinhard
aeby
Posts: 11
Joined: Mon Aug 20, 2007 8:36 am

Post by aeby »

Hello gandhal,
i didnt find the second link to your signature, please can you tell me where i can find it,
i check all my crontab entries , i have only one, and thats for the user cactiuser and it is as follows

*/5 * * * * php /var/www/html/cacti/poller.php > /tmp/cacti.log

it is genertaing the log which is as follows:

Content-type: text/html
X-Powered-By: PHP/4.3.10

09/04/2007 08:55:00 AM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /usr/bin/php, ARGS: -q /var/www/html/cacti/cmd.php 0 6]
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.

i checked the mail for cacti : it is as follows:
rom cactiuser@ct-vpn.workforce.co.za Tue Sep 4 09:09:53 2007
Return-Path: <cactiuser@ct-vpn.workforce.co.za>
Received: from ct-vpn.workforce.co.za (ct-vpn.workforce.co.za [127.0.0.1])
by ct-vpn.workforce.co.za (8.12.11/8.12.11) with ESMTP id l8479rwp027691
for <cactiuser@ct-vpn.workforce.co.za>; Tue, 4 Sep 2007 09:09:53 +0200
Received: (from cactiuser@localhost)
by ct-vpn.workforce.co.za (8.12.11/8.12.11/Submit) id l8479rPu027690
for cactiuser; Tue, 4 Sep 2007 09:09:53 +0200
Date: Tue, 4 Sep 2007 09:09:53 +0200
Message-Id: <200709040709.l8479rPu027690@ct-vpn.workforce.co.za>
From: root@ct-vpn.workforce.co.za (Cron Daemon)
To: cactiuser@ct-vpn.workforce.co.za
Subject: Cron <cactiuser@ct-vpn> php /var/www/html/cacti/poller.php > /tmp/cacti.log
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/home/cactiuser>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=cactiuser>

PHP Warning: pclose(): 53 is not a valid stream resource in /var/www/html/cacti/lib/rrd.php on line 48

i dont know why it is doing that i have seen these erroe previously in the forum but cant make out where it is now

please tell me what to do next, thanks very much for all the help.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

aeby wrote:Hello gandhal,
i didnt find the second link to your signature, please can you tell me where i can find it,
You must login to see signatures. If you installed from rpm/yum/apt-get, please search /etc/cron.d/cacti
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests