beautypg.com

Outputting log information to a linux log host, Network requirements, Configuration procedure – H3C Technologies H3C SecBlade LB Cards User Manual

Page 39

background image

30

Outputting log information to a Linux log host

Network requirements

Configure the LB to send log information that has a severity level of at least informational to the Linux log

host at 1.2.0.1/16.

Figure 8 Network diagram

Configuration procedure

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

1.

Configure the LB:
# Enable the information center.

system-view

[LB] info-center enable

# Specify the host 1.2.0.1/16 as the log host, use the channel loghost to output log information
(optional, loghost by default), and specify local5 as the logging facility.

[LB] 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.

[LB] 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 LB in the directory /var/log/, and create file info.log in the LB
directory to save logs from the LB.

# mkdir /var/log/LB

# touch /var/log/LB/info.log

c.

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

# LB configuration messages

local5.info /var/log/LB/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/LB/info.log.

This manual is related to the following products: