diff --git a/check_haproxy_health b/check_haproxy_health index 7f7590d74cf52314fd3ad0623ebad86126141518..1be5adc3ee0a83c6f699dc44d131e0592401886a 100755 --- a/check_haproxy_health +++ b/check_haproxy_health @@ -12,12 +12,13 @@ # 2021-12-14 v1.3 <axel.hahn@iml.unibe.ch> use updated haproxy paser in sourced file # 2022-04-01 v1.4 <axel.hahn@iml.unibe.ch> use wget default params; shell fixes # 2022-10-21 v1.5 <axel.hahn@unibe.ch> remove grep: warning: stray \ before white space -# 2023-07-28 v1.6 <axel.hahn@unibe.ch> add help page +# 2023-07-28 v1.6 <axel.hahn@unibe.ch> add help page +# 2023-08-23 v1.7 <axel.hahn@unibe.ch> fix wrong exitcode to "critical" # ====================================================================== . $(dirname $0)/inc_pluginfunctions -export self_APPVERSION=1.6 +export self_APPVERSION=1.7 . $(dirname $0)/inc_haproxy_cfg.sh @@ -106,7 +107,7 @@ fi grep "200 OK" $tmpfile >/dev/null if [ $? -ne 0 ]; then - ph.setStatus "error" + ph.setStatus "critical" ph.status "url $safeurl did not contain 200 OK. $(wget -T 5 -t 1 --no-check-certificate -O - -S $url)" else ph.status "HA Proxy $safeurl is up and running." diff --git a/check_ssl b/check_ssl index e80f5d9b5def8438eb762e09970a24ea022adaa0..77e893818d6653f69bc301f72056a8826cc57efa 100755 --- a/check_ssl +++ b/check_ssl @@ -15,8 +15,9 @@ # ds=daniel.schueler@iml.unibe.ch # # 2017-03-03 v1.0 ah,ds -# 2020-03-05 v1.1 <axel.hahn@iml.unibe.ch> switch to ph.* helper functions -# 2023-02-13 v1.2 <axel.hahn@unibe.ch> some shell fixes +# 2020-03-05 v1.1 <axel.hahn@iml.unibe.ch> switch to ph.* helper functions +# 2023-02-13 v1.2 <axel.hahn@unibe.ch> some shell fixes +# 2023-08-23 v1.3 <axel.hahn@unibe.ch> fix wrong exitcode to "critical" # ====================================================================== @@ -75,7 +76,7 @@ function showHelp(){ echo | openssl s_client -connect ${sDomain}:${iPort} >/dev/null 2>&1 if [ $? -ne 0 ]; then - ph.setStatus "error" + ph.setStatus "critical" ph.status "unable to connect to ${sDomain} via port :${iPort} - maybe wrong host ... or port ... wrong chaining" # repeat the last command without redirecting output echo | openssl s_client -connect ${sDomain}:${iPort}