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

haproxy health - fix wget

parent aeaaacf3
No related branches found
No related tags found
1 merge request!12haproxy health - fix wget
...@@ -55,13 +55,13 @@ safeurl=$( echo $url | sed "s#\(://\)\(.*@\)#\1#g" ) ...@@ -55,13 +55,13 @@ safeurl=$( echo $url | sed "s#\(://\)\(.*@\)#\1#g" )
wget $paramsWget -O $tmpfile $url 2>/dev/null wget $paramsWget -O $tmpfile $url 2>/dev/null
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
rm -f $tmpfile rm -f $tmpfile
ph.abort "UNKNOWN: url $safeurl did not respond. $(wget wget $paramsWget -O - -S $url)" ph.abort "UNKNOWN: url $safeurl did not respond. $(wget $paramsWget -O - -S $url)"
fi fi
grep "200 OK" $tmpfile >/dev/null grep "200 OK" $tmpfile >/dev/null
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
ph.setStatus "error" ph.setStatus "error"
ph.status "url $safeurl did not contain 200 OK. $(wget wget $paramsWget -O - -S $url)" ph.status "url $safeurl did not contain 200 OK. $(wget $paramsWget -O - -S $url)"
else else
ph.status "HA Proxy $safeurl is up and running." ph.status "HA Proxy $safeurl is up and running."
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment