Rsyslog 无法捕获远程日志

Rsyslog 无法捕获远程日志

我正在使用 Rsyslog 服务器配置 LogAnalyzer。我已完成 HTTP 配置。但我的 loganalyzer 仅记录来自本地主机的日志。我有点困惑在哪里配置 snmp 字符串/社区。尽管我在 MYSql 上检查过,但没有来自我的思科设备的日志。

请帮我。

# Provides TCP syslog reception
# for parameters see http://www.rsyslog.com/doc/imtcp.html
module(load="imtcp") # needs to be done just once
input(type="imtcp" port="514")

#### GLOBAL DIRECTIVES ####

# Use default timestamp format
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat

#File syncing capability is disabled by default. This feature is usually not required,
# not useful and an extreme performance hit
#$ActionFileEnableSync on

# Include all config files in /etc/rsyslog.d/
$IncludeConfig /etc/rsyslog.d/*.conf


#### RULES ####

# Log all kernel messages to the console.
# Logging much else clutters up the screen.
#kern.*                                                 /dev/console

# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;mail.none;authpriv.none;cron.none                /var/log/messages

# The authpriv file has restricted access.
authpriv.*                                              /var/log/secure

# Log all the mail messages in one place.
mail.*                                                  /var/log/maillog


# Log cron stuff
cron.*                                                  /var/log/cron

# Everybody gets emergency messages
*.emerg                                                 :omusrmsg:*

# Save news errors of level crit and higher in a special file.
uucp,news.crit                                          /var/log/spooler

# Save boot messages also to boot.log
local7.*                                                /var/log/boot.log




 $ModLoad ommysql
 *.* :ommysql:127.0.0.1,Syslog,Syslogadmin,123456

#allow logs sender’s IP range below below
$AllowedSender UDP, 10.50.56.34
$AllowedSender TCP, 10.50.56.34

答案1

您能否验证您使用的防火墙是否设置为允许通过 UDP 和 TCP 流量在端口 514 上传入?如果是这样,那么暂时地禁用 SELinux 并重试。

相关内容