diff --git a/check_curl b/check_curl index 49b1778..ba88f55 100755 --- a/check_curl +++ b/check_curl @@ -87,7 +87,8 @@ OUTPUT_MSG="" OUTPUT_CODE=0 if [ $RESPONSE_CODE -eq 200 ] && [ "$(echo "$RESPONSE_TIME < $CRITICAL_LEVEL" | bc -l)" -eq 1 ]; then - OUTPUT_MSG="OK: ${RESPONSE_TIME}s - $url." + OUTPUT_MSG="OK: ${RESPONSE_TIME}s - $URL." + $OUTPUT_CODE=0 elif [ $RESPONSE_CODE -eq 200 ] && [ "$(echo "$RESPONSE_TIME < $WARNING_LEVEL" | bc -l)" -eq 1 ]; then OUTPUT_MSG="WARNING: response time is slow ($RESPONSE_TIME seconds)." OUTPUT_CODE=1 @@ -103,8 +104,8 @@ if [[ -n ${CONTAINS+x} ]]; then if ! grep -q "$CONTAINS" "$TMP_RESPONSE"; then OUTPUT_MSG+="\nCRITICAL: response did not contain required string!\nFound: $(cat "$TMP_RESPONSE")" OUTPUT_CODE=2 - else - OUTPUT_MSG+="\nOK: response contained required string." + # else + # OUTPUT_MSG+="\nOK: response contained required string." fi fi rm -rf "$TMP_RESPONSE" diff --git a/install.sh b/install.sh index 4b1d9b8..acb8d90 100755 --- a/install.sh +++ b/install.sh @@ -13,4 +13,7 @@ pip install psutil git -C /opt/icinga2-checks pull || git clone https://git.dp15.us/dpanzer/icinga2-checks.git /opt/icinga2-checks ln -s /opt/icinga2-checks/check_iowait.sh /usr/lib64/nagios/plugins/check_iowait -ln -s /opt/icinga2-checks/check_bandwidth /usr/lib64/nagios/plugins/check_bandwidth \ No newline at end of file +ln -s /opt/icinga2-checks/check_bandwidth /usr/lib64/nagios/plugins/check_bandwidth + +rm /usr/lib64/nagios/plugins/check_curl +ln -s /opt/icinga2-checks/check_curl /usr/lib64/nagios/plugins/check_curl