diff --git a/check_haproxy_health b/check_haproxy_health index 52360e4de03c609c2e0729f2bd412d2c6825b7cb..663243eb0d7afb4bd4ebba0a2f48f9cbd4dcf5b8 100755 --- a/check_haproxy_health +++ b/check_haproxy_health @@ -19,12 +19,6 @@ cfgfile=/etc/haproxy/haproxy.cfg tmpfile=/tmp/check_haproxy_healthcheck_$$ -paramsWget="-T 5 -t 1 --no-check-certificate" -# ^ ^ -# | tries = 1 -# timeout in seconds - - # ---------------------------------------------------------------------- # pre checks # ---------------------------------------------------------------------- @@ -52,16 +46,16 @@ fi safeurl=$( echo $url | sed "s#\(://\)\(.*@\)#\1#g" ) # --- get status page -wget $paramsWget -O $tmpfile $url 2>/dev/null +wget -T 5 -t 1 --no-check-certificate -O $tmpfile $url 2>/dev/null if [ $? -ne 0 ]; then rm -f $tmpfile - ph.abort "UNKNOWN: url $safeurl did not respond. $(wget $paramsWget -O - -S $url)" + ph.abort "UNKNOWN: url $safeurl did not respond. $(wget -T 5 -t 1 --no-check-certificate -O - -S $url)" fi grep "200 OK" $tmpfile >/dev/null if [ $? -ne 0 ]; then ph.setStatus "error" - ph.status "url $safeurl did not contain 200 OK. $(wget $paramsWget -O - -S $url)" + 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." fi diff --git a/check_haproxy_status b/check_haproxy_status index d191353652567d3c4f44d0ea42a57129f313f074..42a1f4a2767bc638be1c3e72af2aab063501b650 100755 --- a/check_haproxy_status +++ b/check_haproxy_status @@ -27,11 +27,6 @@ tmpfile=/tmp/check_haproxy_status_$$ tmpfile2=/tmp/check_haproxy_status2_$$ tmpfileping=/tmp/check_haproxy_status3_$$ -paramsWget="-T 5 -t 1 --no-check-certificate" -# ^ ^ -# | tries = 1 -# timeout in seconds - # ---------------------------------------------------------------------- # pre checks # ---------------------------------------------------------------------- @@ -108,10 +103,10 @@ urlmasked=$( echo $url | sed "s#\(://\)\(.*@\)#\1#g" ) # --- get status page -wget $paramsWget -O $tmpfile $url 2>/dev/null +wget -T 5 -t 1 --no-check-certificate -O $tmpfile $url 2>/dev/null if [ $? -ne 0 ]; then rm -f $tmpfile - ph.abort "UNKNOWN: url $urlmasked did not respond. $(wget --no-check-certificate -O - -S $url)" + ph.abort "UNKNOWN: url $urlmasked did not respond. $(wget -T 5 -t 1 --no-check-certificate -O - -S $url)" fi