|
View previous topic :: View next topic |
Author |
Message |
RRing
Joined: 16 Aug 2006 Posts: 39
|
Posted: Mon Sep 15, 2014 2:38 pm Post subject: Help Parsing SNMP Trap |
|
|
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" |
|
Back to top |
|
|
KS-Soft Europe
Joined: 16 May 2006 Posts: 2832
|
Posted: Mon Sep 15, 2014 3:59 pm Post subject: |
|
|
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: | 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)
] |
|
|
Back to top |
|
|
RRing
Joined: 16 Aug 2006 Posts: 39
|
Posted: Tue Sep 16, 2014 7:33 am Post subject: Tune Up Reply |
|
|
Thank You- The Tune up reply in your provided example works great. |
|
Back to top |
|
|
KS-Soft Europe
Joined: 16 May 2006 Posts: 2832
|
Posted: Tue Sep 16, 2014 8:12 am Post subject: |
|
|
You are welcome. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|