mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-06-13 10:40:01 -04:00
Merge pull request #2163 from RincewindsHat/check_mysql_more_renaming
More renaming due to MySQL name chances
This commit is contained in:
commit
ea8e421f4c
1 changed files with 26 additions and 11 deletions
|
|
@ -282,17 +282,32 @@ int main(int argc, char **argv) {
|
|||
num_fields = mysql_num_fields(res);
|
||||
fields = mysql_fetch_fields(res);
|
||||
for (int i = 0; i < num_fields; i++) {
|
||||
if (strcmp(fields[i].name, "Slave_IO_Running") == 0) {
|
||||
replica_io_field = i;
|
||||
continue;
|
||||
}
|
||||
if (strcmp(fields[i].name, "Slave_SQL_Running") == 0) {
|
||||
replica_sql_field = i;
|
||||
continue;
|
||||
}
|
||||
if (strcmp(fields[i].name, "Seconds_Behind_Master") == 0) {
|
||||
seconds_behind_field = i;
|
||||
continue;
|
||||
if (use_deprecated_slave_status) {
|
||||
if (strcmp(fields[i].name, "Slave_IO_Running") == 0) {
|
||||
replica_io_field = i;
|
||||
continue;
|
||||
}
|
||||
if (strcmp(fields[i].name, "Slave_SQL_Running") == 0) {
|
||||
replica_sql_field = i;
|
||||
continue;
|
||||
}
|
||||
if (strcmp(fields[i].name, "Seconds_Behind_Master") == 0) {
|
||||
seconds_behind_field = i;
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
if (strcmp(fields[i].name, "Replica_IO_Running") == 0) {
|
||||
replica_io_field = i;
|
||||
continue;
|
||||
}
|
||||
if (strcmp(fields[i].name, "Replica_SQL_Running") == 0) {
|
||||
replica_sql_field = i;
|
||||
continue;
|
||||
}
|
||||
if (strcmp(fields[i].name, "Seconds_Behind_Source") == 0) {
|
||||
seconds_behind_field = i;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue