diff options
author | Micah <micah@leap.se> | 2016-05-24 10:19:41 -0400 |
---|---|---|
committer | Micah <micah@leap.se> | 2016-05-24 10:19:41 -0400 |
commit | c9d50f333a81c716f3e227e9eb449dc76b6eb6e3 (patch) | |
tree | 1a09a2775045f854000f6cba5ee4efb2c3a802b2 /manifests/server/collect_ps.pp |
Squashed 'puppet/modules/check_mk/' content from commit aa02571
git-subtree-dir: puppet/modules/check_mk
git-subtree-split: aa02571537af90ac73309e6e216c9417802548c3
Diffstat (limited to 'manifests/server/collect_ps.pp')
-rw-r--r-- | manifests/server/collect_ps.pp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/manifests/server/collect_ps.pp b/manifests/server/collect_ps.pp new file mode 100644 index 00000000..067a25c9 --- /dev/null +++ b/manifests/server/collect_ps.pp @@ -0,0 +1,30 @@ +class check_mk::server::collect_ps ( + $config = "${::check_mk::config::etc_dir}/check_mk/conf.d/ps.mk" +) { + + # this class gets run on the check-mk server in order to collect the + # stored configs created on clients and assemble the ps.mk config file + concat { $config: + owner => 'root', + group => 'root', + mode => '0644', + notify => Exec['check_mk-refresh'], + } + + concat::fragment{'check_mk_ps_header': + target => $config, + content => "checks += [\n", + order => 10, + } + + Check_mk::Ps <<| tag == 'check_mk_ps' |>> { + target => $config, + notify => Exec['check_mk-refresh'] + } + + concat::fragment{'check_mk_ps_footer': + target => $config, + content => "]\n", + order => 90, + } +} |