Skip to content

Conversation

@RincewindsHat
Copy link
Member

Due to MySQL changing several term in Version 8.0.22 the way to determine the status of replicas has changed.
To adapt to these changes in a517dc6 check_mysql was modified to adapt to different versions. Some parts were missed though which results in failures to detect the replica status properly.

This parts should be contained in this commit.

Should also fix some of the problems discussed in #2068

Ping @waja therefore. these changes have to added to the maintenance branch

Due to MySQL changing several term in Version 8.0.22 the way to
determine the status of replicas has changed.
To adapt to these changes in a517dc6
check_mysql was modified to adapt to different versions.
Some parts were missed though which results in failures to detect
the replica status properly.

This parts should be contained in this commit.
@waja
Copy link
Member

waja commented Oct 1, 2025

Hi @RincewindsHat,

patching 2.4.0 results into compiling issues:

check_mysql.c: In function ‘main’:
check_mysql.c:305:49: error: ‘replica_io_field’ undeclared (first use in this function); did you mean ‘slave_io_field’?
  305 |                                                 replica_io_field = i;
      |                                                 ^~~~~~~~~~~~~~~~
      |                                                 slave_io_field
check_mysql.c:305:49: note: each undeclared identifier is reported only once for each function it appears in
check_mysql.c:309:49: error: ‘replica_sql_field’ undeclared (first use in this function); did you mean ‘slave_sql_field’?
  309 |                                                 replica_sql_field = i;
      |                                                 ^~~~~~~~~~~~~~~~~
      |                                                 slave_sql_field
make[4]: *** [Makefile:2624: check_mysql-check_mysql.o] Error 1

Cheers, Jan

@waja
Copy link
Member

waja commented Oct 1, 2025

@RincewindsHat I've adjusted my patchset to use slave_io_field and slave_sql_field for 2.4.0.

My patchset you can find at https://salsa.debian.org/nagios-team/monitoring-plugins/-/blob/trixie/debian/patches/25_check_mysql_replica

@waja
Copy link
Member

waja commented Oct 1, 2025

@RincewindsHat I've adjusted my patchset to use slave_io_field and slave_sql_field for 2.4.0.

My patchset you can find at https://salsa.debian.org/nagios-team/monitoring-plugins/-/blob/trixie/debian/patches/25_check_mysql_replica

@RincewindsHat Joe is reporting the latest patchset is working. 🎉

@RincewindsHat RincewindsHat merged commit ea8e421 into monitoring-plugins:master Oct 6, 2025
7 checks passed
@RincewindsHat RincewindsHat deleted the check_mysql_more_renaming branch October 6, 2025 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants