BACK

Logging to an External Server

Configuring the syslog Daemon on a UNIX syslog Server

Before you can send system log messages to a UNIX syslog server, you must configure the syslog daemon on the UNIX server.  Log in as root, and perform these steps:

Step 1 Add a line such as the following to the file /etc/syslog.conf:
user.debug      /var/log/myfile.log

Note There must be five tab characters between user.debug and /var/log/myfile.log. Refer to entries in the /etc/syslog.conf file for further examples.

The switch sends messages according to specified facility types and severity levels.  The user keyword specifies the UNIX logging facility used.  The messages from the switch are generated by user processes.  The debug keyword specifies the severity level of the condition being logged.  You can set UNIX systems to receive all messages from the switch.

Step 2 Create the log file by entering these commands at the UNIX shell prompt:
   $ touch /var/log/myfile.log
   $ chmod 666 /var/log/myfile.log
Step 3 Make sure the syslog daemon reads the new changes by entering this command:
   $ kill -HUP \Qcat /etc/syslog.pid

Before you can send system log messages to a UNIX syslog server, you must configure the syslog daemon on the UNIX server.

Configuring syslog Servers

To configure the switch to log messages to a syslog server, perform these tasks in privileged mode:
Task Command
Step 1 Add a syslog server to the configuration1. logging server ip_addr
Step 2 Enable system message logging to configured syslog servers. logging server enable
Step 3 Set the facility and severity level for syslog server messages. logging level facility severitydefault
1You can configure a maximum of three syslog servers at any time.

To delete a syslog server from the configuration, enter the clear logging server command as follows:

   Switch1# clear logging server ip_address
To disable system message logging to configured syslog server, enter the set logging server command as follows:
   Switch1# set logging server disable
BACK