Hi,

Rsyslog version v.5.8.10 (sorry using amazon linux)

I have below setup to monitor the log file /var/log/mongodb/mongod.conf

The message to remote graylog server goes fine, however, the same message is 
get written to /var/log/message. Not sure why, when I have a disacard option 
set (~).? Please help!!

Contents of /var/rsyslog.d/22-graylog-mongod.conf
$ModLoad imfile
$InputFilePollInterval 10
$WorkDirectory /var/spool/rsyslog

# Input for mongod.log
$InputFileName /var/log/mongodb/mongod.log
$InputFileTag mongo
$InputFileStateFile stat-mongo
$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 Graylog then discard
if $programname == 'mongo' then @@graylog-s2.tloapps.com:20514;GraylogMongo
if $programname == 'mongo' then ~


the rsyslog.conf is the default one.

Thanks,
Ashish
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE 
THAT.

Reply via email to