我目前正在使用InfluxData的TICK Stack,并尝试使用电报syslog input plugin在Chronograf中启用Log Viewer。为此,我正在学习教程“ Get your Syslog On”
我在安装rsyslog并将其作为brew服务运行时遇到问题。
按照教程中的建议,我按照以下步骤用Homebrew安装了rsyslog:
$ brew install rsyslog
然后编辑配置文件:
$ sudo vi /usr/local/etc/rsyslog.conf
哪个配置看起来像这样
$WorkDirectory /tmp/rsyslog # temporary directory for storing data
$ActionQueueType LinkedList # use asynchronous processing
$ActionQueueFileName srvrfwd # set file name, also enables disk mode
$ActionResumeRetryCount -1 # infinite retries on insert failure
$ActionQueueSaveOnShutdown on # save in-memory data if rsyslog shuts down
$ModLoad imudp #loads the udp module
#listen for messages on udp localhost:514 $UDPServerAddress localhost $UDPServerRun 514 *.*
@@(o)127.0.0.1:6514;RSYSLOG_SyslogProtocol23Format
然后我正在尝试使用以下命令运行服务:
$ sudo brew services restart rsyslog
Stopping `rsyslog`... (might take a while)
==> Successfully stopped `rsyslog` (label: homebrew.mxcl.rsyslog)
==> Successfully started `rsyslog` (label: homebrew.mxcl.rsyslog)
因此该服务似乎已经开始。但是,在我的system.log中,该服务似乎无法正常启动:
Mar 28 10:28:14 X com.apple.xpc.launchd[1] (homebrew.mxcl.rsyslog[9242]): Service exited with abnormal code: 1
Mar 28 10:28:14 X com.apple.xpc.launchd[1] (homebrew.mxcl.rsyslog): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
对这个问题有任何想法吗?