Purpose
Command or Action
Changes the default level of syslog messages stored in the
history file and sent to the SNMP server.
logging history level
Example:
Step 2
By default,
warnings
,
errors
,
critical
,
alerts
, and
emergencies
messages are sent.
Device(config)#
logging history 3
Specifies the number of syslog messages that can be stored
in the history table.
logging history size number
Example:
Step 3
The default is to store one message. The range is 0 to 500
messages.
Device(config)#
logging history size 200
Returns to privileged EXEC mode.
end
Example:
Step 4
Device(config)#
end
Logging Messages to a UNIX Syslog Daemon
This task is optional.
Some recent versions of UNIX syslog daemons no longer accept by default syslog packets from the network.
If this is the case with your system, use the UNIX
man syslogd
command to decide what options must be
added to or removed from the syslog command line to enable logging of remote syslog messages.
Note
Before you begin
• Log in as root.
• Before you can send system log messages to a UNIX syslog server, you must configure the syslog daemon
on a UNIX server.
SUMMARY STEPS
1.
Add a line to the file /etc/syslog.conf.
2.
Enter these commands at the UNIX shell prompt.
3.
Make sure the syslog daemon reads the new changes.
DETAILED STEPS
Purpose
Command or Action
Add a line to the file /etc/syslog.conf.
Step 1
•
local7—
Specifies the logging facility.
Example:
System Management Configuration Guide, Cisco IOS XE Fuji 16.8.x (Catalyst 9500 Switches)
165
Configuring System Message Logs
Logging Messages to a UNIX Syslog Daemon