Automation
Automation

Scripting How-To: Raise SNMP traps using event policy

by Cordelia on ‎08-10-2015 09:19 PM - edited on ‎09-11-2017 05:41 PM by Administrator Administrator (866 Views)

To raise an SNMP trap on occurrence of an event following configuration, use the following:

 

1 [edit]
2 user@host# show event-options
3 policy <policy-name> {
4     events <event-name>;
5     then {
6         raise-trap;
7     }
8 }
9  
10 [edit]
11 user@host#

 

As per the above configuration, when a specified event occurs in the system, this policy is executed and an SNMP trap will be raised.