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:[EMAIL PROTECTED] +
   ifAdminHack.2&ifOperHack.2:[EMAIL PROTECTED] +
   ifAdminHack.3&ifOperHack.3:[EMAIL PROTECTED] +
   ifAdminHack.4&ifOperHack.4:[EMAIL PROTECTED] +
   ifAdminHack.5&ifOperHack.5:[EMAIL PROTECTED] +
   ifAdminHack.6&ifOperHack.6:[EMAIL PROTECTED] +
   ifAdminHack.7&ifOperHack.7:[EMAIL PROTECTED] +
   ifAdminHack.8&ifOperHack.8:[EMAIL PROTECTED]

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:[EMAIL PROTECTED] 
Sent: Tuesday, July 15, 2003 1:23 PM
To: MiikaT; [EMAIL PROTECTED]
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:[EMAIL PROTECTED]

MRTG needs two OID values to graph. :)


Wilson

> -----Original Message-----
> From: MiikaT [mailto:[EMAIL PROTECTED]


> 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:[EMAIL PROTECTED] +
> 1.3.6.1.2.1.2.2.1.
> 8.102:[EMAIL PROTECTED] +
1.3.6.1.2.1.2.2.1.8.103:[EMAIL PROTECTED] +
> 1.3.6.
> 1.2.1.2.2.1.8.104:[EMAIL PROTECTED]

--
Unsubscribe mailto:[EMAIL PROTECTED]
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:[EMAIL PROTECTED]
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

Reply via email to