我在docker容器中运行rsyslog以将UDP消息发送到logstash.
当我登录docker容器时,键入:
service rsyslog status
Run Code Online (Sandbox Code Playgroud)
说明:
rsyslogd is not running ... failed!
Run Code Online (Sandbox Code Playgroud)
但是,当我在容器中时,如果我输入:
service rsyslog start
Run Code Online (Sandbox Code Playgroud)
它完美启动,没有任何错误,并且没有真正的迹象表明它在开始时失败了
我无法弄清楚为什么失败!!!!
*除了允许imfile的模块之外,尚未修改rsyslog conf文件.rsyslog.conf如下:
# /etc/rsyslog.conf Configuration file for rsyslog.
#
# For more information see
# /usr/share/doc/rsyslog-doc/html/rsyslog_conf.html
#################
#### MODULES ####
#################
module(load="imfile" PollingInterval="10")
module(load="imuxsock" ) # provides support for local system logging
module(load="immark") #provides --MARK-- message capability
###########################
#### GLOBAL DIRECTIVES ####
###########################
#
# Use traditional timestamp format.
# To enable high precision timestamps, comment out the following line.
#
$ActionFileDefaultTemplate …Run Code Online (Sandbox Code Playgroud)