diff --git a/README.md b/README.md index 0bfe0c7..a33ea4b 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ On Debian or Ubuntu install those packages: -f Follow redirects -k Ignore SSL certificate errors - -e Expected HTTP response code [HTTP_RESPONSE_CODE] + -e Expected HTTP response code [HTTP_RESPONSE_CODE[,HTTP_RESPONSE_CODE,...]] --proxy Proxy [http://PROXY:PORT] --agent Agent [USER_AGENT] diff --git a/check_curly b/check_curly index 1b2c89f..707f7c5 100755 --- a/check_curly +++ b/check_curly @@ -15,7 +15,7 @@ Originally written by Vit Safar, extended by Michael Kraus -f Follow redirects -k Ignore SSL certificate errors - -e Expected HTTP response code [HTTP_RESPONSE_CODE] + -e Expected HTTP response code [HTTP_RESPONSE_CODE[,HTTP_RESPONSE_CODE,...]] --proxy Proxy [http://PROXY:PORT] --agent Agent [USER_AGENT] @@ -363,7 +363,7 @@ $body if (isset($Expected)) { - if ($http_code != $Expected) { + if (! in_array($http_code, explode(",", $Expected))) { $Msg.='CRITICAL http_response code '.$http_code.' does not match expected '.$Expected; nagios_exit(2); }