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

couchdb-lb: shell fixes

parent 923b929c
No related branches found
No related tags found
1 merge request!127Update icinga checks and docs
This commit is part of merge request !127. Comments created here will be created in the context of that merge request.
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
# #
# NAGIOS CLIENT CHECK :: see https://projects.iml.unibe.ch/projects/sysadmin/work_packages/3839/activity # NAGIOS CLIENT CHECK :: see https://projects.iml.unibe.ch/projects/sysadmin/work_packages/3839/activity
# #
# ====================================================================== # ======================================================================
...@@ -19,8 +18,8 @@ for myHost in $lbList ...@@ -19,8 +18,8 @@ for myHost in $lbList
do do
ping -c 1 $myHost >$tmpfile || ph.setStatus "critical" ping -c 1 $myHost >$tmpfile || ph.setStatus "critical"
grep "Redirect Host" $tmpfile >/dev/null && ph.setStatus "critical" grep "Redirect Host" $tmpfile >/dev/null && ph.setStatus "critical"
ip=`head -1 $tmpfile | cut -f 2 -d '(' | cut -f 1 -d ')'` ip=$(head -1 $tmpfile | cut -f 2 -d '(' | cut -f 1 -d ')')
loss=`grep "packet loss" $tmpfile | cut -f 6 -d " "` loss=$(grep "packet loss" $tmpfile | cut -f 6 -d " ")
ph.status "Check LB $myHost $ip - $loss loss" ph.status "Check LB $myHost $ip - $loss loss"
test "$loss" = "0%" || cat $tmpfile test "$loss" = "0%" || cat $tmpfile
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment