This plugin forwards incoming SNMP traps as events into the RHQ server. As usual, this allows to view the data in the events tab or in the timeline view.
The plugin is still in the early stages.
How to use the snmptrapd
Install the snmptrapd plugin and go to its server entry in the Resource Hub.
If the agent has successfully deployed it, you will see an entry for it.
Connection properties
Go to the inventory page. In the connection properties you will see:

You will see three connection properties:
- port: this is the UDP port that trapd is listening on for requests. Note that on Unixoids, ports < 1024 require root access
- community: the community string to check for in incoming v1 and v2c traps – currently unused
- severityOid: this is an oid of a variable binding that defines an alert Priority. This is related to traps that are sent as result of alerts from within the RHQ alert subsystem. If a variable binding in the payload of the trap matches this oid, then the contents of the payload is parsed and the event severity is set. Matches are in lowercase:
- high: ERROR
- medium: WARN
- all other: INFO
OID translation
The plugin currently has no mib parser, so the generated event payload is passed as 'oid: value' into the events.
It is possible though to define a manual mapping. There is a file MibTrans.properties within the plugin, that maps oids to names like this:
1.3.6.1.4.1.18016.2.1.1=rhq.alert.alertName
1.3.6.1.4.1.18016.2.1.2=rhq.alert.alertResourceName
If the plugin finds a matching key, it will replace it in the event detail with the respective value.
Events generated
A generated Event could look like this for an alert that fired because of low memory:
