[pkg-nagios-changes] [Git][nagios-team/monitoring-plugins][trixie] Adding d/p/27_check_mysql_fix_replica, Fixes reported regression for MariaDB...

Jan Wagner (@waja) gitlab at salsa.debian.org
Fri Nov 28 13:07:40 GMT 2025



Jan Wagner pushed to branch trixie at Debian Nagios Maintainer Group / monitoring-plugins


Commits:
a08cd3a8 by Jan Wagner at 2025-11-28T14:07:26+01:00
Adding d/p/27_check_mysql_fix_replica, Fixes reported regression for MariaDB 10.11.14-0+deb12u2 (Closes: #1116027)

- - - - -


2 changed files:

- + debian/patches/27_check_mysql_fix_replica
- debian/patches/series


Changes:

=====================================
debian/patches/27_check_mysql_fix_replica
=====================================
@@ -0,0 +1,51 @@
+Backport of https://patch-diff.githubusercontent.com/raw/monitoring-plugins/monitoring-plugins/pull/2184.patch
+
+--- a/plugins/check_mysql.c
++++ b/plugins/check_mysql.c
+@@ -300,32 +300,20 @@
+ 			num_fields = mysql_num_fields(res);
+ 			fields = mysql_fetch_fields(res);
+ 			for(i = 0; i < num_fields; i++) {
+-				if (use_deprecated_slave_status) {
+-					if (strcmp(fields[i].name, "Slave_IO_Running") == 0) {
+-						slave_io_field = i;
+-						continue;
+-					}
+-					if (strcmp(fields[i].name, "Slave_SQL_Running") == 0) {
+-						slave_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) {
+-						slave_io_field = i;
+-						continue;
+-					}
+-					if (strcmp(fields[i].name, "Replica_SQL_Running") == 0) {
+-						slave_sql_field = i;
+-						continue;
+-					}
+-					if (strcmp(fields[i].name, "Seconds_Behind_Source") == 0) {
+-						seconds_behind_field = i;
+-						continue;
+-					}
++				if ((strcmp(fields[i].name, "Slave_IO_Running") == 0) ||
++				    (strcmp(fields[i].name, "Replica_IO_Running") == 0)) {
++					slave_io_field = i;
++					continue;
++				}
++				if ((strcmp(fields[i].name, "Slave_SQL_Running") == 0) ||
++				    (strcmp(fields[i].name, "Replica_SQL_Running") == 0)) {
++					slave_sql_field = i;
++					continue;
++				}
++				if ((strcmp(fields[i].name, "Seconds_Behind_Master") == 0) ||
++				    (strcmp(fields[i].name, "Seconds_Behind_Source") == 0)) {
++					seconds_behind_field = i;
++					continue;
+ 				}
+ 			}
+ 


=====================================
debian/patches/series
=====================================
@@ -20,3 +20,4 @@
 25_check_users_sd_get_uids
 26_check_mysql_replica
 # feature patches
+27_check_mysql_fix_replica



View it on GitLab: https://salsa.debian.org/nagios-team/monitoring-plugins/-/commit/a08cd3a813e5772d4a8864d45e369716f8eb4b9d

-- 
View it on GitLab: https://salsa.debian.org/nagios-team/monitoring-plugins/-/commit/a08cd3a813e5772d4a8864d45e369716f8eb4b9d
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-nagios-changes/attachments/20251128/4a29d008/attachment-0001.htm>


More information about the pkg-nagios-changes mailing list