Enabling SNMP notifications for system logs

This feature enables the device to send an SNMP notification for each log message it outputs. The device encapsulates the logs in SNMP notifications and then sends them to the SNMP module and the log trap buffer.

You can configure the SNMP module to send received SNMP notifications in SNMP traps or informs to remote hosts. For more information, see "Configuring SNMP."

To view the traps in the log trap buffer, access the MIB corresponding to the log trap buffer.

To enable SNMP notifications for system logs:

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Enable SNMP notifications for system logs.

snmp-agent trap enable syslog

N/A

3. Set the maximum number of traps that can be stored in the log trap buffer.

info-center syslog trap buffersize buffersize

By default, the log trap buffer can store a maximum of 1024 traps.