diff options
author | nadir <nadir-technik@nadir.org> | 2010-12-12 23:12:53 +0100 |
---|---|---|
committer | Gabriel Filion <lelutin@gmail.com> | 2012-04-09 21:09:30 -0400 |
commit | faf85fa479e63b50cc2a3a7e69db9c0d7eb6e9ca (patch) | |
tree | 2880fc289afec7d63c0892d549ec9cd444ed1da6 /manifests | |
parent | f722765369b3900f57d845e5c9e2e170a560302c (diff) |
Added NRPE Support for nagios::service
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/service.pp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/manifests/service.pp b/manifests/service.pp index afc8650..6f82279 100644 --- a/manifests/service.pp +++ b/manifests/service.pp @@ -11,16 +11,25 @@ define nagios::service ( $notification_options = '', $contact_groups = '', $use = 'generic-service', - $service_description = 'absent' ) + $service_description = 'absent', + $use_nrpe = '', + $nrpe_args = '' ) { # TODO: this resource should normally accept all nagios_host parameters $real_name = "${hostname}_${name}" + if ($use_nrpe == 'true') { + $real_check_command = "check_nrpe!$check_command!\"$nrpe_args\"" + } + else { + $real_check_command = "$check_command" + } + @@nagios_service { "${real_name}": ensure => $ensure, - check_command => $check_command, + check_command => $real_check_command, host_name => $host_name, use => $use, notify => Service[nagios], |