summaryrefslogtreecommitdiff
path: root/manifests/service.pp
diff options
context:
space:
mode:
authornadir <nadir-technik@nadir.org>2012-02-14 14:50:38 +0100
committerGabriel Filion <lelutin@gmail.com>2012-04-09 21:09:30 -0400
commit3ed7a58cc923d52c8664776b534b123d43f8fe5d (patch)
treeca13981628ce870d8310088bd2a6fed7d25b3ad0 /manifests/service.pp
parent6f70941c33e1f621dae4722796314e94a4b23bb6 (diff)
add nrpe timeout parameter
amended (lelutin): took out some trailing whitespaces and a commented out (useless) line
Diffstat (limited to 'manifests/service.pp')
-rw-r--r--manifests/service.pp13
1 files changed, 8 insertions, 5 deletions
diff --git a/manifests/service.pp b/manifests/service.pp
index ae112c1..55b2254 100644
--- a/manifests/service.pp
+++ b/manifests/service.pp
@@ -13,7 +13,8 @@ define nagios::service (
$use = 'generic-service',
$service_description = 'absent',
$use_nrpe = '',
- $nrpe_args = '' )
+ $nrpe_args = '',
+ $nrpe_timeout = 10 )
{
# TODO: this resource should normally accept all nagios_host parameters
@@ -21,11 +22,13 @@ define nagios::service (
$real_name = "${hostname}_${name}"
if ($use_nrpe == 'true') {
- if ($nrpe_args != '') {
- $real_check_command = "check_nrpe!$check_command!\"$nrpe_args\""
+ include nagios::command::nrpe_timeout
+
+ if ($nrpe_args != '') {
+ $real_check_command = "check_nrpe_timeout!$nrpe_timeout!$check_command!\"$nrpe_args\""
}
- else {
- $real_check_command = "check_nrpe_1arg!$check_command"
+ else {
+ $real_check_command = "check_nrpe_1arg_timeout!$nrpe_timeout!$check_command"
}
}
else {