【发布时间】:2018-06-02 14:51:58
【问题描述】:
我在 ubuntu 16.04 上使用 rsyslog 版本 8.16.0。
以下是我的配置文件:
module(load="imfile") #needs to be done just once
# File 1
input(type="imfile"
mode="inotify"
File="/var/log/application/hello.log"
Tag="application-access-logs"
Severity="info"
PersistStateInterval="20000"
)
$PrivDropToGroup adm
$WorkDirectory /var/spool/rsyslog
$InputRunFileMonitor
#Template for application access events
$template ApplicationLogs,"%HOSTNAME% %msg%\n"
if $programname == 'application-access-logs' then @@xx.xx.xx.xx:12345;ApplicationLogs
if $programname == 'application-access-logs' then ~
我收到以下错误:
rsyslogd: version 8.16.0, config validation run (level 1), master config /etc/rsyslog.conf
rsyslogd: error during parsing file /etc/rsyslog.d/21-application-test.conf, on or before line 10: parameter 'mode' not known -- typo in config file? [v8.16.0 try http://www.rsyslog.com/e/2207 ]
rsyslogd: imfile error: no file name given, file monitor can not be created [v8.16.0 try http://www.rsyslog.com/e/2046 ]
我在这里做错了什么?
我正在使用inotify 模式,因为我想在文件名中使用通配符。
【问题讨论】:
-
您找到解决方案了吗?
标签: rsyslog