I normally use the option “Fixed string to expect” so you can be sure, that the page really contains what you are looking for and “redirect” to “warning” to be sure you really check the URI you have configured in the check.
I’m not the expert but for me that worked very well.
As soon as the http-check works you can fine tune it with “page size to expect” or “expected response time”.
yes you can enter any string that is in the body. I don’t know the exact option for the CLI I use the WATO configuration but I suppose that it’s “-s string”. The check_command in CMK is: " ‘-s’ ‘string’ "
HTTP CRITICAL: HTTP/1.1 301 Moved Permanently - string 'instagram' not found on 'http://www.instagram.com:80/instagram' - 284 bytes in 0.040 second response time |time=0.039853s;;;0.000000;30.000000 size=284B;;;0
I’m not sure if its handled because of the redirect. I can test this this evening on my system. Why don’t you look after the final page “https://www.instagram.com” because you get redirected to this one if you enter “Login • Instagram”.
You can do this just to test if the string context is working.
This URL will not work under any circumstances. NonSSL gives no real response.
For all the tests you have to keep in mind that check_http cannot handle any Javascript or other active content. @Josef gave already the right example with an complete URI at the end.
HTTP CRITICAL: HTTP/1.1 301 Moved Permanently - string 'instagram' not found on 'http://www.instagram.com:80/instagram' - 284 bytes in 0.152 second response time |time=0.151503s;;;0.000000;10.000000 size=284B;;;0
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.