module-sshd/manifests/nagios.pp
Michael Moll 7743650cde style fixes
silence puppet-lint
2013-02-03 00:30:54 +01:00

24 خطوط
552 B
Puppet

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}"
}
}
}
}