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"
Help Parsing SNMP Trap
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
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:
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)
]
Tune Up Reply
Thank You- The Tune up reply in your provided example works great.
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact: