mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-05-21 18:05:15 -04:00
check_mysql: Assume MySQL server by default (in replica check)
In the Debian Bug tracker (and then Github) a person pointed out, that a MySQL server does not respond with a hint that is indeed the MySQL software, but only with the version string. Which makes sense if one assumes to be the only implementation. This commit changes the behaviour of the Replica check to assume that the counterpart is a MySQL server if there are not hints that it is a MariaDB server.
This commit is contained in:
parent
4886fa3deb
commit
291a704bcf
1 changed files with 2 additions and 5 deletions
|
|
@ -239,16 +239,13 @@ main (int argc, char **argv)
|
|||
use_deprecated_slave_status = true;
|
||||
}
|
||||
}
|
||||
} else if (strstr(server_version, "MySQL") != NULL) {
|
||||
// Looks like MySQL
|
||||
} else {
|
||||
// Looks like MySQL (or at least not like MariaDB)
|
||||
if (major_version < 8) {
|
||||
use_deprecated_slave_status = true;
|
||||
} else if (major_version == 10 && minor_version < 4) {
|
||||
use_deprecated_slave_status = true;
|
||||
}
|
||||
} else {
|
||||
printf("Not a known sever implementation: %s\n", server_version);
|
||||
exit(STATE_UNKNOWN);
|
||||
}
|
||||
|
||||
char *replica_query = NULL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue