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

Merge branch 'simple-task/7546-icinga-check-für-ablaufende-gitlab-tokens' into 'master'

delete check_couchdb-lb

See merge request !293
parents 3e550af3 e175643f
No related branches found
No related tags found
1 merge request!293delete check_couchdb-lb
#!/bin/bash
# ======================================================================
#
# NAGIOS CLIENT CHECK :: see https://projects.iml.unibe.ch/projects/sysadmin/work_packages/3839/activity
#
# ======================================================================
. `dirname $0`/inc_pluginfunctions
tmpfile=/tmp/output_ping.log
lbList="couchdb.measured.iml.unibe.ch couchdb.measured.demo.iml.unibe.ch"
lbList="couchdb.measured.iml.unibe.ch couchdb.measured.demo.iml.unibe.ch"
myHost=couchdb.measured.iml.unibe.ch
for myHost in $lbList
do
ping -c 1 $myHost >$tmpfile || ph.setStatus "critical"
grep "Redirect Host" $tmpfile >/dev/null && ph.setStatus "critical"
ip=$(head -1 $tmpfile | cut -f 2 -d '(' | cut -f 1 -d ')')
loss=$(grep "packet loss" $tmpfile | cut -f 6 -d " ")
ph.status "Check LB $myHost $ip - $loss loss"
test "$loss" = "0%" || cat $tmpfile
# cat $tmpfile
done
rm -f $tmpfile
ph.exit
# ----------------------------------------------------------------------
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment