i'm configuring centralized logging rsyslog.
have specify input-file kind of wildcard can't find examples of how working, in description of official documentation here link exact description seems broken.
try log tomcat7-logfiles localhost_access_log.2015-07-15.txt.
date in file updates every day.
what want kind of input(type="imfile" ...)
i tried with:
input(type="imfile" tag="access_log" statefile="tomcat-access-log" file="/var/log/tomcat7/localhost_access_log.*.txt") but not working , don't i'm doing wrong.
here full code:
$modload imfile $privdroptogroup adm $workdirectory /var/spool/rsyslog # catalina.log $inputfilename /var/log/tomcat7/catalina.log $inputfiletag catalina-log $inputfilestatefile stat-catalina-log $inputfileseverity info $inputrunfilemonitor # localhost_access_log.yyyy.mm.dd.txt input(type="imfile" tag="access_log" statefile="tomcat-access-log" file="/var/log/tomcat7/localhost_access_log.*.txt") the catalina-logs working supposed to, i'm not getting access-logs in output.
any appreciated, please remind me if i'm doing wrong or if there better way this.
it work of rsyslog v8.5 or newer (not 7) , when using inotify see here presentation explaing requirements. forced inotify (although default) with:
module(load="imfile" mode="inotify" ) the input defined this:
input(type="imfile" file="/file/path/*.log" tag="taskproject:" facility="local3" ) after this, should working
Comments
Post a Comment