日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > windows >内容正文

windows

华三服务器收集系统日志,Rsyslog+H3C日志系统(示例代码)

發布時間:2025/3/12 windows 30 豆豆
生活随笔 收集整理的這篇文章主要介紹了 华三服务器收集系统日志,Rsyslog+H3C日志系统(示例代码) 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

一、交換機發送日志到linux主機

[9F-3600V2-EI]info-center loghost 192.168.11.36

[9F-3600V2-EI]info-center enable

二、linux下配置

1.建立日志文件路徑,路徑可以修改

[[email?protected] h3c]# ?mkdir /var/log/h3c

[[email?protected] h3c]#touch /var/log/h3c/log

[[email?protected] h3c]#vim /etc/rsyslog.conf ? 修改配置文件

# rsyslog v5 configuration file

# For more information see /usr/share/doc/rsyslog-*/rsyslog_conf.html

#### MODULES ####

#$ModLoad immark ?# provides --MARK-- message capability

# Provides UDP syslog reception #############去掉#號########################

$ModLoad imudp

$UDPServerRun 514

# Provides TCP syslog reception

#$ModLoad imtcp

#$InputTCPServerRun 514

#### GLOBAL DIRECTIVES ####

# not useful and an extreme performance hit

#$ActionFileEnableSync on

$IncludeConfig /etc/rsyslog.d/*.conf

#### RULES ####

# Log all kernel messages to the console.

# Logging much else clutters up the screen.

#kern.* ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? /dev/console

authpriv.* ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?/var/log/secure

# Log all the mail messages in one place.

# Log cron stuff

cron.* ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?/var/log/cron

# Everybody gets emergency messages

*.emerg ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? *

# Save boot messages also to boot.log

# ### begin forwarding rule ###

# The statement between the begin ... end define a SINGLE forwarding

# rule. They belong together, do NOT split them. If you create multiple

# forwarding rules, duplicate the whole block!

# Remote Logging (we use TCP for reliable delivery)

#

# An on-disk queue is created for this action. If the remote host is

# down, messages are spooled to disk and sent when it is up again.

#$WorkDirectory /var/lib/rsyslog # where to place spool files

#$ActionQueueFileName fwdRule1 # unique name prefix for spool files

#$ActionQueueMaxDiskSpace 1g ? # 1gb space limit (use as much as possible)

#$ActionQueueSaveOnShutdown on # save messages to disk on shutdown

#$ActionQueueType LinkedList ? # run asynchronously

#$ActionResumeRetryCount -1 ? ?# infinite retries if host is down

# remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional

#*.* @@remote-host:514

# ### end of the forwarding rule ###

###########添加內容#################################

SYSLOGD_OPTIONS="-c 2 -r -x -m 180"

KLOGD_OPTIONS="-x"

local7.info /var/log/h3c/log

#########service rsyslog status/stop/start

配置完成后,linux主機可正常接收網絡設備日志

本文出自 “山貓” 博客,謝絕轉載!

總結

以上是生活随笔為你收集整理的华三服务器收集系统日志,Rsyslog+H3C日志系统(示例代码)的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。