< Home

snmp-agent trap enable feature-name snmp

Function

The snmp-agent trap enable feature-name snmp command enables an SNMP trap.

The undo snmp-agent trap enable feature-name snmp command disables an SNMP trap.

By default, the coldStart and warmStart traps are enabled and the authenticationFailure trap is disabled.

Format

snmp-agent trap enable feature-name snmp [ trap-name trap-name ]

undo snmp-agent trap enable feature-name snmp [ trap-name trap-name ]

Parameters

Parameter Description Value
trap-name trap-name Specifies the name of a trap.
The traps are as follows:
  • authenticationFailure
  • coldstart
  • hwsnmplockthreshold
  • hwsnmplockthresholdresume
  • warmstart

Views

System view

Default Level

2: Configuration level

Usage Guidelines

The snmp-agent trap enable feature-name snmp command is used to enable an SNMP trap. After that, the trap generated during the device running will be sent to the NMS. At present, the following SNMP traps are supported:
  • coldStart: This trap is generated when the device is powered off and restarted.
  • warmStart: This trap is generated when the status of SNMP agent is changed from disable to enable.
  • authenticationFailure: This trap is generated when a user uses an incorrect community name and is unable to log in to the device.
  • hwSNMPLockThreshold: This trap is generated when the number of users who were locked due to an authentication failure reached the upper threshold.
  • hwSNMPLockThresholdResume: This trap is generated when the number of users who were locked due to an authentication failure fell below the lower threshold.

You can run the display snmp-agent trap feature-name snmp all command to check the configuration result.

Example

# Enable the SNMP authenticationFailure trap.

<HUAWEI> system-view
[HUAWEI] snmp-agent trap enable feature-name snmp trap-name authenticationFailure
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >