diff options
Diffstat (limited to 'manifests/server')
-rw-r--r-- | manifests/server/collect_hosts.pp | 6 | ||||
-rw-r--r-- | manifests/server/collect_ps.pp | 30 | ||||
-rw-r--r-- | manifests/server/configure_ssh.pp | 16 |
3 files changed, 52 insertions, 0 deletions
diff --git a/manifests/server/collect_hosts.pp b/manifests/server/collect_hosts.pp new file mode 100644 index 00000000..6d07897b --- /dev/null +++ b/manifests/server/collect_hosts.pp @@ -0,0 +1,6 @@ +class check_mk::server::collect_hosts { + Check_mk::Host <<| |>> { + target => "${::check_mk::config::etc_dir}/check_mk/main.mk", + notify => Exec['check_mk-refresh'] + } +} 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, + } +} diff --git a/manifests/server/configure_ssh.pp b/manifests/server/configure_ssh.pp new file mode 100644 index 00000000..987cc7af --- /dev/null +++ b/manifests/server/configure_ssh.pp @@ -0,0 +1,16 @@ +class check_mk::server::configure_ssh ( + $check_mk_tag = 'check_mk_sshkey' +) { + # collect exported files from client::generate_sshkey + File <<| tag == $check_mk_tag |>> + + # configure ssh access to agents which have 'ssh' tags + file { "${check_mk::config::etc_dir}/check_mk/conf.d/use_ssh.mk": + source => [ 'puppet:///modules/site_check_mk/use_ssh.mk', + 'puppet:///modules/check_mk/use_ssh.mk' ], + owner => $::check_mk::shelluser, + group => $::check_mk::shellgroup, + mode => '0644', + notify => Exec['check_mk-refresh'] + } +} |