【发布时间】:2021-04-28 22:25:21
【问题描述】:
我有一个将 rsyslogs 转发到外部服务的机制。
在/etc/rsyslog.d下我创建了一个.conf文件。
这是文件:
$ModLoad imfile
$InputFilePollInterval 1
$InputFileName /var/log/secure
$InputFileTag securelogs:
$InputFileStateFile securelogs
$InputFileFacility local0
$InputRunFileMonitor
:syslogtag, isequal, "securelogs:" {
:msg, contains, "sshd" {
local0.* /var/log/forward_securelogs_audit.log
local0.* @@<server-ip>:514
}
stop
}
我在多台服务器上都有相同的配置,但其中 2 台无法正常工作。
如何调试?
我尝试按照此处的说明进行操作 - https://www.rsyslog.com/how-to-use-debug-on-demand/
但是没有文件-/etc/rc.d/init.d/rsyslog
也没有文件-/var/run/rsyslogd.pid
在获取版本rsyslogd -v 时,我得到以下信息
0726.220297821:7f4d57c22780: Note: debug on demand turned on via configuraton file, use USR1 signal to activate.
rsyslogd 8.24.0-57.el7_9, compiled with:
PLATFORM: x86_64-redhat-linux-gnu
PLATFORM (lsb_release -d):
FEATURE_REGEXP: Yes
GSSAPI Kerberos 5 support: Yes
FEATURE_DEBUG (debug build, slow code): No
32bit Atomic operations supported: Yes
64bit Atomic operations supported: Yes
memory allocator: system default
Runtime Instrumentation (slow code): No
uuid support: Yes
Number of Bits in RainerScript integers: 64
但同样,我在调试文件中看不到任何东西,在终端上也看不到。
任何帮助将不胜感激。
【问题讨论】:
标签: linux debugging centos7 rsyslog