在 Ubuntu 中将 rsyslogd 与 imrelp 结合使用?

在 Ubuntu 中将 rsyslogd 与 imrelp 结合使用?

我正在尝试利用伊姆雷普在 Ubuntu 14.04 中。但是,当我使用lsof -i或检查时netstat -autp,配置的端口上没有任何内容被监听。

librelp0已安装。

我究竟做错了什么?

注意:端口 514 上的 imudp 和 imtcp 都可以正常工作。所以请不要建议切换到那个,那只会回避当前的问题。我想要使用 imrelp 的真正原因是因为 RELP 应该避免丢失消息:

从用户的角度来看,imrelp 的工作方式与 imtcp 或 imgssapi 非常相似,只是不会发生消息丢失。


相关/etc/rsyslog.conf节:

$ModLoad imuxsock # provides support for local system logging
$ModLoad imklog   # provides kernel logging support
#$ModLoad immark  # provides --MARK-- message capability

# provides UDP syslog reception
#$ModLoad imudp
#$UDPServerRun 514

# provides TCP syslog reception
#$ModLoad imtcp
#$InputTCPServerRun 514

# provides RELP reception
$ModLoad imrelp # needs to be done just once
$InputRELPServerRun 55555

在发布之前,我还验证了端口 55555 未被使用service rsyslog restart

/var/log/syslog重新启动时显示此信息rsyslogd(我已启用 upstart 调试):

