diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2011-02-19 18:08:02 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2011-02-19 18:08:02 -0200 |
commit | 474b23271d7c4f3b82ca2e7888225e74f87ae7a8 (patch) | |
tree | b2b58dacd66a40f5d27a381439d91006339da5b8 /manifests/nagios.pp | |
parent | ac30247bf9d7ea57c01cc5ad743e2788f6e8ea0d (diff) | |
parent | e0d3cdbd36bf1d06984240da216b4492efc4e69d (diff) |
Merge branch 'master' of git://labs.riseup.net/shared-sshd
Conflicts:
templates/sshd_config/Debian_squeeze.erb
Diffstat (limited to 'manifests/nagios.pp')
-rw-r--r-- | manifests/nagios.pp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/manifests/nagios.pp b/manifests/nagios.pp new file mode 100644 index 0000000..7742cdb --- /dev/null +++ b/manifests/nagios.pp @@ -0,0 +1,24 @@ +define sshd::nagios( + $port = 'absent', + $ensure = 'present', + $check_hostname = 'absent' +) { + $real_port = $port ? { + 'absent' => $name, + default => $port, + } + case $check_hostname { + 'absent': { + nagios::service{"ssh_port_${name}": + ensure => $ensure, + check_command => "check_ssh_port!$real_port" + } + } + default: { + nagios::service{"ssh_port_host_${name}": + ensure => $ensure, + check_command => "check_ssh_port_host!${real_port}!${check_hostname}" + } + } + } +} |