jingjiaming

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

info-center source default channel 2 log level debugging

#指定从哪个接口发送

info-center loghost source Vlanif1

#指定远程syslog服务器ip

info-center loghost x.x.x.x

这个是我交换上的配置

info-center source default channel 2 log level debugging
info-center loghost source Vlanif15
info-center loghost 192.168.15.XX

 

--------------------------------------------------------------------------

服务器上配置

vim /etc/rsyslog.conf

#启用udp 514端口监听。

$ModLoad imudp

$UDPServerRun 514

#把来自两个交换机的日志分别放入到指定的log文件中。

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

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

#重启rsyslog服务

service rsyslog restart

 

如果是日志审计的话,直接在web页面添加syslog 就可以了。

---------------------------------------------------------------------------

 

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2021-05-25
  • 2021-09-11
  • 2022-12-23
  • 2021-12-12
  • 2021-11-30
  • 2022-02-04
猜你喜欢
  • 2021-12-29
  • 2021-04-18
  • 2021-08-26
  • 2021-06-06
  • 2022-01-09
  • 2022-02-13
  • 2021-11-17
相关资源
相似解决方案