The snmp-agent trap enable feature-name command enables the device to send a specified trap about a specified feature to the NMS.
The undo snmp-agent trap enable feature-name command restores the default trap function.
The clear configuration snmp-agent trap enable command deletes all the trap function configurations of a feature in a one-click manner.
To view the default trap configuration, run the display snmp-agent trap all command.
Parameter | Description | Value |
---|---|---|
feature-name feature-name |
Specifies the name of a feature that generates traps. |
The value is a string of 1 to 255 characters, which are case-insensitive and cannot be blank spaces. |
trap-name trap-name |
Specifies the name of a trap. |
The value is a string of 1 to 63 case-insensitive characters, spaces not supported. |
Usage Scenario
If trap-name trap-name is not specified in the snmp-agent trap enable feature-name command, the device sends all traps about a specified feature to the NMS.
The NMS can receive traps only after you run the snmp-agent target-host inform or snmp-agent target-host trap command to configure the NMS to receive SNMP traps.
To delete the trap function configurations of a feature when enabling or disabling the trap function using the snmp-agent trap enable feature-name or undo snmp-agent trap enable feature-name command, run the clear configuration snmp-agent trap enable command.
Configuration Impact
Precautions
In VS mode, this command is supported only by the admin VS.
<HUAWEI> system-view [~HUAWEI] snmp-agent trap enable feature-name snmp trap-name coldstart
<HUAWEI> system-view [~HUAWEI] snmp-agent [*HUAWEI] clear configuration snmp-agent trap enable feature-name fm