[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Mibble-users] retrieving names of fields in NOTIFICATION-TYPE (traps)
From: |
Hall, Matthew |
Subject: |
[Mibble-users] retrieving names of fields in NOTIFICATION-TYPE (traps) |
Date: |
Fri, 21 Jul 2006 17:01:21 -0700 |
Hello,
I am new to Mibble and I'm trying to write an extremely simple hack application
which is based on the MIB pretty printer included with the base distribution
(small 90-line current code listing attached) that will display the traps
(NOTIFICATION-TYPE), the trap OIDs, and the friendly name of the trap PDUs.
I read the documentation on the website and I tried recursively looking for and
printing out child nodes on the NOTIFICATION-TYPE nodes that would hopefully
contain the PDUs so I could run a getName() call but the trap nodes do not seem
to have any children for me to enumerate and display. Thus it's not quite clear
to me where the names of the trap PDUs are stored in the Mib and MibValueSymbol
classes.
The closest I have gotten so far produces output like the following. If I could
get the friendly names for the PDUs, I can make the rest of it work out right
with GAWK in multiline mode, so this doesn't need to be any kind of fancy
solution, nor does it need to be all that fast, either.
VALUE fnFMTrapIfChange NOTIFICATION-TYPE (
Objects: [1.3.6.1.4.1.12356.10.1, 1.3.6.1.4.1.12356.10.2,
1.3.6.1.4.1.12356.10.3, 1.3.6.1.4.1.12356.10.4]
Status: current
Description: Trap is sent to managing FortiManager if an interface
changes IP
)
::= 1.3.6.1.4.1.12356.0.100
What can I change to get the "Objects: " listing to appear with the friendly
name of the fields instead of the OIDs? Or am I going about this the wrong way?
Thanks,
Matthew Hall
P.S.: I am sorry if this question is a stupid one but I did my best.
MibPrinter.java
Description: MibPrinter.java
- [Mibble-users] retrieving names of fields in NOTIFICATION-TYPE (traps),
Hall, Matthew <=