mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-06-08 16:26:23 -04:00
Replication check support for 4.1.x from Gerrit Beine
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1154 f882894a-f735-0410-b71e-b25c423dba1c
This commit is contained in:
parent
f24f2853c5
commit
8f81329864
1 changed files with 9 additions and 1 deletions
|
|
@ -123,8 +123,16 @@ main (int argc, char **argv)
|
|||
die (STATE_CRITICAL, "%s\n", slaveresult);
|
||||
}
|
||||
|
||||
} else if (mysql_field_count (&mysql) == 33) {
|
||||
/* mysql >= 4.1.1 */
|
||||
snprintf (slaveresult, SLAVERESULTSIZE, "Slave IO: %s Slave SQL: %s", row[10], row[11]);
|
||||
if (strcmp (row[10], "Yes") != 0 || strcmp (row[11], "Yes") != 0) {
|
||||
mysql_free_result (res);
|
||||
mysql_close (&mysql);
|
||||
die (STATE_CRITICAL, "%s\n", slaveresult);
|
||||
}
|
||||
} else {
|
||||
/* mysql 4.x.x */
|
||||
/* mysql 4.0.x or 4.1.0 */
|
||||
snprintf (slaveresult, SLAVERESULTSIZE, "Slave IO: %s Slave SQL: %s", row[9], row[10]);
|
||||
if (strcmp (row[9], "Yes") != 0 || strcmp (row[10], "Yes") != 0) {
|
||||
mysql_free_result (res);
|
||||
|
|
|
|||
Loading…
Reference in a new issue