Stop logwatch reporting on a particular service on CentOSStop logwatch reporting on a particular service on CentOS

Posted May 3rd, 2008 in Linux/Unix/BSD

logwatch is a system log analyzer and reporter which emails daily reports about information in the system log files in /log. On CentOS and Red Hat Enterprise Linux this is usually configured by default to email the root user on a daily basis with the results from the log analysis. This post looks at how to stop logwatch from reporting on a particular service, for example sendmail and postfix.

Get a 7-Day Free Trial to FunPass.

The configuration files for logwatch on CentOS are stored at /etc/logwatch. The subdirectories and configuration files at this location are empty to start with and override the default settings, so you can safely add your own settings to these files without causing issues to the defaults. Simply remove your changes from these files at a later stage and you will restore the default behaviour.

To prevent logwatch from reporting on a particular service, for example sendmail or postfix, open up the following configuration file:

/etc/logwatch/conf/logwatch.conf

and add the following to the end of it to pevent log analysis of sendmail:

Service = "-sendmail"

or postfix:

Service = "-postfix"

The next time logwatch is run it will no longer report on the services with a "-" entry. You can do a test run of logwatch at any time by running the following on a CentOS or RHEL machine:

/etc/cron.daily/0logwatch

You do not need to restart any services for your configuration changes to take effect; they will be used the next time logwatch is run.

Share or Bookmark

Share or Bookmark this page using the following services. You will need to have an account with the selected service in order to post links or bookmark this page.

Subscribe or Follow

Subscribe via RSS or email, or follow me on Facebook or Twitter below. The RSS icon takes you through to Feedburner where you can select the service or application to use.

Comments

blog comments powered by Disqus