华为交换机配置syslog发送_配置华为交换机推送syslog到日志服务器

配置华为交换机推送syslog到日志服务器:

1、配置华为交换机

方法一:

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

system-view

info-center channel 6 name loghost1

info-center source default channel loghost1 log state on

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

info-center loghost 10.172.49.1 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 10.172.49.1

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

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

#

interface LoopBack0

description Network_Mgmt

ip address 10.4.114.1 255.255.255.255

#

2、配置日志主机

eg:centos server

vim /etc/rsyslog.conf

#启用udp 514端口监听。

$ModLoad imudp

$UDPServerRun 514

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

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

重启日志配置文件

/bin/systemctl start rsyslog.service

查看配置结果:

display info-center channel 6

display logbuffer

display logfile file-name

华为交换机可以通过配置syslog来收集交换机的日志信息。具体的配置方法可以参考文章【网络-实验】华为交换机S5700配置syslog收集交换机日志_猫先生的早茶的博客-CSDN博客_华为交换机收集日志华为交换机日志说明也可以在华为官方文档中找到。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [华为交换机S5700配置syslog收集交换机日志](https://blog.csdn.net/Richardlygo/article/details/125747632)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [undefined](undefined)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [华为交换机手册配置(包括syslog日志)](https://download.csdn.net/download/luman1991/10539836)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值