Discussion:
[rrd-users] Advice on a ping graph
(too old to reply)
Brian
2014-07-07 02:06:37 UTC
Permalink
I have created a rrd and script to ping 15 lan IPs every 60 seconds and am
looking for suggestions to show that information on one graph. I'm just
interested graphing an IP being up or down, not RTT or packet loss.

My first attempt was to increment a counter for the y-axis by 5 (to separate
the lines drawn for each IP) and a successful ping will get a positive number
in the GAUGE DB, and a failed ping a negative (so 5, 10, -15, 20, -25, ...).
Graphing as a LINE2 looks ok until an IP goes from down to up and the graph
connects those points.

I'm still new to rrdtool. Any advice on how to do this better? Thanks.
Steve Shipway
2014-07-07 02:16:21 UTC
Permalink
A common way to graph pings is as a floating bar, from min to max RTT, and greyout if the device is down. This can be done using MRTG/RRD/Routers2 with the mrtg-ping-probe plugin.

However you might like to investigate using smokeping as this does it all for you, if you're only interested in pings.

If you're only interested in up/down, maybe you should use a different tool, like Nagios, since while you can hold 1/0 data in RRDTool, its strengths lie in handling time-based scalar data rather than binary.

However, if you insist in using RRDTool, store 'up' as a 1 and 'down' as a 0. Then you can summarise over time periods using the normal RRDTool graph VDEFs to get percentage uptime, or total uptime in seconds.

Steve

Steve Shipway
University of Auckland ITS
UNIX Systems Design Lead
***@auckland.ac.nz
Ph: +64 9 373 7599 ext 86487
Brian
2014-07-08 01:24:55 UTC
Permalink
Hi. I hadn't heard of mrtg-ping-probe, thanks for that.

I decided just to use rrdtool and graph each host as a line every 10 digits
apart, subtracting 5 when it goes down. It's not ideal, but it works for a
home network.

Loading...