mirror of
https://github.com/FAUSheppy/icinga-webhook-gateway
synced 2025-12-07 16:01:38 +01:00
add check for 404 service not configured
This commit is contained in:
@@ -34,6 +34,10 @@ if __name__ == "__main__":
|
|||||||
response = requests.get(url)
|
response = requests.get(url)
|
||||||
|
|
||||||
# check response status #
|
# check response status #
|
||||||
|
if response.status_code == 404:
|
||||||
|
print("The gateway does not have this service configured (404)")
|
||||||
|
sys.exit(STATUS_UNKOWN)
|
||||||
|
|
||||||
response.raise_for_status()
|
response.raise_for_status()
|
||||||
|
|
||||||
# validate response content #
|
# validate response content #
|
||||||
|
|||||||
Reference in New Issue
Block a user