[mrtg] Re: Is there an easy way to do a latency check?

Alex van den Bogaerdt alex at slot.hollandcasino.nl
Sun Feb 3 23:30:02 MET 2002


paul beard wrote:

> write it to a text file and instead of doing an snmpget as your 
> target, use `cat /path/to/yourfile.txt` as the target. this just 
> means you can't run cfgmaker: you'll need to handcode the config 
> file, but you should be able to use the sample stuff.
> 
> ping -c 2 -q somehost.com | tail -1 | awk -F/ ' { print $6 }' > 
> /var/tmp/mrtg/somehost.com
> 
> then your config file would have Target[somehost]: 
> `cat/var/tmp/mrtg/somehost.com`

Note that this approach can occasionally fail if updating this
file happens to be done at exactly the same time mrtg tries to
read it.  MRTG will then see an empty file.

There is a way to overcome this:  write to a temporary file and
when finished move this file over the previous one.

cheers,
-- 
   __________________________________________________________________
 / alex at slot.hollandcasino.nl                  alex at ergens.op.het.net \
| work                                                         private |
| My employer is capable of speaking therefore I speak only for myself |
+----------------------------------------------------------------------+
| Technical questions sent directly to me will be nuked. Use the list. | 
+----------------------------------------------------------------------+
| http://faq.mrtg.org/                                                 |
| http://rrdtool.eu.org  --> tutorial                                  |
+----------------------------------------------------------------------+

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list