Compare commits

..

No commits in common. "540ad83ef8ca6c3785aaf4467465b5e5fd6687fd" and "050ba916bab6cad19576908160c04a9938d22dad" have entirely different histories.

2 changed files with 3 additions and 5 deletions

View File

@ -91,9 +91,6 @@ url=''
GetOptions "$@"
eval $(curl -L -o /dev/null -s -w 'RESPONSE_CODE=%{response_code}\nRESPONSE_TIME=%{time_total}\nDNS_TIME=%{time_namelookup}\nCONNECT_TIME=%{time_connect}' ${proxy:+"--proxy" "$proxy"} $url)
response_time=$(printf %.3f $(echo ${RESPONSE_TIME}))
dns_time=$(printf %.3f $(echo ${DNS_TIME}))
connect_time=$(printf %.3f $(echo ${CONNECT_TIME}))
rdetail=""
if (( $(echo "$RESPONSE_CODE != 200" | bc -l) )); then
rval=2
@ -110,5 +107,5 @@ else
rmsg="CRITICAL"
fi
unit='s'
echo "URL ${rmsg} - ${rdetail:+"$rdetail - "}Response code: ${RESPONSE_CODE} Response Time: ${response_time} DNS Lookup time: ${dns_time} Connect time: ${connect_time}|response=${response_time}${unit} dns-query=${dns_time}${unit} connect=${connect_time}${unit}"
echo "URL ${rmsg} - ${rdetail:+"$rdetail - "}Response code: ${RESPONSE_CODE} Response Time: ${RESPONSE_TIME} DNS Lookup time: ${DNS_TIME} Connect time: ${CONNECT_TIME}|response=${RESPONSE_TIME}${unit} dns-query=${DNS_TIME}${unit} connect=${CONNECT_TIME}${unit}"
exit $rval

View File

@ -102,7 +102,8 @@ jobsdue=$(echo $health | jq '.JobsDue')
jobsrunning=$(echo $health | jq '.JobsRunning')
jobsfailing=$(echo $health | jq '.JobsFailing')
val=$(printf %.3f $(echo "$jobsfailing/$jobstotal" | bc -l))
val=$(echo "$jobsfailing/$jobstotal" | bc -l)
rdetail=""
if (( $(echo "$RESPONSE_CODE != 200" | bc -l) )); then
rval=2