Hi, I am trying to monitor the mongodb log file. /var/log/mongodb/mongod.log. I'm encountering an issue, is that after forwarding log to graylog, the same log lines again getting written into /var/log/messages. I'm using amazon linux and rsyslog version 5.8.
Below is my /etc/rsyslog.d/22-mongodb.conf. could some one please help me. $ModLoad imfile $InputFilePollInterval 10 $WorkDirectory /var/spool/rsyslog # Input for mongod.log $InputFileName /var/log/mongodb/mongod.log $InputFileTag mongo $InputFileStateFile stat-mongo #this must be unique for each file being polled $InputFileSeverity info $InputFilePersistStateInterval 20000 $InputRunFileMonitor # Add a tag for file events $template GraylogMongo,"<%pri%>%protocol-version% %timestamp:::date-rfc3339% %HOSTNAME% %app-name% %procid% %msgid% [tag=\"mongo\"] %msg%\n" # Send to Loggly then discard if $programname == 'mongo' then @@10.40.10.11:20514;GraylogMongo if $programname == 'mongo' then ~ -- You received this message because you are subscribed to the Google Groups "Graylog Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/graylog2/5d10ea23-f00c-47c2-b1e1-d5fc11068dc6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
