Red Hat Bugzilla – Bug 593932
Allow Trap OID for SNMP notification to be overridden per-alert definition
Last modified: 2016-02-21 19:54:56 EST
Currently SNMP traps for alert notifications are emitted with the Trap OID from global settings, and the prefix for the variable binding OIDs is taken from the alert definition.
It would be nice you could specify a different Trap OID to be used for particular alert definitions.
Targeting for *consideration* for JON3.2.0, the goal being to implement PRODMGT-355. Updating severity to make sure its get triaged.
Here is James' summary which I mentioned in comment #1...
As discussed over the phone, the global OID setting and the per-alert OID setting are used for two different things. Amongst other parts, a SNMP trap contains a "Enterprise OID" which denotes where the trap came from, and a number of key-value pairs calling "variable bindings".
When JON raises a SNMP trap for an alert, it uses the OID set in the global JON settings for the Enterprise OID.
It also adds six pieces of data to the variable bindings, using the per-alert definition OID as a prefix for the keys.
For example if you have the global OID setting set to "184.108.40.206.4.1.18016.1.1" and the per-alert OID set to "220.127.116.11.4.1.18016.2.2", JON will raise a SNMP trap similar to the following (I haven't checked that the suffixes for the data are the right way around):
Enterprise OID = 18.104.22.168.4.1.18016.1.1
22.214.171.124.4.1.18016.2.2.4=<JON UI url>
So you can see it uses the global setting for the Enterprise OID for all alerts it raises, and the per-alert setting for as a prefix in the variable bindings.
Being able to override the Enterprise OID on a per-alert basis sounds like it could be useful (and I raised a feature request for it), but it is something that JON doesn't currently do.
Some things to think about during implementation:
-How to test upgrades, i.e. customers with existing snmp alerts setup, they should continue to work
-How to handle alert templates.
master - 00be4f6ba09fd8f6a1cf55a99a4fd1f6f25130d6
Snmp trap OID is set on v2c and v3 traps as the second variable binding.
In the past, users had been confused by the name of the SNMP notification parameter 'oid'. This parameter actually defines a variable binding prefix for the RHQ
Added tests for this server plugin
Added documentation to the plugin descriptor
This is in the latest brew build