Help Parsing SNMP Trap

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
RRing
Posts: 39
Joined: Wed Aug 16, 2006 9:14 am

Help Parsing SNMP Trap

Post by RRing »

I am trying to format the tune up reply value of a received Trap and grab the Details and IP address of the sent trap, but cannot get the format correct. when I set the SNMP Tune UP Reply to %TrapAllValues% I receive the following format
1.3.6.1.4.1.2879.2.8.1.1.1.1.1.0 = 4272488803<cr> 1.3.6.1.4.1.2879.2.8.1.1.1.1.2.0 = 2<cr> 1.3.6.1.4.1.2879.2.8.1.1.1.1.3.0 = 9495<cr> 1.3.6.1.4.1.2879.2.8.1.1.1.1.4.0 = 9/15/2014 8:31:57 PM<cr> 1.3.6.1.4.1.2879.2.8.1.1.1.1.5.0 = Event log type DBG is filling up in less than 3 hours, please check content of file and logging level<cr> 1.3.6.1.4.1.2879.2.8.1.2.1.4.1.7.0 = DBG<cr> 1.3.6.1.4.1.2879.2.1.7.2.2.4.1.0 = 10.10.10.10<cr> 1.3.6.1.4.1.2879.2.1.7.2.2.4.3.0 = 1<cr> 1.3.6.1.4.1.2879.2.1.7.2.2.4.4.0 = <cr> <cr> <
is it Possible to extract the string values for lets say the Event and IP address ?
such as
"Event log type DBG is filling up in less than 3 hours, please check content of file and logging level"
and
"10.10.10.10"
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

Not sure what exactly do you mean by "extract the string values".
If you need Reply like:
IP=10.10.10.10 MSG=Event log type DBG is....
Then you may try "Tune up Reply value" option with expression like the following:

Code: Select all

IP=[
substr('%TrapAllValues%',indexof('%TrapAllValues%','1.3.6.1.4.1.2879.2.1.7.2.2.4.1.0 = ')+35 ,indexof('%TrapAllValues%','1.3.6.1.4.1.2879.2.1.7.2.2.4.3.0')-indexof('%TrapAllValues%','1.3.6.1.4.1.2879.2.1.7.2.2.4.1.0')-40)
]
 MSG=[
substr('%TrapAllValues%',indexof('%TrapAllValues%','1.3.6.1.4.1.2879.2.8.1.1.1.1.5.0 = ')+35 ,indexof('%TrapAllValues%','1.3.6.1.4.1.2879.2.8.1.2.1.4.1.7.0')-indexof('%TrapAllValues%','1.3.6.1.4.1.2879.2.8.1.1.1.1.5.0')-40)
]
RRing
Posts: 39
Joined: Wed Aug 16, 2006 9:14 am

Tune Up Reply

Post by RRing »

Thank You- The Tune up reply in your provided example works great.
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

You are welcome.
Post Reply