From 01714ed03bc740390503c8c5ec503112ce11a855 Mon Sep 17 00:00:00 2001 From: Louis Rossouw Date: Sun, 5 Jul 2015 00:47:51 +0200 Subject: [PATCH] When check_mysql is run with -n option it returns MySQL OK. Also accept that as an status=1 indication. --- includes/services/mysql/check.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/services/mysql/check.inc b/includes/services/mysql/check.inc index 93c97199c..d4d98bc85 100644 --- a/includes/services/mysql/check.inc +++ b/includes/services/mysql/check.inc @@ -7,7 +7,7 @@ $check = shell_exec($config['nagios_plugins'] . "/check_mysql -H ".$service['hos list($check, $time) = split("\|", $check); -if(strstr($check, "Uptime:")) { +if(strstr($check, "Uptime:") || strstr($check, "MySQL OK")) { $status = '1'; } else { $status = '0';