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.