Cisco Nexus 5000 Series Switch CLI Software Configuration Guide, NX-OS 4.0(1a)N1 (OL-16597-01, January 2009)

Send feedback to nx5000-docfeedback@cisco.com
25-6
Cisco Nexus 5000 Series Switch CLI Software Configuration Guide
OL-16597-01
Chapter 25 Configuring System Message Logging
Configuring System Message Logging
Table 25-2 describes the syslog fields that you can configure.
.
To configure a syslog server on a UNIX or Linux system, follow these steps:
Step 1 Log debug messages with the local7 facility in the file /var/log/myfile.log by adding the following line
to the /etc/syslog.conf file:
debug.local7 /var/log/myfile.log
Step 2 Create the log file by entering these commands at the shell prompt:
$ touch /var/log/myfile.log
$ chmod 666 /var/log/myfile.log
Step 3 Make sure the system message logging daemon reads the new changes by checking myfile.log after
entering this command:
$ kill -HUP ~cat /etc/syslog.pid~
To configure syslog servers, perform this task:
Table 25-2 syslog Fields in syslog.conf
Field Description
Facility Creator of the message, which can be auth, authpriv, cron, daemon, kern, lpr, mail,
mark, news, syslog, user, local0 through local7, or an asterisk (*) for all. These facility
designators allow you to control the destination of messages based on their origin.
Note Check your configuration before using a local facility.
Level Minimum severity level at which messages are logged, which can be debug, info,
notice, warning, err, crit, alert, emerg, or an asterisk (*) for all. You can use none to
disable a facility.
Action Destination for messages, which can be a filename, a host name preceded by the at sign
(@), or a comma-separated list of users or an asterisk (*) for all logged-in users.
Command Purpose
Step 1
switch# configure terminal
Enters configuration mode.
Step 2
switch(config)# logging server host
[severity-level [facility]]
Configures a syslog server at the specified host name
or IPv4 or IPv6 address. You can limit logging of
messages with a minimum severity level and for a
specific facility. Severity levels, which range from 0
to 7, are listed in Table 25-1. The default outgoing
facility is local7.
switch(config)# no logging server host
Removes the logging server for the specified host.
Step 3
Repeat Step 2 for up to three syslog servers.
Step 4
switch(config)# show logging server
(Optional) Displays the syslog server configuration.
Step 5
switch(config)# copy running-config
startup-config
(Optional) Copies the running configuration to the
startup configuration.