PING graph not displaying any value
Moderators: Developers, Moderators
PING graph not displaying any value
Hi,
This is my first post here, and I thank the author of Cacti for having made such a cool frontend.
That said, I've got a problem with the ping graph not displaying any value.
All other charts seem to work well but "Ping latency" do not show anything but an empty grid.
I've run the perl script "ping.pl" alone and it works like a charm with the same IP as specified in Cacti..
I'm on Freebsd 5.3.
Thank you if you can help.
Nicolas.
This is my first post here, and I thank the author of Cacti for having made such a cool frontend.
That said, I've got a problem with the ping graph not displaying any value.
All other charts seem to work well but "Ping latency" do not show anything but an empty grid.
I've run the perl script "ping.pl" alone and it works like a charm with the same IP as specified in Cacti..
I'm on Freebsd 5.3.
Thank you if you can help.
Nicolas.
Last edited by nbarraud on Sun Jan 23, 2005 5:58 pm, edited 1 time in total.
No one can help me ?
I managed to look at DEBUG output and found the following 3 lines concerning ping :
Apparently it first tries to launch the perl script, and get a 'U' as output (first pb, it should be a number). I ran this script as the cacti user under a shell and it outputs the right number..
Then it creates a database, but when I look to the rra directory, that base isn't there. I suspect it not being created.
Finally it tries to update the database with the 'U'..
I managed to look at DEBUG output and found the following 3 lines concerning ping :
Code: Select all
01/23/2005 11:35:03 PM - CMDPHP: Poller[0] Host[6] CMD: perl /usr/home/serpe/www/cacti/scripts/ping.pl 163.5.253.9, output: U
Code: Select all
01/23/2005 11:35:04 PM - POLLER: Poller[0] CACTI2RRD: /usr/local/bin/rrdtool create /usr/home/serpe/www/cacti/rra/sun_serpe_org_ping_46.rrd --step 300 DS:ping:GAUGE:600:0:5000 DS:ping:GAUGE:600:0:5000 RRA:AVERAGE:0.5:1:600 RRA:AVERAGE:0.5:6:700 RRA:AVERAGE:0.5:24:775 RRA:AVERAGE:0.5:288:797 RRA:MAX:0.5:1:600 RRA:MAX:0.5:6:700 RRA:MAX:0.5:24:775 RRA:MAX:0.5:288:797
Code: Select all
01/23/2005 11:35:04 PM - POLLER: Poller[0] CACTI2RRD: /usr/local/bin/rrdtool update /usr/home/serpe/www/cacti/rra/sun_serpe_org_ping_46.rrd --template ping N:U
Another debug: I ran the poller from the command line (same user as cacti of course)
That duplicate ds name thing as probably something to do with my problem, but I don't have a clue what it means.
Code: Select all
OK u:0.00 s:0.00 r:1.01
OK u:0.00 s:0.00 r:1.01
OK u:0.00 s:0.00 r:1.02
OK u:0.00 s:0.00 r:1.02
OK u:0.00 s:0.00 r:1.02
OK u:0.00 s:0.00 r:1.02
OK u:0.00 s:0.00 r:2.03
OK u:0.00 s:0.00 r:2.03
OK u:0.00 s:0.00 r:2.03
OK u:0.00 s:0.00 r:2.03
OK u:0.00 s:0.00 r:2.03
OK u:0.00 s:0.00 r:2.03
OK u:0.00 s:0.01 r:2.04
OK u:0.00 s:0.01 r:2.04
OK u:0.00 s:0.01 r:2.04
ERROR: Duplicate DS name: ping
OK u:0.00 s:0.01 r:2.04
ERROR: opening '/usr/home/serpe/www/cacti/rra/sun_serpe_org_ping_46.rrd': No such file or directory
OK u:0.00 s:0.01 r:2.04
01/24/2005 12:02:46 AM - SYSTEM STATS: Time: 2.1243 s, Method: cmd.php, Processes: 1, Threads: N/A, Hosts: 2, Hosts/Process: 2
Well after reading a lot of messages from that board it seems like I'm experiencing the same bug as many other users.
It was thought to be related to a broken RPM but it's not.. Cause I'm on FreeBSD using the latest tar.gz from cacti.net.
Looks like this is a Cacti bug.
Anyway here is the Data Source Debug :
As you see the DS:ping statement appears 2 times.
If I delete the whole graph (with all related datas), and I re-create the ping graph, the line appears 2 times again.
I'll delete the whole mysql base and see how it performs after this.
It was thought to be related to a broken RPM but it's not.. Cause I'm on FreeBSD using the latest tar.gz from cacti.net.
Looks like this is a Cacti bug.
Anyway here is the Data Source Debug :
Code: Select all
/usr/local/bin/rrdtool create \
/usr/home/serpe/www/cacti/rra/sun_serpe_org_ping_48.rrd \
--step 300 \
DS:ping:GAUGE:600:0:5000 \
DS:ping:GAUGE:600:0:5000 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
If I delete the whole graph (with all related datas), and I re-create the ping graph, the line appears 2 times again.
I'll delete the whole mysql base and see how it performs after this.
Ok, end of story.
I completely de-installed and re-installed again and now it works, graph is shown with no duplicate DS statements and the returned ping is no more 'U', but a number..
It seems like there is some bugs left to fix in this release
It was great replying to myself I hope it will help.
Keep up with the good work.
I completely de-installed and re-installed again and now it works, graph is shown with no duplicate DS statements and the returned ping is no more 'U', but a number..
It seems like there is some bugs left to fix in this release
It was great replying to myself I hope it will help.
Keep up with the good work.
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Interesting, this is the first time that I have seen this from the ping script. Can you describe how you created the ping for the host? It is very important that we understand how you created it. Cacti is so flexible, we need to know what flex caused this reflex.
TheWitness
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?
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?
In fact there was 2 bugs:
1. ping.pl returning 'U' when launched by cron. This was my fault, I forgot to add a SHELL var to the crontab. The 'U' being the first letter of "Unknown", as in "Unknown command" or something. That's because /sbin/ in not present by default in the FreeBSD crontab.
2. That double DS in the data source. As far as I can remember, I did NOT create the ping graph under the device configuration, but under the new graph section. Take note that I think I had created other ping graphs before, and then deleted them before creating this one.
Hope it's clear enough.
1. ping.pl returning 'U' when launched by cron. This was my fault, I forgot to add a SHELL var to the crontab. The 'U' being the first letter of "Unknown", as in "Unknown command" or something. That's because /sbin/ in not present by default in the FreeBSD crontab.
2. That double DS in the data source. As far as I can remember, I did NOT create the ping graph under the device configuration, but under the new graph section. Take note that I think I had created other ping graphs before, and then deleted them before creating this one.
Hope it's clear enough.
Same issue
I seem to be having the same issue - although I do not have the 2 data sources as you saw. I checked permissions and ownership - but it only fails when cron calls it. I am also running FBSD 5.3 - when I run poller or ping.pl as my cactiuser - it works fine ... just when cron calls it ....
/usr/local/bin/rrdtool create \
/usr/local/cacti-0.8.6c/rra/h20route_ping_67.rrd \
--step 300 \
DS:ping:GAUGE:600:0:5000 \
RRA:AVERAGE:0.5:1:51840 \
RRA:AVERAGE:0.5:24:2160 \
RRA:AVERAGE:0.5:6:8736 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:1:51840 \
RRA:MAX:0.5:24:2160 \
RRA:MAX:0.5:6:8736 \
RRA:MAX:0.5:288:797 \
RRA:LAST:0.5:24:2160 \
RRA:LAST:0.5:1:51840 \
RRA:LAST:0.5:6:8736 \
RRA:LAST:0.5:288:797 \
-rw-r--r-- 1 cactiuser cactiuser 1527444 Feb 2 07:35 h20route_ping_67.rrd
02/02/2005 07:35:01 AM - CMDPHP: Poller[0] Host[2] CMD: perl /usr/local/cacti-0.8.6c/scripts/ping.pl 64.247.241.193, output: U
/usr/local/bin/rrdtool create \
/usr/local/cacti-0.8.6c/rra/h20route_ping_67.rrd \
--step 300 \
DS:ping:GAUGE:600:0:5000 \
RRA:AVERAGE:0.5:1:51840 \
RRA:AVERAGE:0.5:24:2160 \
RRA:AVERAGE:0.5:6:8736 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:1:51840 \
RRA:MAX:0.5:24:2160 \
RRA:MAX:0.5:6:8736 \
RRA:MAX:0.5:288:797 \
RRA:LAST:0.5:24:2160 \
RRA:LAST:0.5:1:51840 \
RRA:LAST:0.5:6:8736 \
RRA:LAST:0.5:288:797 \
-rw-r--r-- 1 cactiuser cactiuser 1527444 Feb 2 07:35 h20route_ping_67.rrd
02/02/2005 07:35:01 AM - CMDPHP: Poller[0] Host[2] CMD: perl /usr/local/cacti-0.8.6c/scripts/ping.pl 64.247.241.193, output: U
Crontab info
By the way - here is my crontab ... I think this should be correct (being that ping is in /sbin). If anyone sees anything wrong with this .. pls let me know.
# $FreeBSD: src/etc/crontab,v 1.32 2002/11/22 16:13:39 tom Exp $
#
SHELL=/bin/sh
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
HOME=/var/log
Thanks
# $FreeBSD: src/etc/crontab,v 1.32 2002/11/22 16:13:39 tom Exp $
#
SHELL=/bin/sh
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
HOME=/var/log
Thanks
Check where ping is using :
On a shell. Do the same thing with perl. Make sure that the obtained paths lead to the "real" ping and perl binaries (ie you can have more than one binary of the same name). Then add these paths to your crontab. Also, make sure that the user launching the crontab as the right to access the aforementioned binaries.
Code: Select all
whereis ping
i'm getting the original poster's problem too. i've been able to reproduce to a small extent. i may be including more than is necessary, but the key to reproduce is contained within (and i'm reluctant to wipe out my mysql database and start over right now since i've got history that i'm not ready to lose.)
i'm a cacti newbie so i'm probably doing things wrong.
1. add new snmp host
2. click "Management - Data Sources"
3. click add - to add a new data source
4. select "Unix - Ping Host" data template
5. select the new snmp host in the drop down
6. click create
7. click save *without filling in ip address"
-get error from data_sources.php
Notice: Undefined variable: local_data_id in /usr/share/cacti/site/data_sources.php on line 226
Notice: Undefined variable: local_data_id in /usr/share/cacti/site/data_sources.php on line 226
Warning: Cannot modify header information - headers already sent by (output started at /usr/share/cacti/site/data_sources.php:226) in /usr/share/cacti/site/data_sources.php on line 295
8. click browser's back button...you see red box saying "Error: Save Failed: Field Input Error (Check Red Fields)" and highlighting the "IP Address" field. so i fill in the field with the hostname (seems silly to have to.)
9. click "Create - New Graphs"
10. pull up the new snmp host if not already selected in drop down box
11. under "Graph Templates", select "Unix - Ping Latency" in the "Create" selection box
12. click Create
13. click Create
14. run "su - www-data -c /usr/share/cacti/site/poller.php"
15. we see a number of different problems (likely not all confined to the mess i created above.)
OK u:0.01 s:0.01 r:10.14
Usage: ping [-LRUbdfnqrvVaA] [-c count] [-i interval] [-w deadline]
[-p pattern] [-s packetsize] [-t ttl] [-I interface or address]
[-M mtu discovery hint] [-S sndbuf]
[ -T timestamp option ] [ -Q tos ] [hop1 ...] destination
OK u:0.01 s:0.01 r:11.15
ERROR: Duplicate DS name: ping
OK u:0.01 s:0.01 r:11.16
ERROR: opening '/usr/share/cacti/site/rra/stgweb03_ping_213.rrd': No such file or directory
OK u:0.01 s:0.01 r:11.16
ERROR: you must define at least one Data Source
OK u:0.01 s:0.01 r:11.16
ERROR: Not enough arguments
OK u:0.01 s:0.01 r:11.16
OK u:0.01 s:0.01 r:11.16
16. check "Data Sources" ...there are now 2 "Ping Host" entries for the host
17. check debug mode and see this:
Data Source Debug
/usr/bin/rrdtool create \
/usr/share/cacti/site/rra/stgweb03_ping_213.rrd \
--step 300 \
DS:ping:GAUGE:600:0:5000 \
DS:ping:GAUGE:600:0:5000 \
DS:ping:GAUGE:600:0:5000 \
DS:ping:GAUGE:600:0:5000 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
18. go back to data sources, delete one of the duplicates and check debug output. i get same as in #17.
19. delete last copy of "Ping Host". select bottom option to delete all graphs...
20. run the poller command. absolutely no errors now.
21. attempt to recreate graph "the normal way" now that i know better and think that i have cleaned up my system from the earlier mess.
22. click "New Graphs", select the new snmp host, select "Create: Unix - Ping Latency" in the Graph Templates
23. click create
24. click create
25. still hosed. though there is no poller error, the graph never gets drawn (added to graph trees), and the data source does not exist in the list of data sources.
not sure how to fix my system at this point short of trashing the mysql db. any ideas?
using debian sarge's installation:
||/ Name Version Description
+++-==============-==============-============================================
ii cacti 0.8.6c-7sarge2 Frontend to rrdtool for monitoring systems a
i'm a cacti newbie so i'm probably doing things wrong.
1. add new snmp host
2. click "Management - Data Sources"
3. click add - to add a new data source
4. select "Unix - Ping Host" data template
5. select the new snmp host in the drop down
6. click create
7. click save *without filling in ip address"
-get error from data_sources.php
Notice: Undefined variable: local_data_id in /usr/share/cacti/site/data_sources.php on line 226
Notice: Undefined variable: local_data_id in /usr/share/cacti/site/data_sources.php on line 226
Warning: Cannot modify header information - headers already sent by (output started at /usr/share/cacti/site/data_sources.php:226) in /usr/share/cacti/site/data_sources.php on line 295
8. click browser's back button...you see red box saying "Error: Save Failed: Field Input Error (Check Red Fields)" and highlighting the "IP Address" field. so i fill in the field with the hostname (seems silly to have to.)
9. click "Create - New Graphs"
10. pull up the new snmp host if not already selected in drop down box
11. under "Graph Templates", select "Unix - Ping Latency" in the "Create" selection box
12. click Create
13. click Create
14. run "su - www-data -c /usr/share/cacti/site/poller.php"
15. we see a number of different problems (likely not all confined to the mess i created above.)
OK u:0.01 s:0.01 r:10.14
Usage: ping [-LRUbdfnqrvVaA] [-c count] [-i interval] [-w deadline]
[-p pattern] [-s packetsize] [-t ttl] [-I interface or address]
[-M mtu discovery hint] [-S sndbuf]
[ -T timestamp option ] [ -Q tos ] [hop1 ...] destination
OK u:0.01 s:0.01 r:11.15
ERROR: Duplicate DS name: ping
OK u:0.01 s:0.01 r:11.16
ERROR: opening '/usr/share/cacti/site/rra/stgweb03_ping_213.rrd': No such file or directory
OK u:0.01 s:0.01 r:11.16
ERROR: you must define at least one Data Source
OK u:0.01 s:0.01 r:11.16
ERROR: Not enough arguments
OK u:0.01 s:0.01 r:11.16
OK u:0.01 s:0.01 r:11.16
16. check "Data Sources" ...there are now 2 "Ping Host" entries for the host
17. check debug mode and see this:
Data Source Debug
/usr/bin/rrdtool create \
/usr/share/cacti/site/rra/stgweb03_ping_213.rrd \
--step 300 \
DS:ping:GAUGE:600:0:5000 \
DS:ping:GAUGE:600:0:5000 \
DS:ping:GAUGE:600:0:5000 \
DS:ping:GAUGE:600:0:5000 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
18. go back to data sources, delete one of the duplicates and check debug output. i get same as in #17.
19. delete last copy of "Ping Host". select bottom option to delete all graphs...
20. run the poller command. absolutely no errors now.
21. attempt to recreate graph "the normal way" now that i know better and think that i have cleaned up my system from the earlier mess.
22. click "New Graphs", select the new snmp host, select "Create: Unix - Ping Latency" in the Graph Templates
23. click create
24. click create
25. still hosed. though there is no poller error, the graph never gets drawn (added to graph trees), and the data source does not exist in the list of data sources.
not sure how to fix my system at this point short of trashing the mysql db. any ideas?
using debian sarge's installation:
||/ Name Version Description
+++-==============-==============-============================================
ii cacti 0.8.6c-7sarge2 Frontend to rrdtool for monitoring systems a
lastly, on this same system that is current broken for the host in my post (stgweb03), i had first added the "Unix - Ping Latency" graph by going straight to the "Create - New Graphs", "Graph Templates -> Create: Unix - Ping Latency" method for a different host and that graph is working correctly. i purposefully repeated the mistake of going straight to "Data Sources" and doing an add to confirm the mistake in my test system. however, now i cannot fix that test system (nor my production system where i first made this mistake.)
jlg
jlg
further info.
on test system, somehow i deleted the "Unix - Ping Host" data template. the only things i deleted knowingly were the duplicate data sources "[host] - Ping Host" and the entire host when i gave up.
i'm unclear on the exact steps i took to fix the problem, but i had added the graph in "Create - New Graphs" only to find that the graph would not draw. looking somewhere under "Graph Management", i discovered that the graph had no associated data source. so i went to add the data source manually (the exact thing that broke my system before)...only to find that the "Unix - Ping Host" data template was gone. so i recreated it using the values i found for that same data template on my production system, and then created the data source and then associated with my graph and now it's working fine.
meanwhile, on my production system (where i have not done as extensive attempts at trying to clean up the mess), i find that when i add the same graph in "Create - New Graphs" and then run the poller.php command, i get the following errors:
<snip>
OK u:0.00 s:0.00 r:2.03
Usage: ping [-LRUbdfnqrvVaA] [-c count] [-i interval] [-w deadline]
[-p pattern] [-s packetsize] [-t ttl] [-I interface or address]
[-M mtu discovery hint] [-S sndbuf]
[ -T timestamp option ] [ -Q tos ] [hop1 ...] destination
OK u:0.00 s:0.00 r:3.04
<snip>
OK u:0.00 s:0.01 r:3.04
ERROR: Duplicate DS name: ping
OK u:0.00 s:0.01 r:3.04
ERROR: opening '/usr/share/cacti/site/rra/web30_ping_173.rrd': No such file or directory
OK u:0.00 s:0.01 r:3.04
<snip>
looking at data sources, i only see one entry for "[host] - Ping Host". but when looking at "Graph Management" -> "[host] - Ping Latency", the drop down box "Ping Host Data Source" has *2* entries for "[host] - Ping Host (ping)". the graph does not draw. i will attempt to fix through the gui and report back if successful.
jlg
on test system, somehow i deleted the "Unix - Ping Host" data template. the only things i deleted knowingly were the duplicate data sources "[host] - Ping Host" and the entire host when i gave up.
i'm unclear on the exact steps i took to fix the problem, but i had added the graph in "Create - New Graphs" only to find that the graph would not draw. looking somewhere under "Graph Management", i discovered that the graph had no associated data source. so i went to add the data source manually (the exact thing that broke my system before)...only to find that the "Unix - Ping Host" data template was gone. so i recreated it using the values i found for that same data template on my production system, and then created the data source and then associated with my graph and now it's working fine.
meanwhile, on my production system (where i have not done as extensive attempts at trying to clean up the mess), i find that when i add the same graph in "Create - New Graphs" and then run the poller.php command, i get the following errors:
<snip>
OK u:0.00 s:0.00 r:2.03
Usage: ping [-LRUbdfnqrvVaA] [-c count] [-i interval] [-w deadline]
[-p pattern] [-s packetsize] [-t ttl] [-I interface or address]
[-M mtu discovery hint] [-S sndbuf]
[ -T timestamp option ] [ -Q tos ] [hop1 ...] destination
OK u:0.00 s:0.00 r:3.04
<snip>
OK u:0.00 s:0.01 r:3.04
ERROR: Duplicate DS name: ping
OK u:0.00 s:0.01 r:3.04
ERROR: opening '/usr/share/cacti/site/rra/web30_ping_173.rrd': No such file or directory
OK u:0.00 s:0.01 r:3.04
<snip>
looking at data sources, i only see one entry for "[host] - Ping Host". but when looking at "Graph Management" -> "[host] - Ping Latency", the drop down box "Ping Host Data Source" has *2* entries for "[host] - Ping Host (ping)". the graph does not draw. i will attempt to fix through the gui and report back if successful.
jlg
Who is online
Users browsing this forum: No registered users and 3 guests