Page 1 of 1

check_mysql returning critical even when slave running

Posted: Tue Dec 05, 2017 10:18 am
by waqark3389
Name : nagios-plugins-mysql
Arch : x86_64
Version : 2.2.1
Release : 4git.el7

Hi,

I am checking a mariadb slave via the following command:

/usr/lib64/nagios/plugins/check_mysql --check-slave -u root --warning 1000 -p......

This SOMETIMES is returning an exit code of 2 due to mariadb returning the following:

Slave IO: Preparing Slave SQL: Yes Seconds Behind Master: (null)

This is not an error and the slave is still actually running. I think the check is expecting YES and anything else is seen as a critical.

Is this a bug or am I using it incorrectly.

Thanks.

Re: check_mysql returning critical even when slave running

Posted: Tue Dec 05, 2017 3:38 pm
by dwhitfield
I was about to point you to github, but you seem to have already found it: https://github.com/nagios-plugins/nagio ... issues/347

I did look over the thread and the code, and had another tech take a look too. Neither of us is C devs, but my hunch was you were using a new version of MariaDB, because what you were saying and the code seemed to match up. You seem to have come to that conclusion as well.

I can't speak authoritatively on what the devs will do, but I'd be shocked if we didn't support MariaDB 10.2 at some point.