adjust rc
This commit is contained in:
parent
b13c7ea8c5
commit
e81696d6b8
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue