Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check_mysql not working with mysql 8.4.0 LTS #771

Open
qeepcologne opened this issue Apr 30, 2024 · 2 comments
Open

check_mysql not working with mysql 8.4.0 LTS #771

qeepcologne opened this issue Apr 30, 2024 · 2 comments

Comments

@qeepcologne
Copy link

qeepcologne commented Apr 30, 2024

check_mysql -S option uses deprecated query "show slave status" which is finally removed in mysql 8.4.0 LTS
query need to be replaced with "show replica status", result parsing also need to be adjusted:
Seconds_Behind_Source: 0
instead of
Seconds_Behind_Master: 0
etc

show replica status should work from 8.0 and show slave status is deprecated from 8.0.22

@qeepcologne
Copy link
Author

suggestion is to keep current option -S, --check-slave as it is
and add new -R --check-replica

@qeepcologne
Copy link
Author

qeepcologne commented May 2, 2024

quickfix, replace plugin with plain query:

# check replication is running and check/return the delay
define command{
        command_name    check_mysql_replica
        command_line    $USER1$/check_mysql_query -H $HOSTADDRESS$ -u $USER3$ -p $USER4$ -q "SELECT IF(q.replica_io_running='ON' and q.replica_sql_running='ON', q.replica_delay, -1) FROM(select rc.SERVICE_STATE as replica_io_running, rs.SERVICE_STATE as replica_sql_running, gv.VARIABLE_VALUE as replica_delay FROM performance_schema.replication_connection_status as rc, performance_schema.replication_applier_status_by_coordinator as rs, performance_schema.global_variables as gv WHERE gv.variable_name='innodb_replication_delay') as q" -w 30 -c 600
}

# check_mysql -S uses old show slave status, which does not work from mysql 8.4
define command{
        command_name    check_mysql_replica_old
        command_line    $USER1$/check_mysql -H $HOSTADDRESS$ -u $USER3$ -p $USER4$ -S -w 30 -c 600
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants