Re: Log messages being duplicated
Posted: Mon Dec 01, 2014 1:23 pm
I agree it has to do with the order, specifically which file has the "if $programname == 'tomcat' then ~" line present. That would prevent this from showing up in the normal syslog location which would be picked up and sent a second time. Currently your first one (the nagios.conf) is not discarding the message after sending, and your second (the rsyslog.conf) is. By placing nagios.conf after you are essentially skipping it.
Add: Normally we handle this by using numerals to control the order, such as "/etc/rsyslog.d/90-nagioslogserver_var_log_httpd_access_log.conf".
Add: Normally we handle this by using numerals to control the order, such as "/etc/rsyslog.d/90-nagioslogserver_var_log_httpd_access_log.conf".