Page 1 of 1

Every 15 seconds?

Posted: Thu Nov 01, 2018 11:45 am
by fclswalsh
Installed the Nagios Log Server VM yesterday before leaving work with only the log server itself generating logging data. This morning when I looked at the data that was collected overnight I saw tons of entries with "apache: TTY=unknown ..." in the message. Did some digging and found that the source of this log data were sudo entries in /var/log/secure relayed to gathering status information from logstash and elasticsearch every 15 seconds. If I understand correctly, these entries are being sent to Nagios via rsyslogd and that I can turn them off by deleting the rsyslogd configuration. I would like to understand why these entries appear in /var/log/secure. If this is just the way that Nagios works by using sudo every 15 secs to gather status information is there a way to turn off this constant logging to /var/log/secure? I'm asking because to me this is just noise that clutters up /var/log/secure which might result in something that really needs attention being missed.

Re: Every 15 seconds?

Posted: Thu Nov 01, 2018 4:55 pm
by scottwilkerson
You could add the following to your /etc/sudoers

Code: Select all

Defaults:nagios !syslog
Defaults:apache !syslog
This will suppress syslog messages when the nagios or apache user runs sudo commands

Re: Every 15 seconds?

Posted: Fri Nov 02, 2018 8:44 am
by fclswalsh
Thanks for that! Will give it a try.

Re: Every 15 seconds?

Posted: Fri Nov 02, 2018 12:09 pm
by scottwilkerson
fclswalsh wrote:Thanks for that! Will give it a try.
Let us know if you need anything else