is it possible to get a warning or critical if the http Link is not reachable. I get only a unknown.
PS C:\WINDOWS\system32> Invoke-IcingaCheckHTTPStatus -URL http://test -StatusCode 200,105 -Warning 1 -Verbosity 3
[UNKNOWN] HTTP Status Check: 1 Unknown [UNKNOWN] HTTP Status Check http://test (All must be [OK])
_ [UNKNOWN] HTTP Status Check http://test (All must be [OK])
_ [OK] HTTP Content Check (Atleast 1 must be [OK])
_ [UNKNOWN] HTTP Response Time: 0us
_ [UNKNOWN] HTTP Status Code: The remote name could not be resolved: ‘test’
| ‘http_test.http_status’=The remote name could not be resolved: ‘test’;; ‘http_test.http_response_time’=0s;; ‘http_test.ht
tp_content_size’=0B;;
3
It is not reachable, because it cannot be resolved. In this case, a Unknown is a valid response (imho).
Test it with a valid URL and you should get a critical, when it is not reachable.