Configuration procedure – H3C Technologies H3C MSR 50 User Manual

Page 217

Advertising
background image

Figure 61 Network diagram

Configuration procedure

 

Before the configuration, make sure the device and the log host can reach each other. (Details not

shown.)

1.

Configure the device:
# Enable the information center.

<Sysname> system-view

[Sysname] info-center enable

# Specify the host 1.2.0.1/16 as the log host, use the channel loghost to output log information,
and specify local5 as the logging facility. By default, log information is output to a log host through

channel loghost.

[Sysname] info-center loghost 1.2.0.1 channel loghost facility local5

# Configure an output rule to output to the log host the log information that has a severity level of

at least informational.

[Sysname] info-center source default channel loghost log level informational state

on debug state off trap state off

Disable the output of unnecessary information of all modules on the specified channel in the output
rule.

2.

Configure the log host:

a.

Log in to the log host as a root user.

b.

Create a subdirectory named Device in the directory /var/log/, and create file info.log in the
Device directory to save logs of Device.

# mkdir /var/log/Device

# touch /var/log/Device/info.log

c.

Edit the file syslog.conf in the directory /etc/ and add the following contents.

# Device configuration messages

local5.info /var/log/Device/info.log

In this configuration, local5 is the name of the logging facility used by the log host to receive

logs. info is the information level. The Linux system will record the log information with severity
level equal to or higher than informational to file /var/log/Device/info.log.

NOTE

:

Be aware of the following issues while editing file /etc/syslog.conf:

Comments must be on a separate line and must begin with a pound sign (#).

No redundant spaces are allowed after the file name.

The logging facility name and the information level specified in the /etc/syslog.conf file must be
identical to those configured on the device using the info-center loghost and info-center source

commands. Otherwise, the log information might not be output properly to the log host.

d.

Display the process ID of syslogd, kill the syslogd process, and then restart syslogd using the –r
option to make the new configuration take effect.

204

Advertising