check_mysql returning critical even when slave running

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
waqark3389
Posts: 1
Joined: Tue Dec 05, 2017 10:12 am

check_mysql returning critical even when slave running

Post 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.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: check_mysql returning critical even when slave running

Post 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.
Locked