More readable SNMP Trap Alert

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
eugenesoo
Posts: 1
Joined: Fri May 03, 2019 12:16 am

More readable SNMP Trap Alert

Post by eugenesoo »

Hi,

I came across the Nagios XI email alert and find the $serviceoutput$ is quite challenged to derive and understand. Please refer the sample alert below:
Image

Would appreciate if any kind soul can advise the way to break the trap into more human readable like below?
Image

Thank you!
Last edited by eugenesoo on Mon May 06, 2019 4:49 am, edited 1 time in total.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: More readable SNMP Trap Alert

Post by ssax »

It's showing you the exact content of the trap it received, there is no post processing of that trap to get it formatted in the way you'd like, you'd need to do that in the EXEC line of the trap or maybe by using the REGEX line, it really depends on if there are newlines in the trap, they are likely not in there so you will need to add them for them to display:

Code: Select all

REGEX:

[REGEX(    )(    )[i][g][e]]

Optional regular expression to perform a search and replace on the translated FORMAT / EXEC line.  Multiple REGEX (    )(    ) lines are permitted.
See here for more information:

http://snmptt.sourceforge.net/docs/snmp ... CONF-REGEX

So you can either modify the trap definition or figure out a way to parse the values out and format it the way that you want during the sending of the notification (you would need to write your own notification handler for this).

Let us know if you have any questions or if we can clarify anything for you.
Locked