cacti not showing graphs...

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

Moderators: Developers, Moderators

Post Reply
wapajun
Posts: 6
Joined: Fri Aug 14, 2009 2:22 am
Location: Austria

cacti not showing graphs...

Post by wapajun »

i got a pretty strange problem here and i hope that someone can help me.
the crontab for polling with spine is running just fine.
also i saw on the router that i was trying to poll (and ofc i tried also other devices) that there was snmp traffic coming from the cacti server. Oo
But, however, the graphs stay empty, and only say "nan" on things.
Some graphs are even not created at all:

Code: Select all

RRDTool Command:
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Localhost - Processes" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="processes" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/opt/lampp/htdocs/cacti/rra/localhost_proc_7.rrd":proc:AVERAGE \
AREA:a#F51D30FF:"Running Processes"  \
GPRINT:a:LAST:"Current\:%8.0lf"  \
GPRINT:a:AVERAGE:"Average\:%8.0lf"  \
GPRINT:a:MAX:"Maximum\:%8.0lf\n"

RRDTool Says:
ERROR: opening '/opt/lampp/htdocs/cacti/rra/localhost_proc_7.rrd': No such file
 or directory
While i already saw others having this problem on the web, i wasnt able to solve it with the topics i found on the web. I also tried to use poller.php as poller already, but didnt work either, so i am back to spine and want to get it working with that. I hope that someone can give useful information on how to solve this. Thanks in advance for any help!
charlesdf23
Cacti User
Posts: 77
Joined: Thu Nov 13, 2008 2:30 pm

Post by charlesdf23 »

have you verified that opt/lampp/htdocs/cacti/rra exists? Have you also checked the permissions of that directory?

Is there anything in the cacti.log relating to this?
wapajun
Posts: 6
Joined: Fri Aug 14, 2009 2:22 am
Location: Austria

Post by wapajun »

Thanks for your answer, charlesdf23.
Yes, the rra-folder exists.
I did not find anything really related in the cacti.log-file, but i attached it anyways.

Here are the exact permissions of it:

Code: Select all

drwxrwxrwx 2 cacti  cacti    4096 Aug 13 21:07 rra
/var/log/cron

Code: Select all

Aug 14 20:45:01 centos-wapaintern crond[3663]: (cacti) CMD (/usr/bin/spine > /dev/null 2>&1)
cacti.log with Developer Logging Level enabled:
http://is.gd/2gZF0
taliz
Posts: 22
Joined: Tue Feb 03, 2009 10:38 am

Post by taliz »

Cron should run poller.php no matter if you use spine or cmd.php.
wapajun
Posts: 6
Joined: Fri Aug 14, 2009 2:22 am
Location: Austria

Post by wapajun »

thanks for the answer taliz.

I changed the line in crontab:

Code: Select all

*/5 * * * * cacti /opt/lampp/bin/php-5.2.9 /opt/lampp/htdocs/cacti/poller.php > /dev/null 2>&1
However, as expected, this did not change/solve the problem at all. :(

Any further advices are welcome!
wapajun
Posts: 6
Joined: Fri Aug 14, 2009 2:22 am
Location: Austria

Post by wapajun »

The rrd-files are now correctly created in the rra-folder by the poller it seems.
However the graphs all only show "nan" for data.
Any suggestions on this?
taliz
Posts: 22
Joined: Tue Feb 03, 2009 10:38 am

Post by taliz »

wapajun wrote:thanks for the answer taliz.

I changed the line in crontab:

Code: Select all

*/5 * * * * cacti /opt/lampp/bin/php-5.2.9 /opt/lampp/htdocs/cacti/poller.php > /dev/null 2>&1
However, as expected, this did not change/solve the problem at all. :(

Any further advices are welcome!
If you hadn't done that it would never work.
Now you need to submit the logs from one poller run(debug level is sufficient), and also the output from graph debug(go to graph management, select a graph and then "turn on graph debugging").
wapajun
Posts: 6
Joined: Fri Aug 14, 2009 2:22 am
Location: Austria

Post by wapajun »

I got things working now. Seems that it has to do with the fact that i am now running spine in cron as root. This way it can access the raw sockets and send tcp icmp pings (or such, i think it is something in this direction). One of the Routers accepted the udp-Pings too and so i saw, that with udp-ping as on/down-detection, the graphs showed. Now it works with icmp-Pings too. Now everything is working like it should. This is what i mostly faced when setting up cacti in the past:
It can be a bitch to setup and get it running, but if it is running, it runs fine.
Thanks for all answers.

greetings
taliz
Posts: 22
Joined: Tue Feb 03, 2009 10:38 am

Post by taliz »

wapajun wrote:I got things working now. Seems that it has to do with the fact that i am now running spine in cron as root. This way it can access the raw sockets and send tcp icmp pings (or such, i think it is something in this direction). One of the Routers accepted the udp-Pings too and so i saw, that with udp-ping as on/down-detection, the graphs showed. Now it works with icmp-Pings too. Now everything is working like it should. This is what i mostly faced when setting up cacti in the past:
It can be a bitch to setup and get it running, but if it is running, it runs fine.
Thanks for all answers.

greetings
Good that you got it going, but that doesn't sound right. Something is wrong with your setup if you need to run as root..
Cacti is easy to setup, you just need to do it correctly.
wapajun
Posts: 6
Joined: Fri Aug 14, 2009 2:22 am
Location: Austria

Post by wapajun »

taliz wrote:Good that you got it going, but that doesn't sound right. Something is wrong with your setup if you need to run as root..
Cacti is easy to setup, you just need to do it correctly.
From what i know now it worked for some hosts because they accepted udp ping packets that cacti sent for downed host detection.
Others did not, they failed.
The fact that cacti didnt do icmp pings when told to do, only happens when not running cacti as root.

digging around a a bit on the forums i found quite a few postings about that.

"You only need to run as root if you require ICMP pings, or if you didn't correctly setup permissions for the other user to write to the specific directories cacti needs."
gandalf wrote:There are multiple reasons for this. Mostly, the "downed host detection" for that host failed. This is a "per host" setting. E.g. if you selected PING method and are not running as root, ping will fail (always fails due to lack of permissions) and no rrd files will be created.
Reinhard
And it looks like this does not affect all systems, which is pretty strange.
On Ubuntu's i never saw a problem like this either. However, it could also simply be that i had working udp downed host detection pings there.

Maybe someone could enlighten this a bit?
I dont 100% understand this. ^^
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Unfortunately, some distro dependant information is required to answer. I currently only run cacti on Fedora so I'm biased. But I want to tackle Ubuntu soon (still my LVM based Ubuntu setup fails on 9.04) to dive deeper into that.
There have been a multitude of posts around this topic for Ubuntu that may enlighten you.
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests