Configure the Huawei switch to send logs to the remote CentOS syslog server

Source: Internet
Author: User
Tags centos server rsyslog

Tags: Huawei switch log syslog

huawei switch:

#Specify sending message basic, which means sending from 0-7

info-center source default channel 2 log level debugging

#Specify from which interface to send

info-center loghost source Vlanif1

#Specify the remote syslog server IP

info-center loghost x.x.x.x



Centos Server:

vim /etc/rsyslog.conf

#Enable udp 514 port listening.

$ ModLoad imudp

$ UDPServerRun 514

# Put the logs from the two switches into the specified log files.

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

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

#Restart the rsyslog service

service rsyslog restart



test:

Any commands executed on the switch are recorded, such as:

#tail -f /var/log/switch01.log

May 5 16:17:27 switch01 %% 01SHELL / 6 / DISPLAY_CMDRECORD (s) [1]: Recorded display command information. (Task = VT0, Ip = xxxx, VpnName =, User = **, AuthenticationMethod = "Password", Command = "display info-center statistics")

May 5 16:17:40 switch01 %% 01SHELL / 6 / DISPLAY_CMDRECORD (s) [2]: Recorded display command information. (Task = VT0, Ip = xxxx, VpnName =, User = **, AuthenticationMethod = "Password", Command = "display current-configuration")



Configure a Huawei switch to send logs to a remote centos syslog server


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.