心理

当前位置 /首页/完美生活/心理/列表

华为交换机怎么发送日志

华为交换机怎么发送日志

1、配置交换机

方法一:

配置交换机日志推送到日志主机: eg:日志主机IP地址:

system-view

info-center channel 6 name loghost1

info-center source default channel loghost1 log state on

info-center loghost source *******

info-center loghost channel loghost1

commit

方法二:

#进入用户视图

system-view

#指定发送消息基本,表示从0-7都发送

info-center source default channel 2 log level debugging

#指定从哪个接口发送

info-center loghost source *******

#指定远程syslog服务器ip

info-center loghost

备注:******查询方法:dis cu 查询结果如下

eg:IP对应的三层网络接口为loopback 0,用查询到的数据替换*******

#

interface LoopBack0

description Network_Mgmt

ip address

#

2、配置日志主机

eg:centos server

vim /etc/

#启用udp 514端口监听。

$ModLoad imudp

$UDPServerRun 514

#配置交换机日志保存文件 说明:x.x.x.x为交换机ip

:fromhost-ip,isequal, "x.x.x.x" /var/log/

重启日志配置文件

/bin/systemctl start ice

查看配置结果:

display info-center channel 6

display logbuffer

display logfile file-name

TAG标签:日志 交换机 发送 华为 #