- Overview
- Module Description - What the module does and why it is useful
- Setup - The basics of getting started with logwatch ¦ * What logwatch affects ¦ * Setup requirements
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
The logwatch module configures logwatch on Linux bases systems.
The logwatch module will manage the installation and configuration of logwatch on Linux based systems.
NOTE: You must have a proper MTA installed and configured to send mail externally.
By default, logwatch will monitor all services it knows how to.
This module requires puppetlabs-concat >= 2.2.1
- logwatch package.
- logwatch configuration files.
class { '::logwatch': }
class { '::logwatch':
mail_to => [ '[email protected] ', '[email protected]' ],
mail_from => '[email protected]',
service => [ 'sshd', 'httpd' ],
}
Add a regex to ignore.conf
to suppress that output from the logwatch report
logwatch::ignore { 'my_rule':
regex => 'ignore_lines_that_match_this_regex',
}
- logwatch: Main class, includes all other classes.
- logwatch::ignore: Manage the contents of
ignore.conf
- logwatch::install: Handles the packages.
- logwatch::config: Handles the configuration file.
$output - Acceptable values include unformatted, stdout - defaults to 'unformatted'
$format - Acceptable values include html or text - defaults to 'text'
$mail_to - Array of email addresses to send to
$mail_from - email address for logwatch 'from' emails
$range - Requires a regex op ^All$, ^Today$, or ^Yesterday$.
$detail - Requires a regex of ^Low$, ^Med$, or ^$High'.
$service - Array of services to watch, defaults to 'All'
$package_ensure - ensure the package is installed or latest or present
$package_name - the name of the pacakge to install, logwatch typically is sufficient
regex
This module has been built on and tested against Puppet 6.
The module has been tested on:
- RedHat Enterprise Linux 7/8 (including Rocky Linux)
- CentOS 7/8
- Ubuntu 18.04/20.04