< Home

snmp-agent notification-log

Function

The snmp-agent notification-log command sets the aging time of trap logs and the maximum number of trap logs that can be saved in the trap log buffer.

The undo snmp-agent notification-log command restores the default configuration.

By default, the aging time of trap logs is 24 hours, and a maximum of 500 trap logs can be saved in the trap log buffer.

Format

snmp-agent notification-log { global-ageout ageout | global-limit limit } *

undo snmp-agent notification-log { global-ageout [ ageout ] | global-limit [ limit ] } *

Parameters

Parameter Description Value
global-ageout ageout Specifies the aging time of trap logs. The value can be 0 or an integer that ranges from 12 to 36, in hours. The default value is 24. The value 0 indicates that trap logs are never aged out.
global-limit limit Specifies the maximum number of trap logs that can be saved in the trap log buffer. The value is an integer that ranges from 1 to 5000.

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

When a device sends the alarms propagated through Inform messages, the target host is required to respond with Inform ACK messages. In the following two situations, the alarms propagated through Inform messages are logged and the alarm logs are cached in the log buffer to help the target host synchronize the alarms generated in the event of host or link failures:
  • No Inform ACK message is returned when the number of times to resend the Inform message in the alarm queue reaches the set threshold.

  • Inform messages will be discarded because the number of logged Inform messages reaches the maximum that the alarm queue can support.

The maximum number of alarm logs in a log buffer is fixed (500 by default) to prevent a device from being burdened with excessive alarm logs. Alarm logs are aged periodically (24 hours by default) to ensure alarm logs remain up-to-date.

Precautions

  • Only Inform logs are saved to the log buffer; trap logs are not saved to the log buffer.
  • If notification logs in the log buffer do not need to be aged, you can 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 limit, new notification logs can still be saved but overwrites the earlier logs in the log buffer.
  • The maximum number of alarm logs specified in the snmp-agent notification-log command cannot occupy more memory than the memory occupied by the log buffer. If the size of the log buffer is excessively large, more network resources are consumed. You are therefore recommended to set the size of the log buffer to a reasonable value.

Example

# Set the aging time of trap logs to 36 hours.

<HUAWEI> system-view
[HUAWEI] snmp-agent notification-log global-ageout 36

# Set the maximum number of trap logs that can be saved in the trap log buffer to 1000.

<HUAWEI> system-view
[HUAWEI] snmp-agent notification-log global-limit 1000
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >