Re: option -i for monitor?
Dave Shield <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 2005-10-13 at 11:23 +0200, Loic Domaigne wrote:
> We're currently playing with the DISMAN-EVENT-MIB.
You should be aware that I've recently submitted a reworking
of the Event MIB, which will be included in the next "full"
release - i.e. 5.3 (rather than the upcoming 5.2.2)
This *ought* to be fully compatible with the existing
implementation, but it's only fair to mention the change.
(The current code will still be available, but you'd have
to explicitly disable the new version and re-enable this)
> A question: what does the option "-i" does?
This relates to the difference between monitoring an *instance*
(i.e. a fully-specified OID, as per snmpget) and monitoring an
*object* (which might have several instances).
> | monitor -i "proc" prErrorFlag.1 != 0
prErrorFlag.1 is a fully-qualified instance - a single value.
Hence the '-i' flag prevents the agent trying to expand it
any further. The equivalent "wildcarded" entry
monitor "proc" prErrorFlag != 0
would monitor *all* the procTable entries, and would generate
a trap if any of the error flags was set (rather than having
to list them each individually).
> whereas the same monitor without the "-i" option doesn't
> (apparently) send anything.
Hmmm.... Strictly speaking, that ought to work.
(Wildcarding a fully-qualified instance is perfectly valid).
Unfortunately, neither the old nor the new implementation
seem to handle this correctly. I'm probably not going to
have a chance to investigate this until the 5.3 pre-release
cycle starts up, but if you can remind me in a couple of
weeks, I'll have a look at it then.
I should also point out that the '-i' instance flag is
actually one of the few changes between the old and new
implementations. The new "monitor" directive uses "-o"
and "-i" to add individual wildcarded objects or exact
instances to the notification payload respectively
(something the current version can't do).
The new code will use "-I" to indicate an exact
instance test - replacing the current use of "-i".
In fact, it will actually attempt to guess whether "-i"
is meant to refer to the OID being monitored, or an
exact payload varbind. So in practise, your original
monitor command ("-i -r 20") *will* still continue to
work correctly - but the simplified version above
("-i proc") would fail.
Dave
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users