Skip to content
Snippets Groups Projects
Commit 9dc1ce7e authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

comment ping section

parent e002363f
No related branches found
No related tags found
No related merge requests found
...@@ -26,8 +26,6 @@ tmpfile=/tmp/check_haproxy_status_$$ ...@@ -26,8 +26,6 @@ tmpfile=/tmp/check_haproxy_status_$$
tmpfile2=/tmp/check_haproxy_status2_$$ tmpfile2=/tmp/check_haproxy_status2_$$
tmpfileping=/tmp/check_haproxy_status3_$$ tmpfileping=/tmp/check_haproxy_status3_$$
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
# pre checks # pre checks
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
...@@ -170,21 +168,21 @@ do ...@@ -170,21 +168,21 @@ do
echo -n "${srv} - ${val} " echo -n "${srv} - ${val} "
# v1.3: if it is a servername then ping to it # v1.3: if it is a servername then ping to it
echo ${srv} | grep "^[a-z0-9\-\.]" >/dev/null # echo ${srv} | grep "^[a-z0-9\-\.]" >/dev/null
if [ $? -eq 0 ]; then # if [ $? -eq 0 ]; then
ping -c 1 ${srv} >$tmpfileping # ping -c 1 ${srv} >$tmpfileping
grep "\ 0%\ packet\ loss" $tmpfileping >/dev/null # grep "\ 0%\ packet\ loss" $tmpfileping >/dev/null
if [ $? -eq 0 ]; then # if [ $? -eq 0 ]; then
echo "- Ping OK" # echo "- Ping OK"
else # else
echo "- Ping FAILED" # echo "- Ping FAILED"
cat $tmpfileping # cat $tmpfileping
test "`ph.status`" = "OK" && ph.setStatus "warning" # test "`ph.status`" = "OK" && ph.setStatus "warning"
fi # fi
rm -f $tmpfileping # rm -f $tmpfileping
else # else
echo # echo
fi # fi
# performance data: send summary only # performance data: send summary only
# echo ${srv} | egrep "(FRONTEND|BACKEND)" >/dev/null && ph.perfadd "${label}" "${val}" # echo ${srv} | egrep "(FRONTEND|BACKEND)" >/dev/null && ph.perfadd "${label}" "${val}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment