summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2011-04-19 16:19:10 -0400
committerMicah Anderson <micah@riseup.net>2011-04-19 16:19:10 -0400
commitb5d1ad97b2b33d9a64991616ebe42bc9e0be8737 (patch)
treec4d5e53b8fb00eab592abcdddcf4b4d517a6349e
parent673a61cec6ce8209ed5a169cd53da7bcf9ba94d6 (diff)
add the potential for the --name to be set for arbitrary sql commands
-rw-r--r--manifests/service/mysql.pp6
1 files changed, 5 insertions, 1 deletions
diff --git a/manifests/service/mysql.pp b/manifests/service/mysql.pp
index 1b7bf81..2fde402 100644
--- a/manifests/service/mysql.pp
+++ b/manifests/service/mysql.pp
@@ -21,6 +21,10 @@ define nagios::service::mysql(
fail("Please specify a hostname, ip address or socket to check a mysql instance.")
}
+ if $check_name != undef {
+ $real_check_name = "!--name $check_name"
+ }
+
if $check_warning != undef {
$real_check_warning = "!--warning $check_warning"
}
@@ -50,6 +54,6 @@ define nagios::service::mysql(
nagios::service { "mysql_health_${name}":
ensure => $ensure,
- check_command => "check_mysql_health!${real_check_host}!${check_port}!${check_username}!${check_password}!${check_health_mode}!${check_database}${real_check_warning}${real_check_critical}",
+ check_command => "check_mysql_health!${real_check_host}!${check_port}!${check_username}!${check_password}!${check_health_mode}!${check_database}${real_check_name}${real_check_warning}${real_check_critical}",
}
}