The snmp-agent notification-log enable command enables the alarm logging function.
The undo snmp-agent notification-log enable command disables the alarm logging function.
By default, the SNMP agent function is disabled.
Parameter | Description | Value |
---|---|---|
global-ageout ageout |
Specifies the aging time of alarm logs in hours.. |
The value is 0, 12 to 36, in hours. By default, the value is 24. Value 0 indicates alarm logs do not age. |
minute minute |
Specifies the aging time of alarm logs in minutes. |
The value is 1 to 59, in minutes. |
global-limit limit |
Specifies the maximum number of alarm logs allowed to be cached in the log buffer. |
The value ranges from 1 to 15000. The default value is 500. |
Usage Scenario
If notification logs in the log buffer do not need to be aged, set the aging time of these notification logs to 0.
If the number of notification logs saved to the log buffer within the aging time exceeds the upper limit, new notification logs can still be saved but overwrites the earlier logs in the log buffer.
To enable the alarm logging function, run the snmp-agent notification-log enable command.
An alarm can be propagated using either of the following types of messages:
Only the alarms propagated using Inform messages are to be logged. The alarms propagated using trap messages are not logged.
The alarms propagated using Inform messages are logged only when the following conditions are met:
Configuration Impact
If the size of the log buffer is excessively large, more network resources are consumed. In this case, reduce the size of the log buffer.
Only Inform logs are saved to the log buffer, and trap logs are not saved to the log buffer.
<HUAWEI> system-view [~HUAWEI] snmp-agent notification-log global-ageout 36
<HUAWEI> system-view [~HUAWEI] snmp-agent notification-log global-limit 1000
<HUAWEI> system-view [~HUAWEI] snmp-agent notification-log enable