[mrtg] Re: use cfgmaker to create more than line utilization .cfg's
Alex van den Bogaerdt
alex at slot.hollandcasino.nl
Fri May 4 00:36:32 MEST 2001
Tim Sheets wrote:
> Does anyone know of a utility, cfgmaker hack, something I have overlooked,
> etc... to automatically build a target for a specified MIB/OID in addition
> to the default bandwidth collection?
What about:
1) copy the mrtg.cfg file to another file
2) run that file through sed, changing "1:public at host" into
the oid you're interested in, and changing the target name
into something else
3) append the outcome of (2) to your mrtg.cfg file
For instance:
cp mrtg.cfg mrtg.copy
sed 's/: \([0-9][0-9]*\):/: ifInOctets.\1\&ifOutOctets.\1:/
s/\[\(.*\)\]/[\1_changed]/' < mrtg.copy >> mrtg.cfg
Of course you change ifInOctets and ifOutOctets in something else
and you check and double check before you take that into production.
I haven't tested it myself however it seems to produce valid results.
The sed program (Streaming EDitor) is also available for WinNT in
case you use that os!
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