check_mysql_slave: crit when misconfigured
This commit is contained in:
parent
f911448a90
commit
b29dc0ee6e
|
@ -73,8 +73,8 @@ def main(args):
|
||||||
if exit_code == nagios.STATE_OK:
|
if exit_code == nagios.STATE_OK:
|
||||||
# Only replication delay if everything else is healthy.
|
# Only replication delay if everything else is healthy.
|
||||||
if not slave_status['Seconds_Behind_Master']:
|
if not slave_status['Seconds_Behind_Master']:
|
||||||
print("UNKNOWN - Could not retrieve Seconds_Behind_Master")
|
quit_check('Slave is not configured for delay', nagios.STATE_CRIT)
|
||||||
sys.exit(nagios.STATE_UNKNOWN)
|
|
||||||
replication_delay = try_int(slave_status['Seconds_Behind_Master'])
|
replication_delay = try_int(slave_status['Seconds_Behind_Master'])
|
||||||
|
|
||||||
if args.target_delay:
|
if args.target_delay:
|
||||||
|
|
Loading…
Reference in New Issue