Configuring Event Policies to Raise SNMP Traps

SNMP traps enable an agent to notify a network management system (NMS) of significant events by way of an unsolicited SNMP message. You can configure an event policy action that raises traps for events based on system log messages. This enables notification of an SNMP trap-based application when an important system log message occurs. You can convert any system log message (for which there are no corresponding traps) into a trap. This is valuable if you use NMS traps rather than system log messages to monitor your network.

To configure a policy that raises a trap on receipt of an event, include the following statements at the [edit event-options policy policy-name] hierarchy level:

[edit event-options policy policy-name]events [ events ];then {raise-trap;}

The MIB (jnx-syslog.mib) supports this policy action. For more information, see the Junos SNMP MIBs and Traps Reference.

For a configuration example, see Example: Raising an SNMP Trap in Response to an Event.