Missing Graphs for Ping

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

Moderators: Developers, Moderators

Post Reply
EDEV
Posts: 5
Joined: Thu Jan 15, 2015 12:00 pm

Missing Graphs for Ping

Post by EDEV »

I am having trouble having a graph update and I am not quite sure where the problem is. I think CACTI CAN get data, (sources lists PING values) but I suspect it's not.

I am just creating a test device and using PING. I am not sure what the "nan" means. I suspect it means it's lacking data.

From graphs... RRDTOOL claims everything is ok...

Thoughts?

Thanks!

Creating a device
description: test
hostname: 192.168.2.24
Downed Device Detection PING
Ping Method: ICMP PING
Associate Graph Templates
1) Unix - Ping Latency Status(Is Being Grraphed)

cd /var/lib/cacti/rra
rrdtool fetch test_ping_15.rrd

Lists
..
1421336100: -nan
1421336400: -nan
1421336700: -nan
1421337000: -nan
1421337300: -nan
1421337600: -nan
1421337900: -nan

From System Utilities...

Script: perl /usr/share/cacti/site/scripts/ping.pl 192.168.2.24
RRD: /var/lib/cacti/rra/test_ping_15.rrd

Under data sources cacti lists...
test 4 1 1 Up - 192.168.2.24 1.23 1.23 100

From graphs....
RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start='-86400' \
--end='-300' \
--title='test - Ping Latency' \
--base='1000' \
--height='120' \
--width='500' \
--alt-autoscale-max \
--lower-limit='0' \
--vertical-label='milliseconds' \
--slope-mode \
--font TITLE:10: \
--font AXIS:7: \
--font LEGEND:8: \
--font UNIT:7: \
DEF:a='/var/lib/cacti/rra/test_ping_15.rrd':'ping':AVERAGE \
AREA:a#FFF200FF:'' \
GPRINT:a:LAST:'Current\:%8.2lf %s' \
GPRINT:a:AVERAGE:'Average\:%8.2lf %s' \
GPRINT:a:MAX:'Maximum\:%8.2lf %s\n'

RRDTool Says:

OK
cigamit
Developer
Posts: 3376
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: Missing Graphs for Ping

Post by cigamit »

You need to first set your Cacti logging to Medium, and see what results are being returned.
EDEV
Posts: 5
Joined: Thu Jan 15, 2015 12:00 pm

Re: Missing Graphs for Ping

Post by EDEV »

Ok.. I will post data from the LOG and from an rrdtool dump...

It would seem the POLLER is running every 5 minutes (the default) like clock work and at least logs the call and the results.

However the rrdtool dump command would tend to make me think that this data never made it to the RRD file. I note the time stamps from the dump list previous days and no entries for today (the 15th) despite the fact that they logs showing that PING.PL is being called every 5 minutes.....

I am guessing I am missing something that glues and posts the data into the RRD file?

Thoughts?

01/15/2015 02:00:01 PM - CMDPHP: Poller[0] Host[4] DS[15] CMD: perl /usr/share/cacti/site/scripts/ping.pl 192.168.2.24, output: 1.04
01/15/2015 01:55:02 PM - CMDPHP: Poller[0] Host[4] DS[15] CMD: perl /usr/share/cacti/site/scripts/ping.pl 192.168.2.24, output: 1.32
01/15/2015 01:50:01 PM - CMDPHP: Poller[0] Host[4] DS[15] CMD: perl /usr/share/cacti/site/scripts/ping.pl 192.168.2.24, output: 1.06

rrdtool dump test_ping_15.rrd

<!-- 2015-01-11 19:00:00 EST / 1421020800 --> <row><v>NaN</v></row>
<!-- 2015-01-12 19:00:00 EST / 1421107200 --> <row><v>NaN</v></row>
<!-- 2015-01-13 19:00:00 EST / 1421193600 --> <row><v>NaN</v></row>
<!-- 2015-01-14 19:00:00 EST / 1421280000 --> <row><v>NaN</v></row>
</database>
</rra>
</rrd>
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: Missing Graphs for Ping

