[mrtg] ifOperHack/ifAdminHack

Calvert, Neil ncalvert at GlobalNTS.com
Thu Oct 5 03:56:40 MEST 2000


 Very glad it proved useful.

ifOperHack and ifAdminHack are mentioned in the MRTG documentation - Tobi
actually made MRTG understand the ifOperStatus and ifAdminStatus OIDs and
behave in a certain way. ifAdminHack and ifOperHack are not OIDs that you
will find in a SNMP Browser. They are just variables for MRTG to go to a
device, query ifAdminStatus and ifOperStatus, and make some sense of the
results.

You see, the standard way for these 2 OIDs (ifAdminStatus and ifOperStatus)
to behave is they can have more than one value - 0 means down, 1 means up,
and 2 means disabled, for example.

But in real life if you are graphing up/down status, you want 2 settings -
either the device is passing user data (reports 1) or it is not (will report
either 0 or 2). So what MRTG does is if it receives any value from these
OIDs that is not 1, it assumes that is 0 and treats it as such.

in a target line this would look like (not at my desk so quoting from
memory, bear with me)

target[blah]: ifAdminHack.1&ifOperHack.1:public at my.router

to get up/down graph for port 1 of my.router

hope this helps

Neil


-----Original Message-----
From: Dave Jones
To: 'ncalvert at globalnts.com'
Sent: 10/4/00 3:27 PM
Subject: Your MRTG Doc

THANK YOU!!!!  You did a wonderful job, EXTREMELY helpful for a
begginner in
this.  I do have one question for you and if you don't have time to
answer,
I understand.  I am trying to monitor an interface up/down status and
used
your example with perfect success.  However, this was in your
documentation:

Target[CSX_eth_status_Port_1]:
ifOperHack.1&ifAdminHack.1:public at 10.10.10.10
As before, here's the Target line. In this case we are calling the
target
CSX_eth_status_Port_1. This is fairly long but is meaningful so its
helpful
if you have to debug later and can't remember what this section dealt
with.
The value of the variable is a special case. 'ifOperHack' and
'ifAdminHack'
are MRTG internal variables. They return 1 if the MIB variable is one
and 0
when it is not. This is required since in MIB-2, the MIB Objects
ifAdminStatus and ifOperStatus can have more values than one and zero.
But
in practice, if it's not one, it's down, or not passing traffic. So we
graph
'1' as '1', and 'anything else' as '0'

Where did you get the ifOperhack.1&ifAdminHack.1??  I downloaded getif
and
working through it, the closest I could come was ifOperStatus and this
wouldn't work.

Thank you for your time and your wonderful document.

David Jones
Network Engineer
CCNA, CCDA, CNA, MCP
Attorney's Title Insurance Fund, Inc.
Phone - 407-240-3863 x7634
Fax - 407-816-3609
djones at thefund.com


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