Anyone? I am really stuck here............... :( On Monday, April 11, 2016 at 1:14:02 PM UTC-4, Ashish Barmase wrote: > > 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/12b07b8f-d9d5-4dc7-a3f3-119cfd1a9755%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
