diff options
author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-09-26 08:57:19 +0200 |
---|---|---|
committer | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-09-26 08:57:19 +0200 |
commit | 291a704bcf738f6ceb7a1f46c69b8332b33dbd70 (patch) | |
tree | 530e2da187428674da808f370abd87c02ee33baf /plugins | |
parent | 4886fa3debf79aa2faac9d0180e8ddb4bb1d4aaa (diff) | |
download | monitoring-plugins-291a704bcf738f6ceb7a1f46c69b8332b33dbd70.tar.gz |
check_mysql: Assume MySQL server by default (in replica check)maintenance-2.4.0-check_mysql
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.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/check_mysql.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/plugins/check_mysql.c b/plugins/check_mysql.c index 1b7403f7..951a96f9 100644 --- a/plugins/check_mysql.c +++ b/plugins/check_mysql.c | |||
@@ -239,16 +239,13 @@ main (int argc, char **argv) | |||
239 | use_deprecated_slave_status = true; | 239 | use_deprecated_slave_status = true; |
240 | } | 240 | } |
241 | } | 241 | } |
242 | } else if (strstr(server_version, "MySQL") != NULL) { | 242 | } else { |
243 | // Looks like MySQL | 243 | // Looks like MySQL (or at least not like MariaDB) |
244 | if (major_version < 8) { | 244 | if (major_version < 8) { |
245 | use_deprecated_slave_status = true; | 245 | use_deprecated_slave_status = true; |
246 | } else if (major_version == 10 && minor_version < 4) { | 246 | } else if (major_version == 10 && minor_version < 4) { |
247 | use_deprecated_slave_status = true; | 247 | use_deprecated_slave_status = true; |
248 | } | 248 | } |
249 | } else { | ||
250 | printf("Not a known sever implementation: %s\n", server_version); | ||
251 | exit(STATE_UNKNOWN); | ||
252 | } | 249 | } |
253 | 250 | ||
254 | char *replica_query = NULL; | 251 | char *replica_query = NULL; |