Let's suppose we have the following event definition for a particular SNMP Trap:
The numeric value of the parameter number 1 is going to be translated to its human readable representation, according with the varbindsdecode.
If this trap comes in, the log message is translated to something like the following:
As you can see %parm#1% appears as active(6) instead of just the numeric value (i.e. 6)
Let's say you need a notification for this event, and you define something like the following:
The reason for this is having a Non-HTML content for the subject and the message on the Notification's Email, and that's why we cannot use the logmsg or the description from the event directly.
The expected result for the subject is something like this:
Unfortunately, the received email shows:
In other words, the varbindsdecode works if you use them inside the event's logmsg or the event's description, but they won't work if you use them on notifications.
The solution for foundation lives on the following branch: jira/NMS-7598-foundation (created from origin/foundation).
Alejandro Galue April 6, 2015 at 2:38 PM
Porting the solution to foundation is a little bit tricky because Notifd is not managed by Spring on foundation. That means, it requires to have its own copy of DefaultEventConfDao or use BeanUtils to grab an instance of it.
For now, I ended up with the easiest solution. The problem is that if the event configuration is changed, you must tell Notifd to reload its copy of the EventConf.
Alejandro Galue April 6, 2015 at 11:14 AM
Fixed on revision 94838e42d33315e43845eefb54ced45d190f01a7 for develop. Cherry-picked on revision 19f1c8691a7fc497d87c473886c6913edf26a1d5 for release-15.0.2
Let's suppose we have the following event definition for a particular SNMP Trap:
The numeric value of the parameter number 1 is going to be translated to its human readable representation, according with the varbindsdecode.
If this trap comes in, the log message is translated to something like the following:
As you can see %parm#1% appears as active(6) instead of just the numeric value (i.e. 6)
Let's say you need a notification for this event, and you define something like the following:
The reason for this is having a Non-HTML content for the subject and the message on the Notification's Email, and that's why we cannot use the logmsg or the description from the event directly.
The expected result for the subject is something like this:
Unfortunately, the received email shows:
In other words, the varbindsdecode works if you use them inside the event's logmsg or the event's description, but they won't work if you use them on notifications.