Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
 

Related Documentation

 

Managing Traps and Informs

The following sections contain a few tips on managing SNMP notifications:

Generating Traps Based on SysLog Events

Event policies can include an action that raises traps for events based on system log messages. This feature 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 is no corresponding trap, into a trap. If you are using network management system traps rather than system log messages to monitor your network, you can use this feature to ensure that you are notified of all the major events.

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 following example shows the sample configuration for raising a trap for the event ui_mgd_terminate:

Generating Traps Based on SysLog Events

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

Filtering Traps Based on the Trap Category

SNMP traps are categorized into many categories. The Junos OS provides a configuration option, categories at the [edit snmp trap-group trap-group] hierarchy level, that enables you to specify categories of traps that you want to receive on a particular host. You can use this option when you want to monitor only specific modules of the Junos OS.

The following example shows a sample configuration for receiving only link, vrrp-events, services, and otn-alarms traps:

[edit snmp]trap-group jnpr {categories {link;vrrp-events;services;otn-alarms;}targets {192.168.69.179;}}

Filtering Traps Based on the Object Identifier

The Junos OS also provides a more advanced filter option that enables you to filter out specific traps based on their object identifiers. You can use the notify-filter option to filter out a specific trap or a group of traps.

The following example shows the sample configuration for excluding Juniper Networks enterprise-specific configuration management traps (note that the SNMPv3 configuration also supports filtering of SNMPv1 and SNMPv2 traps as is shown in the following example):

[edit snmp]v3 {vacm {security-to-group {security-model v2c {security-name sn_v2c_trap {group gr_v2c_trap;}}}access {group gr_v2c_trap {default-context-prefix {security-model v2c {security-level none {read-view all;notify-view all;}}}}}}target-address TA_v2c_trap {address 10.209.196.166;port 9001;tag-list tg1;target-parameters TP_v2c_trap;}target-parameters TP_v2c_trap {parameters {message-processing-model v2c;security-model v2c;security-level none;security-name sn_v2c_trap;}notify-filter nf1;}notify v2c_notify {type trap;tag tg1;}notify-filter nf1 {oid .1.3.6.1.4.1.2636.4.5 exclude;oid .1 include;}snmp-community index1 {community-name "$9$tDLl01h7Nbw2axN"; ## SECRET-DATAsecurity-name sn_v2c_trap;tag tg1;}view all {oid .1 include;}}
 

Related Documentation

 

Published: 2012-12-08

Supported Platforms

 

Related Documentation

 

Published: 2012-12-08