May  5 20:28:38 hostname kernel: [88125.566625] init: Connection from private client
May  5 20:28:38 hostname kernel: [88125.569341] init: Connection from private client
May  5 20:28:38 hostname kernel: [88125.570618] init: rsyslog goal changed from start to stop
May  5 20:28:38 hostname kernel: [88125.570726] init: rsyslog state changed from running to pre-stop
May  5 20:28:38 hostname kernel: [88125.570823] init: rsyslog state changed from pre-stop to stopping
May  5 20:28:38 hostname kernel: [88125.570953] init: Handling stopping event
May  5 20:28:38 hostname rsyslogd: [origin software="rsyslogd" swVersion="7.4.4" x-pid="1212" x-info="http://www.rsyslog.com"] exiting on signal 15.
May  5 20:28:39 hostname rsyslogd: [origin software="rsyslogd" swVersion="7.4.4" x-pid="1249" x-info="http://www.rsyslog.com"] start
May  5 20:28:39 hostname rsyslogd: rsyslogd's groupid changed to 113
May  5 20:28:39 hostname rsyslogd: rsyslogd's userid changed to 107
May  5 20:28:39 hostname kernel: [88125.572594] init: rsyslog main process (1212) exited normally
May  5 20:28:39 hostname kernel: [88125.572666] init: rsyslog state changed from killed to post-stop
May  5 20:28:39 hostname kernel: [88125.572765] init: rsyslog state changed from post-stop to waiting
May  5 20:28:39 hostname kernel: [88125.572982] init: Handling stopped event
May  5 20:28:39 hostname kernel: [88125.573142] init: startpar-bridge (rsyslog--stopped) goal changed from stop to start
May  5 20:28:39 hostname kernel: [88125.573238] init: startpar-bridge (rsyslog--stopped) state changed from waiting to starting
May  5 20:28:39 hostname kernel: [88125.573419] init: Handling starting event
May  5 20:28:39 hostname kernel: [88125.573495] init: startpar-bridge (rsyslog--stopped) state changed from starting to security
May  5 20:28:39 hostname kernel: [88125.573593] init: startpar-bridge (rsyslog--stopped) state changed from security to pre-start
May  5 20:28:39 hostname kernel: [88125.573692] init: startpar-bridge (rsyslog--stopped) state changed from pre-start to spawned
May  5 20:28:39 hostname kernel: [88125.574885] init: startpar-bridge (rsyslog--stopped) main process (1241)
May  5 20:28:39 hostname kernel: [88125.574907] init: startpar-bridge (rsyslog--stopped) state changed from spawned to post-start
May  5 20:28:39 hostname kernel: [88125.575050] init: startpar-bridge (rsyslog--stopped) state changed from post-start to running
May  5 20:28:39 hostname kernel: [88125.575288] init: Handling started event
May  5 20:28:39 hostname kernel: [88125.575787] init: startpar-bridge (rsyslog--stopped) main process (1241) exited normally
May  5 20:28:39 hostname kernel: [88125.575899] init: startpar-bridge (rsyslog--stopped) goal changed from start to stop
May  5 20:28:39 hostname kernel: [88125.576001] init: startpar-bridge (rsyslog--stopped) state changed from running to stopping
May  5 20:28:39 hostname kernel: [88125.576115] init: Handling stopping event
May  5 20:28:39 hostname kernel: [88125.576187] init: startpar-bridge (rsyslog--stopped) state changed from stopping to killed
May  5 20:28:39 hostname kernel: [88125.576285] init: startpar-bridge (rsyslog--stopped) state changed from killed to post-stop
May  5 20:28:39 hostname kernel: [88125.576391] init: startpar-bridge (rsyslog--stopped) state changed from post-stop to waiting
May  5 20:28:39 hostname kernel: [88125.576734] init: Handling stopped event
May  5 20:28:39 hostname kernel: [88125.578591] init: Connection from private client
May  5 20:28:39 hostname kernel: [88125.579494] init: rsyslog goal changed from stop to start
May  5 20:28:39 hostname kernel: [88125.579582] init: rsyslog state changed from waiting to starting
May  5 20:28:39 hostname kernel: [88125.579705] init: Handling starting event
May  5 20:28:39 hostname kernel: [88125.579785] init: rsyslog state changed from starting to security
May  5 20:28:39 hostname kernel: [88125.579881] init: rsyslog state changed from security to pre-start
May  5 20:28:39 hostname kernel: [88125.581088] init: rsyslog pre-start process (1242)
May  5 20:28:39 hostname kernel: [88125.583975] init: Connection from private client
May  5 20:28:39 hostname kernel: [88125.588103] init: rsyslog pre-start process (1242) exited normally
May  5 20:28:39 hostname kernel: [88125.588172] init: rsyslog state changed from pre-start to spawned
May  5 20:28:39 hostname kernel: [88125.589433] init: rsyslog main process (1248)
May  5 20:28:39 hostname kernel: [88125.590290] init: rsyslog main process (1248) executable changed
May  5 20:28:39 hostname kernel: [88125.593495] init: rsyslog main process (1248) became new process (1249)
May  5 20:28:39 hostname kernel: [88125.593525] init: rsyslog state changed from spawned to post-start
May  5 20:28:39 hostname kernel: [88125.593729] init: rsyslog state changed from post-start to running
May  5 20:28:39 hostname kernel: [88125.593918] init: Handling started event
May  5 20:28:39 hostname kernel: [88125.594192] init: startpar-bridge (rsyslog--started) goal changed from stop to start
May  5 20:28:39 hostname kernel: [88125.594355] init: startpar-bridge (rsyslog--started) state changed from waiting to starting
May  5 20:28:39 hostname kernel: [88125.594705] init: Handling starting event
May  5 20:28:39 hostname kernel: [88125.594813] init: startpar-bridge (rsyslog--started) state changed from starting to security
May  5 20:28:39 hostname kernel: [88125.594949] init: startpar-bridge (rsyslog--started) state changed from security to pre-start
May  5 20:28:39 hostname kernel: [88125.595128] init: startpar-bridge (rsyslog--started) state changed from pre-start to spawned
May  5 20:28:39 hostname kernel: [88125.596402] init: startpar-bridge (rsyslog--started) main process (1254)
May  5 20:28:39 hostname kernel: [88125.596426] init: startpar-bridge (rsyslog--started) state changed from spawned to post-start
May  5 20:28:39 hostname kernel: [88125.596614] init: startpar-bridge (rsyslog--started) state changed from post-start to running
May  5 20:28:39 hostname kernel: [88125.596918] init: Handling started event
May  5 20:28:39 hostname kernel: [88125.597463] init: startpar-bridge (rsyslog--started) main process (1254) exited normally
May  5 20:28:39 hostname kernel: [88125.597533] init: startpar-bridge (rsyslog--started) goal changed from start to stop
May  5 20:28:39 hostname kernel: [88125.597674] init: startpar-bridge (rsyslog--started) state changed from running to stopping
May  5 20:28:39 hostname kernel: [88125.597814] init: Handling stopping event
May  5 20:28:39 hostname kernel: [88125.597884] init: startpar-bridge (rsyslog--started) state changed from stopping to killed
May  5 20:28:39 hostname kernel: [88125.598018] init: startpar-bridge (rsyslog--started) state changed from killed to post-stop
May  5 20:28:39 hostname kernel: [88125.598120] init: startpar-bridge (rsyslog--started) state changed from post-stop to waiting
May  5 20:28:39 hostname kernel: [88125.598472] init: Handling stopped event

这些文件auth.logdmesgkern.log包含与重新开始相关的任何内容rsyslogd

答案1

您可以在存储库中找到 rsyslog-relp 包。我相信这将有助于提供您需要的模块。

相关内容