check_mysql_slave: crit when misconfigured

This commit is contained in:
Cyberes 2024-04-05 23:53:42 -06:00
parent f911448a90
commit b29dc0ee6e
1 changed files with 2 additions and 2 deletions

View File

@ -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: