diff --git a/check_mysql_slave.py b/check_mysql_slave.py index d04f165..ce90b91 100755 --- a/check_mysql_slave.py +++ b/check_mysql_slave.py @@ -73,8 +73,8 @@ def main(args): if exit_code == nagios.STATE_OK: # Only replication delay if everything else is healthy. if not slave_status['Seconds_Behind_Master']: - print("UNKNOWN - Could not retrieve Seconds_Behind_Master") - sys.exit(nagios.STATE_UNKNOWN) + quit_check('Slave is not configured for delay', nagios.STATE_CRIT) + replication_delay = try_int(slave_status['Seconds_Behind_Master']) if args.target_delay: