From b69c2501fd8e7fb930e7d560c90db660b6dda29b Mon Sep 17 00:00:00 2001 From: benoit Date: Wed, 23 Aug 2023 18:29:44 +0200 Subject: [PATCH] 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. --- check_patroni/types.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_patroni/types.py b/check_patroni/types.py index 2d7f3c8..16789a7 100644 --- a/check_patroni/types.py +++ b/check_patroni/types.py @@ -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]