summaryrefslogtreecommitdiff
path: root/manifests/nagios.pp
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2010-10-20 21:17:16 +0200
committermh <mh@immerda.ch>2010-10-20 21:17:16 +0200
commitd0d3d20e1411511cccdf6fa3ae63164f2868221d (patch)
treefb4d6f67d1a3ac99dbec57dc77cd63c5e93e34d4 /manifests/nagios.pp
parent988a88f4e62065b45c8e32f6f915e052ff394003 (diff)
add nagios_check_ssh_hostname to tweak the hostname which whould be monitored, as this one might actually differ
Diffstat (limited to 'manifests/nagios.pp')
-rw-r--r--manifests/nagios.pp9
1 files changed, 7 insertions, 2 deletions
diff --git a/manifests/nagios.pp b/manifests/nagios.pp
index 5a5a5ed..890810e 100644
--- a/manifests/nagios.pp
+++ b/manifests/nagios.pp
@@ -1,3 +1,8 @@
-define sshd::nagios {
- nagios::service{ "ssh_port_${name}": check_command => "check_ssh_port!$name" }
+define sshd::nagios(
+ $check_hostname = 'absent'
+) {
+ case $check_hostname {
+ 'absent': { nagios::service{ "ssh_port_${name}": check_command => "check_ssh_port!$name" } }
+ default: { nagios::service{"ssh_port_host_${name}_${check_hostname}": check_command => "check_ssh_port_host!${name}!${check_hostname}" } }
+ }
}