diff --git a/checker/http.py b/checker/http.py index 1039452..673f9c5 100644 --- a/checker/http.py +++ b/checker/http.py @@ -32,6 +32,6 @@ def fetch_with_retry(url, method: str = 'get', retries=3, delay=1, **kwargs): except requests.exceptions.RequestException as e: if i == retries - 1: # raise e - print_icinga2_check_status(f'HTTP request failed after {i + 1} retries: {url}\n{e}', nagios.STATE_UNKNOWN) - sys.exit(nagios.STATE_UNKNOWN) + print_icinga2_check_status(f'HTTP request failed after {i + 1} retries: {url}\n{e}', nagios.STATE_CRIT) + sys.exit(nagios.STATE_CRIT) sleep(delay)