system-view[H3C] info-center enable
# 系统缺省情况下开启所有模块向channel6 通道输出信息的功能,需要先关闭该功
能。
[H3C] undo info-center source default channel channel6
# 将IP 地址为10.153.116.69 的主机用作日志主机,只允许严重等级高于
informational 的日志信息和告警信息通过channel6 通道输出至日志主机,允许输出
信息的模块为L2INF。
[H3C] info-center loghost 10.153.116.69 channel 6
[H3C] info-center source L2INF channel 6 log level informational state on trap
1
level informational state on debug state off
1.2 日志主机上的配置
日志主机配置可参考表34-1(Unix操作系统)及表34-2(Linux操作系统)。
下面仅以在Windows 系统下通过日志主机软件接收日志信息为例进行介绍:
# 本例使用的日志主机软件为TFTPD32,版本如下:
# 在Windows 系统下打开TFTPD32 应用程序,如下图所示:
(1) Current Directory 表示日志文件syslog.txt 的存放路径,可通过右侧的Browse
按钮进行设置,本例设置为D:\\Tools\\TFTP;
(2) Server interface 表示日志主机的IP 地址信息,本例为10.153.116.69;
2
(3) 选择syslog server 面板。
# 当交换机产生符合要求的系统信息时,会输出到日志主机,如下图所示:
# 日志主机接收到系统信息时会自动保存在D:\\Tools\\TFTP 目录下的syslog.txt 文件
里,查看已保存的系统信息,如下图所示(红色区域标注的为日志主机接收的L2INF模块的告警信息):
3
1.3 完整配置
#
info-center source L2INF channel 6
undo info-center source default channel 6
info-center loghost 10.153.116.69 channel 6
配置注意事项
在windows 系统下,不同的日志主机软件设置不同,请以实际使用的日志主机软件为准。
4