Revert commit 20d9d48

For `node_is_alive`, it seemed to be a good idea to exit with a
`CRITICAL` when the target doesn't exist. But for all the rest, UNKNOWN
(which corresponds to a configuration error) seems better.
This commit is contained in:
benoit 2023-08-23 18:29:44 +02:00 committed by Benoit
parent 94a1388d06
commit b69c2501fd

View file

@ -73,7 +73,7 @@ class PatroniResource(nagiosplugin.Resource):
return r.json()
except requests.exceptions.JSONDecodeError:
return None
raise APIError("Connection failed for all provided endpoints")
raise nagiosplugin.CheckError("Connection failed for all provided endpoints")
HandleUnknown = Callable[[nagiosplugin.Summary, nagiosplugin.Results], Any]