The configuration of information center on H3C 5600 switch (no.2)
―――log information has been sent to Linux host
I Requirement for the diagram
1. Log information of the switch has been sent to Linux host. Log host’ ip address is 202.38.1.10. Only permit the log information that ponderance is higher than “errors” sending to log host. The output language is English, and output modules are all modules.
II Network topology.
III Steps of configuration
The configuration of switch.
1. Start the information center
<H3C> system-view
[H3C] info-center enable
2. Set the host that it’s ip address is 202.38.1.10 as log host, Only permit the log information that ponderance is higher than “errors” sending to log host. The output language is English, and output modules are all modules.
[H3C] info-center loghost 202.38.1.10 facility local7 language english
[H3C] info-center source default channel loghost log level errors debug state off trap state off
The configuration of loghost.
1. Super user enter, and implement the following command
# mkdir /var/log/H3C
# touch /var/log/H3C/information
2. Super user enter, and edit the file of /etc/syslog.conf, then add selector/action pairs.
# H3C configuration messages
***.*** /var/log/H3C/information
3. When the log file information has been established and the file of /etc/syslog.conf has been modified, display the course number of “syslogd” via the following command, and kill the “syslogd” course, then reboot “syslogd” via “-r” option.
# ps -ae | grep syslogd
147
# kill -9 147
# syslogd -r &
IV Key notes in the configuration
1. When you edit the file of /etc/syslog.conf, you should pay attention the following questions:
Notes are only permitted in a row independently, and the symbol of “#” begin.
There is no blank after the filename.
There must be a tab and not be a blank between selector/action pairs
The log information level and device name that they are designated in the file of /etc/syslog.conf are same as the parameters that they are configured in the switch via “info-center loghost” and “info-center source” command. Otherwise the log information is not sent to log host accurately.
该案例暂时没有网友评论
✖
案例意见反馈
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作