PING availability CACTI graphs

A lot of people are interested in the availability in a graph, well there’s a script for that! It looks the same way as smokeping. With this graph i monitor my internet connections because i had a lot of downtime and I was interested to find a trend.

The ping script is bases on a separate PHP script which you need to call from CACTI, this script gives output and the output is graphed by CACTI.

First lets download the files PING cacti php and xml extract the files to a location. There are 3 files located in this zip file which are nessasary.

  1. ping.php needs to be overwritten with the downloaded one (on a Synology only!) because the Synology does not allows us to call the correct functions. Move this ping.php file to \cacti\lib
  2. ss_fping.php needs to be overwritten with the downloaded one if there is already a script. \cacti\scripts
  3. cacti_graph_template_ping_-_advanced_ping_2_2.xml needs to be imported by CACTI by the import template on the left column.

Next we need to add a device and make sure you can ping it on forehand ;-)

Choose from “assosiated graphs templates” the ping script and add it, now press the upper right “create graphs” It would ask you settings as ICMP / 20 but you can leave them default.

Under graph management we can find the just added graph, lets wait for 2 poller intervals (10minutes) and see if it works. If its displaying graphs SSH to your Synology and run this command from the CLI:

DiskStation> /usr/bin/php /volume1/web/cacti/scripts/ss_fping.php
min:14.0800 avg:15.1617 max:15.8300 dev:0.5419 loss:0.0000

It should report output and no errors, if your getting output the second step is to check if the CACTI poller also receives the output.

In settings set log level to debug and wait 5 minutes for the next poller interval, next go to system utilities and view cacti log file. Search for ss_fping and you should see output.

One other thing you can check is under graph management and search the graph, click on it and in the upper right corner click debug. It should give a RRDtool tool output which should be terminated with OK.




7 thoughts on “PING availability CACTI graphs”

  1. Thanks! I’ve downloaded and installed the files. I’ve got things graphing but no matter what host I use – or – I get 100% packet loss. I’ve looked in the cacti error files and all that shows up is a warning that argument 10 for get_snmp() is not provided. I’m not sure how to go about debugging this. Any suggestions would be helpful… Cheers jas…

    1. Same here, 100% packet loss and when I try to exec the php from the command line I get

      root@server:/# php /usr/share/cacti/site/scripts/ss_fping.php ss_fping
      PHP Warning: Division by zero in /usr/share/cacti/site/scripts/ss_fping.php on line 97

      Warning: Division by zero in /usr/share/cacti/site/scripts/ss_fping.php on line 97
      min:9999.9900 avg:0.0000 max:0.0000 dev:0.0000 loss:102.2727

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>