Use undo snmp-agent trap life to restore the default notification lifetime.
Syntax
snmp-agent trap life seconds
undo snmp-agent trap life
Default
SNMP notification lifetime is 120 seconds.
Views
System view
Predefined user roles
network-admin
Parameters
seconds: Sets a lifetime in seconds, in the range of 1 to 2592000.
Usage guidelines
When congestion occurs, the SNMP agent buffers notifications in a queue. The notification lifetime
sets how long a notification can stay in the queue. A trap is deleted when its lifetime expires.
Examples
# Set the SNMP notification lifetime to 60 seconds.
<Sysname> system-view
[Sysname] snmp-agent trap life 60
Related commands
•
snmp-agent target-host
•
snmp-agent trap enable
•
snmp-agent trap queue-size
snmp-agent trap log
Use snmp-agent trap log to enable SNMP notification logging.
Use undo snmp-agent trap log to disable SNMP notification logging.
Syntax
snmp-agent trap log
undo snmp-agent trap log
Default
SNMP notification logging is disabled.
Views
System view
Predefined user roles
network-admin
Usage guidelines
Use SNMP notification logging to record SNMP notifications sent by the SNMP agent for notification
tracking. The SNMP agent sends logs to the information center. You can configure the information
center to output the logs to a destination as needed.
145