> > I was wondering whether anyone has used MRTG to graph availability. > I think you > would have to use an outside script to poll the system uptime and some > how keep > track of down time over a period of time. Has anyone written a script > that does > something similar to this and would you be willing to share the script > or at > least offer some hints? Any help would be greatly appreciated. > (note: Please keep lines < 72 chars. Thanks.) Write a script that tries to ping the router. If it answers, feed 100 to mrtg, if not then feed 0. Use option gauge, play a little with the surrounding html and the labels. Perhaps use "unscaled" if you have a lot of downtime. I think you get uptime in percent this way. This is "availability" whether or not the router was actually shutdown. Other way of doing it: Find the OID for uptime (integer). Store it in a file. Next run, subtract stored value from current value. If the result > 0, this should equal the time between two runs. Feed it to mrtg and let mrtg use option absolute. (a sanity check wouldn't hurt here, in case of missing runs) If the result < 0, the router booted. Return the last read value. Mrtg still uses option absolute so it will divide the value by the time lapsed. This must be < 1 (example: uptime = 100 seconds, time inbetween runs = 300 seconds --> 100/300 up). Multiply by 100 and show in percent. You get 33% uptime from this example (in that time interval ofcourse). This doesn't mean that the router was actually doing its job during 33% Perhaps you can combine both methods ? Regards, Alex -- * To unsubscribe from the mrtg mailing list, send a message with the subject: unsubscribe to mrtg-request@list.ee.ethz.ch * The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg