From 9dc1ce7e35424ca61be9fb3abc4d5425bfecac8d Mon Sep 17 00:00:00 2001 From: "Hahn Axel (hahn)" <axel.hahn@iml.unibe.ch> Date: Wed, 15 Dec 2021 13:37:14 +0100 Subject: [PATCH] comment ping section --- check_haproxy_status | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/check_haproxy_status b/check_haproxy_status index df5d442..b147b99 100755 --- a/check_haproxy_status +++ b/check_haproxy_status @@ -26,8 +26,6 @@ tmpfile=/tmp/check_haproxy_status_$$ tmpfile2=/tmp/check_haproxy_status2_$$ tmpfileping=/tmp/check_haproxy_status3_$$ - - # ---------------------------------------------------------------------- # pre checks # ---------------------------------------------------------------------- @@ -170,21 +168,21 @@ do echo -n "${srv} - ${val} " # v1.3: if it is a servername then ping to it - echo ${srv} | grep "^[a-z0-9\-\.]" >/dev/null - if [ $? -eq 0 ]; then - ping -c 1 ${srv} >$tmpfileping - grep "\ 0%\ packet\ loss" $tmpfileping >/dev/null - if [ $? -eq 0 ]; then - echo "- Ping OK" - else - echo "- Ping FAILED" - cat $tmpfileping - test "`ph.status`" = "OK" && ph.setStatus "warning" - fi - rm -f $tmpfileping - else - echo - fi + # echo ${srv} | grep "^[a-z0-9\-\.]" >/dev/null + # if [ $? -eq 0 ]; then + # ping -c 1 ${srv} >$tmpfileping + # grep "\ 0%\ packet\ loss" $tmpfileping >/dev/null + # if [ $? -eq 0 ]; then + # echo "- Ping OK" + # else + # echo "- Ping FAILED" + # cat $tmpfileping + # test "`ph.status`" = "OK" && ph.setStatus "warning" + # fi + # rm -f $tmpfileping + # else + # echo + # fi # performance data: send summary only # echo ${srv} | egrep "(FRONTEND|BACKEND)" >/dev/null && ph.perfadd "${label}" "${val}" -- GitLab