diff options
Diffstat (limited to 'manifests/nagios.pp')
-rw-r--r-- | manifests/nagios.pp | 9 |
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}" } } + } } |