Post by BSOD2600 »

EDEV wrote:I am guessing I am missing something that glues and posts the data into the RRD file?
Look in cacti.log (might need to increase logging level) for where the rrdtool update commands are executed. Look for the rrd file used by DS[15]
EDEV
Posts: 5
Joined: Thu Jan 15, 2015 12:00 pm

Re: Missing Graphs for Ping

Post by EDEV »

BSOD2600 (Or anyone)

The line...
01/15/2015 01:50:01 PM - CMDPHP: Poller[0] Host[4] DS[15] CMD: perl /usr/share/cacti/site/scripts/ping.pl 192.168.2.24, output: 1.06
is from the "cacti.log" file as found under System Utilities -> "View Cati Log File"

I am guessing that this means the system is executing the "ping.pl" script, a result is being generated I just don't know how to make sure it ends up in the "test_ping_15.rrd" file.

I can get the script which generates a number between 1-10 to run and it logs and generates a graph. I would have thought that task would be harder so I just wonder if I am not missing a step.

Thoughts?
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: Missing Graphs for Ping

Post by BSOD2600 »

re-read my reply above.
1) increase cacti.log logging level
2) look for 'rrdtool update' command for the rrd file associated to that ping script data source.
EDEV
Posts: 5
Joined: Thu Jan 15, 2015 12:00 pm

Re: Missing Graphs for Ping

Post by EDEV »

BSOD2600:

Thanks... Any help you can shed is a real help. :-)

I didn't clarify... and I made a change since my last post... a couple as I keep banging away.

I set the logging to: DEBUG - Statstics, Errors, Results, I/O and Program Flow

01/19/2015 04:55:01 PM - SYSTEM STATS: Time:0.1135 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:1 RRDsProcessed:1
01/19/2015 04:55:01 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/lib/cacti/rra/test_ping_22.rrd --template out_ms 1421704501:1.25
01/19/2015 04:55:01 PM - CMDPHP: Poller[0] Time: 0.0182 s, Theads: N/A, Hosts: 1
01/19/2015 04:55:01 PM - CMDPHP: Poller[0] Host[7] DS[22] CMD: perl /usr/share/cacti/site/scripts/ping.pl 192.168.2.24, output: 1.25
01/19/2015 04:55:01 PM - CMDPHP: Poller[0] Host[7] PING: ICMP Ping Success (2.150 ms)
01/19/2015 04:55:01 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /usr/bin/php, ARGS: -q --define suhosin.memory_limit=512M "/usr/share/cacti/site/cmd.php" 0 7]
01/19/2015 04:55:01 PM - POLLER: Poller[0] NOTE: Poller Int: '300', Cron Int: '300', Time Since Last: '300', Max Runtime '298', Poller Runs: '1'

You will note straight away that this is now test_ping_22.rrd so as I mentioned above there have been a few iterations of this thing.

BTW, should I be graphing "ping" or "out_mms"? I have chosen "out_mms" in my latest revision. I will keep this VM in place and spawn off a copy or re-install.

I can do a rrdtool dump test_ping_22.rrd > out.5 at the top it will give a last update of 1421705101
When I went I looked at the file I see

<!-- 2015-01-19 16:50:00 EST / 1421704200 --> <row><v>NaN</v></row>
<!-- 2015-01-19 16:55:00 EST / 1421704500 --> <row><v>NaN</v></row>
<!-- 2015-01-19 17:00:00 EST / 1421704800 --> <row><v>NaN</v></row>
<!-- 2015-01-19 17:05:00 EST / 1421705100 --> <row><v>NaN</v></row>

I am probably doing something really bone head stupid ... I just don't see it yet.

Thanks!
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: Missing Graphs for Ping

Post by BSOD2600 »

you should be using "out_ms" data source, it appears.
Is test_ping_22.rrd modify date/time getting updated every 5 minutes?
check the permissions in /var/lib/cacti/rra/ are correct per the installation guide in http://docs.cacti.net/
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests