Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Notification Processing

&pagelevel(5)&pagelevel

Notifications can be forwarded on to another notification receiver, or passed to an external program for specialized processing.

traphandle OID|default PROGRAM [ARGS ...]

invokes the specified program (with the given arguments) whenever a notification is received that matches the OID token. For SNMPv2c and SNMPv3 notifications, this token will be compared against the snmpTrapOID value taken from the notification. For SNMPv1 traps, the generic and specific trap values and the enterprise OID will be converted into the equivalent OID (following RFC 2576).

Typically, the OID token will be the name (or numeric OID) of a NOTIFICATION-TYPE object, and the specified program will be invoked for notifications that match this OID exactly. However this token also supports a simple form of wildcard suffixing. By appending the character notification based within subtree rooted at the specified OID. For example, an OID token of 1.3.6.1.4.1* would match any enterprise specific notification (including the specified OID itself). An OID token of.1.3.6.1.4.1.* would work in much the same way, but would not match this exact OID - just notifications that lay strictly below this root.

Note that this syntax does not support full regular expressions or wildcards -an OID token of the form oid.*.subids is not valid.

If the OID field is the token default then the program will be invoked for any notification not matching another (OID specific) traphandle entry.

Details of the notification are fed to the program via its standard input. Note that this will always use the SNMPv2-style notification format, with SNMPv1 traps being converted as per RFC 2576, before being passed to the program. The input format is as follows, one entry per line:

HOSTNAME

The name of the host that sent the notification

IPADDRESS

The IP address of the host that sent the notification.

VARBINDS

A list of variable bindings (varbinds) describing the contents of the notification, one per line. The first token on each line (up until a space) is the OID of the varbind, and the remainder of the line is its value. The formats of both of these are controlled by the outputOption directive (or similar configuration).

The first OID should always be SNMPv2-MIB::sysUpTime.0, and the second should be SNMPv2-MIB::snmpTrapOID.0. The remaining lines will contain the payload varbind list. For SNMPv1traps, the final OID will be SNMPv2-MIB::snmpTrapEnterprise.0.

forward OID|default DESTINATION

forwards notifications that match the specified OID to another receiver listening on DESTINATION. The interpretation of OID (and default) is the same as for the traphandle directive.