[mrtg] Re: Help:monitoring var

Jay Hennigan jay at west.net
Thu Dec 21 06:57:48 MET 2000

On Thu, 21 Dec 2000, manjunath ramaiah  wrote:

> I am new to mrtg .Please help me  in the following problem .
> I need to monitor the no.of bytes received by an interface . The
> interface is controlled by a snmp agent . There is a variable in the
> enterprise mib
> which gives the no of bytes received by the interface .

Is there another MIB for that interface that returns two values, both
transmit and receive?  If so, it's best to use that, and just tell MRTG
to set the MaxBytes of the one you don't want displayed to zero.

> I want to graph only this varaible . So i was givinig  only this
> variable oid
>  like OID_1:public at router  . But i came to know that it needs 2
> vars(why?)
> so i need to give OID_1&OID_2:public at router .

MRTG was designed for graphing exactly two variables, typically the
bytes received by and the bytes transmitted by a duplex interface.
This is pretty deeply embedded in things.

> This if i am correct will issue 2 consecutive snmp gets for the same
> variable
> and then take average ( which is same as OID's value )  and then plot
> the
> var.

Actually, it draws two lines (the default is a green filled area and a
blue line), one for each of the two variables.

> This  i am not able to do as the agent returns resource un
> availabe error
>  if snmp get is made consecutively . It needs some delay between to get
> requests.
> So is there any way i can specify only oid1 and get  the value for
> graphing .
> like OID_1:public at router.Also is my undrestanding correct .?

Best way:
Use an interface descriptor that shows both transmit and receive, then
MaxBytes zero the one you don't want to show.  You can use the minus
sign to flip them if you want, see the docs.

Ugly Hack:
Pick any other valid OID on the device for the second variable and
set MaxBytes2[target]:0 for that target, also null out the legend for
it. It will poll the other OID and then discard the data.  For example:

Target[foo]: OID_1&OID_<anything_that_doesn't_error>:public at router
Legend1[foo]: Bytes
LegendI[foo]: Interface xyzzy receive:

This will cause the second line to be at 0, which won't show on the

Jay Hennigan  -  Network Administration  -  jay at west.net
NetLojix Communications, Inc.  NASDAQ: NETX  -  http://www.netlojix.com/
WestNet:  Connecting you to the planet.  805 884-6323

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