cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Highlighted
Level 9

Trap Viewer message parsing

Jump to solution

Hi,

I'm trying to parse a trap viewer message and the variables dont appear to be working as intended.  I'm wondering if someone could help.

if i do ${MESSAGE} as a whole it comes back with:

SNMP Trap

     Received Time:2/5/2014 1:11:00 PM

Source:XXXXXXXXXXX

     Community:MPLS

     Variable Bindings

pwe3.2.1.2.1.38.1073993729:= 2

          pwe3.2.1.2.1.38.1073993729:= 2

fdryPwServiceType:= 3

snAgGblTrapMessage:= MPLS: VPLS HEcustomertest peer is down

snmpTrapOID:= FOUNDRY-SN-ROOT-MIB:pwe3.2.0.1 (1.3.6.1.4.1.1991.3.1.2.0.1)

          sysUpTime:= 228 days 21 hours 21 minutes 10.45 seconds (1977607045)

experimental.1057.1.0:= 10.0.126.4

snmpTrapEnterprise:= FOUNDRY-SN-ROOT-MIB:pwe3.2 (1.3.6.1.4.1.1991.3.1.2)

I'd like to parse out the messages as MPLS: VPLS HEcustomertest peer is down

I've tried ${snAgGblTrapMessage} and ${snAgGblTrapMessage:}

I've data is located in the trapvarbinds table in the OIDValue_Unicode field, but i can't get it to display...any ideas?

1 Solution

Accepted Solutions
Highlighted
Level 17

Re: Trap Viewer message parsing

Jump to solution

Just in case the above response wasn't clear, for your specific example

${vbName4} will give you

snAgGblTrapMessage

and

${vbData4} will give you

MPLS: VPLS HEcustomertest peer is down

View solution in original post

6 Replies
Highlighted
Level 17

Re: Trap Viewer message parsing

Jump to solution

Normally I'll paste in the condition values for some of my traps, so you can decode them.

But initially I am thinking you need the snAgGblTrapMessage portion from the ${Message}  - which I have not found a way to do.

I would see what your ${MessageType} shows.  

Looking at the DB Manager I am wondering if any of the following would work : to return more informative data.

${OIDValue_Unicode}

${RAWValue_Unicode}

${OIDValue}

${RawValue}

0 Kudos
Highlighted
Level 17

Re: Trap Viewer message parsing

Jump to solution

${vbName1} will give you the 1st trap variable's translated OID  name, ${vbData1} will give the corresponding trap variable value. Simply change 1 to the appropriate sequence number to reference the trap variable you need.

Highlighted
Level 17

Re: Trap Viewer message parsing

Jump to solution

Just in case the above response wasn't clear, for your specific example

${vbName4} will give you

snAgGblTrapMessage

and

${vbData4} will give you

MPLS: VPLS HEcustomertest peer is down

View solution in original post

Highlighted
Level 7

Re: Trap Viewer message parsing

Jump to solution

Hey, what if I want to extract only the first word of ${vbdata} ? Can that be done ?

For eg: from above text, I just need "VPLS".

0 Kudos
Highlighted
Level 17

Re: Trap Viewer message parsing

Jump to solution

HolyGuacamole that is just GRAND!

Thanks.

0 Kudos
Highlighted
Level 11

Re: Trap Viewer message parsing

Jump to solution

I've been asked to monitor an AC unit. I don't want to spend gobs of time making trap rules on this particular device and since you can't test fire these it is a bit confusing on what values are returned. If I understand correctly you will have to create a rule for each trap variable you need? Is there a way to display the variable off all the ${vbName#} and ${vbData#} to apply to all traps from a device and reframe from getting a tone of undesired information?

0 Kudos