summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--puppet/modules/site_check_mk/files/use_ssh.mk5
-rw-r--r--puppet/modules/site_check_mk/templates/use_ssh.mk5
-rw-r--r--puppet/modules/site_nagios/manifests/server/check_mk.pp5
3 files changed, 8 insertions, 7 deletions
diff --git a/puppet/modules/site_check_mk/files/use_ssh.mk b/puppet/modules/site_check_mk/files/use_ssh.mk
deleted file mode 100644
index a10e67a3..00000000
--- a/puppet/modules/site_check_mk/files/use_ssh.mk
+++ /dev/null
@@ -1,5 +0,0 @@
-# http://mathias-kettner.de/checkmk_datasource_programs.html
-datasource_programs = [
- ( "ssh -l root -i /etc/check_mk/.ssh/id_rsa <HOST> check_mk_agent", ALL_HOSTS ),
-]
-
diff --git a/puppet/modules/site_check_mk/templates/use_ssh.mk b/puppet/modules/site_check_mk/templates/use_ssh.mk
new file mode 100644
index 00000000..4c5523db
--- /dev/null
+++ b/puppet/modules/site_check_mk/templates/use_ssh.mk
@@ -0,0 +1,5 @@
+# http://mathias-kettner.de/checkmk_datasource_programs.html
+datasource_programs = [
+ ( "ssh -l root -i /etc/check_mk/.ssh/id_rsa -p <%= @ssh_port %> <HOST> check_mk_agent", ALL_HOSTS ),
+]
+
diff --git a/puppet/modules/site_nagios/manifests/server/check_mk.pp b/puppet/modules/site_nagios/manifests/server/check_mk.pp
index 5e0795c1..f0fd3a76 100644
--- a/puppet/modules/site_nagios/manifests/server/check_mk.pp
+++ b/puppet/modules/site_nagios/manifests/server/check_mk.pp
@@ -4,6 +4,7 @@ class site_nagios::server::check_mk {
$pubkey = $ssh_hash['authorized_keys']['monitor']['key']
$type = $ssh_hash['authorized_keys']['monitor']['type']
$seckey = $ssh_hash['monitor']['private_key']
+ $ssh_port = $ssh_hash['port']
$nagios_hiera = hiera_hash('nagios')
$hosts = $nagios_hiera['hosts']
@@ -27,8 +28,8 @@ class site_nagios::server::check_mk {
file {
'/etc/check_mk/conf.d/use_ssh.mk':
- source => 'puppet:///modules/site_check_mk/use_ssh.mk',
- notify => Exec['check_mk-refresh'];
+ content => template('site_check_mk/use_ssh.mk'),
+ notify => Exec['check_mk-refresh'];
'/etc/check_mk/all_hosts_static':
content => $all_hosts,
notify => Exec['check_mk-refresh'];