mirror of
https://github.com/FAUSheppy/icinga-webhook-gateway
synced 2025-12-06 23:41:43 +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)
|
||||
|
||||
# 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()
|
||||
|
||||
# validate response content #
|
||||
|
||||
Reference in New Issue
Block a user