diff options
author | Matt Taggart <taggart@riseup.net> | 2016-05-30 16:40:10 -0700 |
---|---|---|
committer | Matt Taggart <taggart@riseup.net> | 2016-05-30 16:40:10 -0700 |
commit | 1095c6616dc9cd0aaedf611b7da3c1fc56dd2e5f (patch) | |
tree | 1aad763aa4a09ae4b6d5444d6ffb53fdb55bc50c /example/site_check_mk/manifests/agent/logwatch.pp | |
parent | dc9d8cca10d64ab7027f6c876a3bc89e19cf4639 (diff) |
provide an example site_check_mk with basic examples to get users started
Diffstat (limited to 'example/site_check_mk/manifests/agent/logwatch.pp')
-rw-r--r-- | example/site_check_mk/manifests/agent/logwatch.pp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/example/site_check_mk/manifests/agent/logwatch.pp b/example/site_check_mk/manifests/agent/logwatch.pp new file mode 100644 index 0000000..423cace --- /dev/null +++ b/example/site_check_mk/manifests/agent/logwatch.pp @@ -0,0 +1,36 @@ +class site_check_mk::agent::logwatch { + # Deploy mk_logwatch 1.2.4 so we can split the config + # into multiple config files in /etc/check_mk/logwatch.d + # see https://leap.se/code/issues/5135 + + file { '/usr/lib/check_mk_agent/plugins/mk_logwatch': + source => 'puppet:///modules/site_check_mk/agent/plugins/mk_logwatch.1.2.4', + mode => '0755', + require => Package['check-mk-agent-logwatch'] + } + + # only config files that watch a distinct logfile should go in logwatch.d/ + file { '/etc/check_mk/logwatch.d': + ensure => directory, + recurse => true, + purge => true, + require => Package['check-mk-agent-logwatch'] + } + + # service that share a common logfile (i.e. /var/log/syslog) need to get + # concanated in one file, otherwise the last file sourced will override + # the config before + # see mk_logwatch: "logwatch.cfg overwrites config files in logwatch.d", + # https://leap.se/code/issues/5155 + + # first, we need to deploy a custom logwatch.cfg that doesn't include + # a section about /var/log/syslog + + file { '/etc/check_mk/logwatch.cfg': + source => 'puppet:///modules/site_check_mk/agent/logwatch/logwatch.cfg', + require => Package['check_mk-agent-logwatch'] + } + + include concat::setup + include site_check_mk::agent::logwatch::syslog +} |