Help: Graphs not generating

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

Moderators: Developers, Moderators

Post Reply
jeffy1983
Posts: 1
Joined: Tue Jan 13, 2009 7:23 pm

Help: Graphs not generating

Post by jeffy1983 »

Hi All,

I have CACTI up and running on my Debian machine, and its web accessable. I can configure the hosts and graphs but when I try to view the graphs they show as broken images. Looking in CACTI's data logger/SNMP history I can see values there.

Further to this, when I look at the configured hosts, they show status 'UNKNOWN' but are pingable.

I installed CACTI using 'apt-get install cacti' so it grabbed all the relevant packages to ensure its running properly.

Could someone help?

Attachment: Brokeimgs.jpg is the screen print showing what the graphs show...

hosts.JPG shows the hosts there but both are 'UNKNOWN' status.
Regards

Jeff
Attachments
Graphs showing as broken images.
Graphs showing as broken images.
brokenimgs.JPG (125.09 KiB) Viewed 3536 times
This shows both the local machine + router showing as 'STATUS UNKNOWN'
This shows both the local machine + router showing as 'STATUS UNKNOWN'
hosts.JPG (134.37 KiB) Viewed 3536 times
sdavied
Posts: 15
Joined: Mon Dec 01, 2008 2:14 pm

Post by sdavied »

Kinda acts like RRDTool isn't installed correctly. If it were me, I'd start over (since you won't lose any data anyway) and install RRDTool first. Then, run at least one of the RRDTool examples to make sure it is working correctly. Lastly, install Cacti from the tarball.

If you need more help on this, let me know. I have successfully installed Cacti/RRDTool on a Fedora 9 32-bit server and am currently transfering that installation over to a CentOS 5.2 64-bit server. On the new server, I have RRDTool running and have the Cacti installation complete. I am to the stage of transferring all the data over, so I am somewhat experienced in getting things to jive.

Scott
sdavied
Posts: 15
Joined: Mon Dec 01, 2008 2:14 pm

Post by sdavied »

Or, actually, before trashing it and starting over, check to see that Cacti has the correct path to the RRDTool binary. Go to "Settings" -> "Paths" and check that the RRDTool path is correct.
Attachments
RRDToolPath.JPG
RRDToolPath.JPG (96.73 KiB) Viewed 3517 times
morten
Posts: 9
Joined: Wed Jan 14, 2009 1:54 am

Same problem

Post by morten »

Same problen and the path to /usr/bin/rrdtool is ok.
However, I see that my version of RRDtool is 1.2.15. Could that be a problem?
How to check if RRDtool runs correctly?

Also I see that when I add a device the status become "unknown"! SNMP settings are OK because the Interface list of the Cisco router is received.

I'm new to cacti so any help is appreciated.
Any suggestions of what to try?
Thanks!
sdavied
Posts: 15
Joined: Mon Dec 01, 2008 2:14 pm

Post by sdavied »

Make sure that under "Settings -> General" you have the correct RRDTool version selected.
morten
Posts: 9
Joined: Wed Jan 14, 2009 1:54 am

Still no graph

Post by morten »

Thanks for your reply!
I've checked the version OK
Can it have something to do with user privileges or this crontab setting?

I have followed the installation at http://www.debianhelp.co.uk/cacti.htm

However the following steps below made me a little bit insecure (I have created a user called cactiuser and run the following commands as root). Is this in the crontab for root?
Where to find the rra/ and log/ ?????
******************
shell> chown -R cactiuser rra/ log/

(Enter a valid username for cactiuser, this user will also be used in the next step for data gathering.)

Add a line to your /etc/crontab file similar to:

*/5 * * * * cactiuser php /var/www/html/cacti/poller.php > /dev/null 2>&1
************************
any suggestions? Thanks
sdavied
Posts: 15
Joined: Mon Dec 01, 2008 2:14 pm

Post by sdavied »

Now that you mention it, I got mine moved over to the new server today and was not getting graphs (devices were showing down). I have the host check set to "SNMP and Ping" with ICMP ping selected. My crontab file was as you posted. I went back to my old server and compared and it had "root" as the user rather that "cacti". Try changing your crontab entry to:

*/5 * * * * root php /var/www/html/cacti/poller.php > /dev/null 2>&1

and be sure that /var/www/html/cacti/poller.php is the correct path to poller.php.

Let me know if that makes any difference.

Scott
sdavied
Posts: 15
Joined: Mon Dec 01, 2008 2:14 pm

Post by sdavied »

Normally, Cacti should be in "/usr/local/cacti" or something similar. If you aren't sure, you can search for the poller.php file by doing:

Code: Select all

#>cd /
#>find -name poller.php
That should give you some idea as to where all the files are.
morten
Posts: 9
Joined: Wed Jan 14, 2009 1:54 am

Still same problem

Post by morten »

Her is a detailed information that I hop will get somebody to put me on the right track.

In mysql the user/password is cacti/cacti for the cacti database. My debian.php file include
$database_username='cacti';
$database_password='cacti';

I have also edited etc/crontab

*/5 * * * * cacti php /usr/share/cacti/site/poller.php > /dev/null 2>&1

where the path to poller.php is correct. The file permissions for /etc/crontab
-rwxr-xr-x 1 root root 796 2009-01-15 10:56 crontab

Owner of /rra /log is changed to cacti

drwxrwx--- 2 cacti cacti 1024 2008-07-13 20:55 rra

-rw-r--r-- 1 cacti cacti 2325 2009-01-15 10:55 cacti.log
-rw-r--r-- 1 cacti cacti 33 2009-01-14 20:20 poller-error.log
-rw-r----- 1 cacti cacti 0 2009-01-14 14:38 rrd.log

However still no graph and status is "unknown". I ssupect something with file permissions for the users. Should it be root or cacti for the rra directory, and what about crontab permissions?

Error message in my log file:

01/15/2009 10:55:02 AM - SYSTEM STATS: Time:1.0728 Method:cmd.php Processes:1 Threads:N/A Hosts:1 HostsPerProcess:1 DataSources:0 RRDsProcessed:0
01/15/2009 10:55:01 AM - CMDPHP: Poller[0] ERROR: Either there are no items in the cache or polling is disabled

Thanks.
morten
Posts: 9
Joined: Wed Jan 14, 2009 1:54 am

Problem solved

Post by morten »

Working now :D

Basically the solution was to change permissions in the directories for

/log
/rra
/poller.php

using

chmod 755 *.*
chown cacti:cacti *.*
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests