rsyslog to send data to the same server showing error on modules -
my app producing logs under
/var/log/myapp/app.log
i need send logs under app.log syslog file /var/log/syslog.
i created file following content /etc/rsyslog.d
$workdirectory /var/spool/rsyslog $template rfc3164fmt,"<%pri%>%timestamp% %hostname% %syslogtag%%msg%" # log shipment rsyslog target servers $actionqueuefilename appfile $actionqueuesaveonshutdown on $actionqueuetype linkedlist $actionresumeretrycount 250 *.* @10.x.x.1;rfc3164fmt # log files $inputfilename /var/log/myapp/app.log $inputfiletag app: $inputfilestatefile state-app $inputfilefacility local7 $inputfilepollinterval 1 $inputfilepersiststateinterval 1 $inputrunfilemonitor
10.x.x.1 same node rsyslog installed , app running.
once restart rsyslog getting following error in syslog file
invalid or yet-unknown config file command 'inputfilename' - have forgotten load module? [try http://www.rsyslog.com/e/3003 ] invalid or yet-unknown config file command 'inputfiletag' - have forgotten load module? [try http://www.rsyslog.com/e/3003 ] invalid or yet-unknown config file command 'inputfilestatefile' - have forgotten load module? [try http://www.rsyslog.com/e/3003 ] invalid or yet-unknown config file command 'inputfilefacility' - have forgotten load module? [try http://www.rsyslog.com/e/3003 ] invalid or yet-unknown config file command 'inputfilepollinterval' - have forgotten load module? [try http://www.rsyslog.com/e/3003 ] invalid or yet-unknown config file command 'inputfilepersiststateinterval' - have forgotten load module? [try http://www.rsyslog.com/e/3003 ] invalid or yet-unknown config file command 'inputrunfilemonitor' - have forgotten load module? [try http://www.rsyslog.com/e/3003 ]
i checked couple of links , changed /etc/rsyslog.conf file entry change user . i
#$privdroptouser syslog $privdroptouser appuser #$privdroptogroup syslog $privdroptogroup appuser
i missed load module .
adding following line in beginning resolved issue
$modload imfile
Comments
Post a Comment