diff options
author | Micah Anderson <micah@riseup.net> | 2010-12-25 17:52:38 -0500 |
---|---|---|
committer | Micah Anderson <micah@riseup.net> | 2010-12-25 17:52:38 -0500 |
commit | 83d9e8613d3d1b16b69f30dd24fbbf84867f61df (patch) | |
tree | e589f79184742fb056e14be6034e76d18c395394 | |
parent | b057ff41f32ccba198a41a5babc51da6f48911a5 (diff) |
add in the missing --warning and --critical options to check_mysql_health
-rw-r--r-- | manifests/service/mysql.pp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/manifests/service/mysql.pp b/manifests/service/mysql.pp index d501f06..6b68b73 100644 --- a/manifests/service/mysql.pp +++ b/manifests/service/mysql.pp @@ -20,7 +20,15 @@ define nagios::service::mysql( if ($check_host == 'absent') { fail("Please specify a hostname, ip address or socket to check a mysql instance.") } + + if $check_warning != undef { + $real_check_warning = "--warning $check_warning" + } + if $check_critical != undef { + $real_check_critical = "--critical $check_critical" + } + case $check_mode { 'tcp': { if ($check_host == 'localhost') { @@ -42,6 +50,6 @@ define nagios::service::mysql( nagios::service { "mysql_health_${name}": ensure => $ensure, - check_command => "check_mysql_health!${check_host}!${check_port}!${check_username}!${check_password}!${name}!${check_database}", + check_command => "check_mysql_health!${check_host}!${check_port}!${check_username}!${check_password}!${real_check_warning}${real_check_critical}${name}!${check_database}", } } |