296
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 "
."
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
By default, the device does not
send SNMP notifications for
system logs.
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.
Displaying and maintaining information center
Execute
display
commands in any view and
reset
commands in user view.
Task
Command
Display the information of each output destination.
display info-center
(In standalone mode.) Display the state and the log
information of the log buffer.
display
logbuffer
[
reverse
] [
level
severity
|
size
buffersize
|
slot
slot-number
] *
(In IRF mode.) Display the state and the log
information of the log buffer.
display
logbuffer
[
reverse
] [
level
severity
|
size
buffersize
|
chassis
chassis-number slot
slot-number
] *
(In standalone mode.) Display a summary of the log
buffer.
display
logbuffer
summary
[
level
severity
|
slot
slot-number
] *
(In IRF mode.) Display a summary of the log buffer.
display
logbuffer
summary
[
level
severity |
chassis
chassis-number
slot slot-number
] *
Display the log file configuration.
display
logfile
summary
Display the diagnostic log file configuration.
display
diagnostic-logfile
summary
Clear the log buffer.
reset
logbuffer
Information center configuration examples
Configuration example for outputting logs to the console
Network requirements
Configure the device to output to the console FTP logs that have a severity level of at least
warning
.