From 561c3ed9da86373de0b4e55bb8224517a1723ef6 Mon Sep 17 00:00:00 2001 From: benoit Date: Fri, 31 Dec 2021 11:30:17 +0100 Subject: [PATCH] Fix doc layout and threshold doc --- README.md | 12 +++++++----- check_patroni/cli.py | 1 + doc/make_readme.sh | 6 +++--- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 96782e5..9346dfe 100644 --- a/README.md +++ b/README.md @@ -81,11 +81,11 @@ A match is found when : start <= VALUE <= end For example, the followinf command will raise : -* a warning if there is less than 1 nodes -* a critical if there are no nodes +* a warning if there is less than 1 nodes, wich can be translated to outside of range [2;+INF[ +* a critical if there are no nodes, wich can be translated to outside of range [1;+INF[ ``` -check_patroni -e https://10.20.199.3:8008 cluster_has_replica --warning @1 --critical @0 +check_patroni -e https://10.20.199.3:8008 cluster_has_replica --warning 2: --critical 1: ``` ## cluster services @@ -136,8 +136,10 @@ Usage: check_patroni cluster_has_replica [OPTIONS] Check if the cluster has healthy replicates. - A healthy replicate : * is in running state * has a replica role * has a lag - lower or equal to max_lag + A healthy replicate : + * is in running state + * has a replica role + * has a lag lower or equal to max_lag Check: * `OK`: if the healthy_replica count and their lag are compatible with the replica count threshold. diff --git a/check_patroni/cli.py b/check_patroni/cli.py index 7fbe4a6..78bb9c9 100644 --- a/check_patroni/cli.py +++ b/check_patroni/cli.py @@ -265,6 +265,7 @@ def cluster_has_replica( ) -> None: """Check if the cluster has healthy replicates. + \b A healthy replicate : * is in running state * has a replica role diff --git a/doc/make_readme.sh b/doc/make_readme.sh index 884fe6b..a388f77 100755 --- a/doc/make_readme.sh +++ b/doc/make_readme.sh @@ -72,11 +72,11 @@ A match is found when : start <= VALUE <= end For example, the followinf command will raise : -* a warning if there is less than 1 nodes -* a critical if there are no nodes +* a warning if there is less than 1 nodes, wich can be translated to outside of range [2;+INF[ +* a critical if there are no nodes, wich can be translated to outside of range [1;+INF[ ``` -check_patroni -e https://10.20.199.3:8008 cluster_has_replica --warning @1 --critical @0 +check_patroni -e https://10.20.199.3:8008 cluster_has_replica --warning 2: --critical 1: ``` _EOF_ readme