diff --git a/check_home_assistant.py b/check_home_assistant.py index 8ceeee1..a782af9 100755 --- a/check_home_assistant.py +++ b/check_home_assistant.py @@ -24,7 +24,7 @@ try: except: print('Unknown: failed to fetch data') traceback.print_exc() - sys.exit(nagios.STATE_UNKNOWN) + sys.exit(nagios.STATE_CRIT) if res.status_code == 200: if state == 'API running.': @@ -34,4 +34,4 @@ if res.status_code == 200: sys.exit(nagios.STATE_CRIT) else: print(f'Unknown: Request returned status code {str(res.status_code)}') - sys.exit(nagios.STATE_UNKNOWN) + sys.exit(nagios.STATE_CRIT)