[mrtg] Re: Interface counter
Jerry Heidtke
jheidtke at fmlh.edu
Tue Jul 15 22:12:27 MEST 2003
Check the mrtg documentation for the fake mib objects ifAdminHack &
ifOperHack. These return 1 for up, 0 for down. So, for the active ports
on an 8 port switch, you could do something like this:
Target[count]:
ifAdminHack.1&ifOperHack.1:public at 10.20.20.254 +
ifAdminHack.2&ifOperHack.2:public at 10.20.20.254 +
ifAdminHack.3&ifOperHack.3:public at 10.20.20.254 +
ifAdminHack.4&ifOperHack.4:public at 10.20.20.254 +
ifAdminHack.5&ifOperHack.5:public at 10.20.20.254 +
ifAdminHack.6&ifOperHack.6:public at 10.20.20.254 +
ifAdminHack.7&ifOperHack.7:public at 10.20.20.254 +
ifAdminHack.8&ifOperHack.8:public at 10.20.20.254
Mind the spacing. There needs to be white space around the math
operators, and continuation lines need to be indented.
This will give you one line on the graph of the enabled ports, and the
other line of the active ports. This might get a little unwieldy for a
48 port switch, for example. See if the vendor's private mib has an
object you could use instead. Or, you could write a simple perl script
that walks .1.3.6.1.2.1.2.2.1.8 and counts how many responses equal to 1
it gets.
Jerry
-----Original Message-----
From: Chan, Wilson [mailto:wchan at co.honolulu.hi.us]
Sent: Tuesday, July 15, 2003 1:23 PM
To: MiikaT; mrtg at list.ee.ethz.ch
Subject: [mrtg] Re: Interface counter
Try doing this:
Target[count]: 1.3.6.1.2.1.2.2.1.8.101 &
1.3.6.1.2.1.2.2.1.8.101:public at 10.20.20.254
MRTG needs two OID values to graph. :)
Wilson
> -----Original Message-----
> From: MiikaT [mailto:mlist.mrtg at inlan.inmics.fi]
> I am trying to create a mrtg graph, which displays the amount of
> active switch interfaces (status=up). Is this something, which can
> be done with mrtg alone, or do I need additional software/shell
scripts
> to achieve this. So far I've tried something like this:
>
> Target[count]: 1.3.6.1.2.1.2.2.1.8.101:public at 10.20.20.254 +
> 1.3.6.1.2.1.2.2.1.
> 8.102:public at 10.20.20.254 +
1.3.6.1.2.1.2.2.1.8.103:public at 10.20.20.254 +
> 1.3.6.
> 1.2.1.2.2.1.8.104:public at 10.20.20.254
--
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
Confidentiality Notice: This e-mail message, including any attachments,
is for the sole use of the intended recipient(s) and may contain
confidential and privileged information. Any unauthorized review, use,
disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply e-mail and destroy all
copies of the original message.
--
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