Quantcast
Channel: StackExchange Replication Questions
Viewing all articles
Browse latest Browse all 17268

monitoring MySQL slave status

$
0
0

I'm using Nagios with the mysql_check_health pugin to monitor my MySQL databases. I need to be able to return a numeric value to my plugin from an sql query to tell me if the replicated database is up and running. so here is what I have...

SHOW GLOBAL STATUS like 'slave_running'     

will return:

Variable_name   Value
Slave_running   OFF/ON

I need to retrun a numeric value from a simple query for the plugin, anyone have any ideas... my thought was to return 3-LENGTH(Slave_running) that would == 1 for ON 0 for off but having trouble using the return values in that way.


Viewing all articles
Browse latest Browse all 17268

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>