[mrtg] Re: need two vars to graph ?

Mike Koch Mike.Koch at etsi.fr
Fri Feb 16 14:38:49 MET 2001


	Hello,

it's true that MRTG requires two variables if you specify in the .cfg file a
target with:
OID1&OID2:public at myrouter for example.

However, it is possible to graph only one variable if you use an external
monitoring script. This external command must return 4 lines of output:
Line1:current state of the first variable, normally 'incoming bytes count'
Line2:current state of the second variable, normally 'outgoing bytes count'
Line3:string telling the uptime of the target
Line4:string, telling the name of the target

So for monitoring one variable, only use line1 and let line2 with 0. Write a
little perl script getting the MIB OID variable you want (i will name it
GetOID.pl), and returning :
OID Value
0
0
0

and specify in the .cfg file:
Target[Name_of_variable]: `perl c:\mrtg-2.9.7\bin\GetOID.pl
OID_you_want_to_monitor`

Be careful, don't forget the backquotes!!

--
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