From 0b6423f9c99d9edf8c96fefd0f6c453859395aa1 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Mon, 30 Sep 2013 00:03:24 +0200 Subject: Import Nagios Plugins site Import the Nagios Plugins web site, Cronjobs, infrastructure scripts, and configuration files. --- web/attachments/318691-check_mysql.patch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 web/attachments/318691-check_mysql.patch (limited to 'web/attachments/318691-check_mysql.patch') diff --git a/web/attachments/318691-check_mysql.patch b/web/attachments/318691-check_mysql.patch new file mode 100644 index 0000000..1716c74 --- /dev/null +++ b/web/attachments/318691-check_mysql.patch @@ -0,0 +1,19 @@ +--- nagios-plugins-1.4.13/plugins/check_mysql.c 2008-08-16 06:47:32.000000000 +0200 ++++ nagios-plugins-1.4.13.oskar/plugins/check_mysql.c 2009-03-19 16:50:18.000000000 +0100 +@@ -181,13 +181,14 @@ + continue; + } + } ++ + if ((slave_io_field < 0) || (slave_sql_field < 0) || (num_fields == 0)) { + mysql_free_result (res); + mysql_close (&mysql); + die (STATE_CRITICAL, "Slave status unavailable\n"); + } + +- snprintf (slaveresult, SLAVERESULTSIZE, "Slave IO: %s Slave SQL: %s Seconds Behind Master: %s", row[slave_io_field], row[slave_sql_field], row[seconds_behind_field]); ++ snprintf (slaveresult, SLAVERESULTSIZE, "Slave IO: %s Slave SQL: %s Seconds Behind Master: %s", row[slave_io_field], row[slave_sql_field], seconds_behind_field!=-1?row[seconds_behind_field]:"Unknown"); + if (strcmp (row[slave_io_field], "Yes") != 0 || strcmp (row[slave_sql_field], "Yes") != 0) { + mysql_free_result (res); + mysql_close (&mysql); + -- cgit v1.2.3-74-g34f1