< Home

snmp-agent notification-log

Function

The snmp-agent notification-log command sets the aging time of alarm logs and the maximum number of alarm logs to be cached in the log buffer.

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

Format

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

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

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

Parameters

Parameter Description Value
global-ageout ageout Specifies the aging time of alarm logs. The value is 0, or ranges from 12 to 36, in hours. The default value is 24. The value 0 indicates that alarm logs will not age.
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.

Views

System view

Default Level

3: Management level

Usage Guidelines

By default, the aging time for alarm logs is 24 hours and the maximum number of alarms is 500.

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.

If the target host needs to frequently synchronize alarm logs whose aging time has expired, run the snmp-agent notification-log command to set the aging time of alarm logs and the maximum number of alarm logs to be cached in the log buffer.

Prerequisites

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.

Precautions

If alarm logs in the log buffer do not need to be aged, set the aging time of alarm logs to 0.

Example

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

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

# Set the maximum number of alarm logs to be cached in the log buffer to 1000.

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