[mrtg] How can I invert a packet loss graph?

Steve Shipway s.shipway at auckland.ac.nz
Wed Aug 11 00:45:15 CEST 2010

Since the mrtg-ping-probe plugin returns percentage loss, all you have to do is 100-x to get percentage success.

There are two ways to do this!

1.       Target[]: 100 - `/usr/bin/mrtg-ping-probe -t 42 -p loss/loss`
This will simply store 100-x (percentage success) in the RRD.  Of course this means you lose your history.

2.       Since you are using routers2.cgi, you also have the option to do:
routers2.cgi*Options[]: reverse
This will allow you to keep your history and continue to store percentage loss, but to display MaxBytes-x.  Probably this is the best solution for you.

Note that in both cases, you'll need to change your various labels for the axis and legend.  Also, note that routers2 will recognise the mrtg-ping-probe plugin and may default to displaying the data as a floating bar, if you're graphing min/max RTT data.  If this is unwanted, look at using the routers.cgi*GraphStyle[]:normal directive.


Steve Shipway
ITS Unix Services Design Lead
University of Auckland
Floor 2, 58 Symonds Street
09 3737599 ext 86487

From: mrtg-bounces+s.shipway=auckland.ac.nz at lists.oetiker.ch [mailto:mrtg-bounces+s.shipway=auckland.ac.nz at lists.oetiker.ch] On Behalf Of Rob Dover

I have a config that I use for measuring packet loss that I would like to essentially invert and turn into an availability graph.
The config I have displays an outage in RED. I would like the availability graph to display in GREEN when pings are successful.
How would I go about this?

Target[]: `/usr/bin/mrtg-ping-probe -t 42 -p loss/loss`

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/mrtg/attachments/20100810/04d6b9c6/attachment.htm 

More information about the mrtg mailing list