1

unfortunately, the documentation is not clear about the HTTP content.

https://mmonit.com/monit/documentation/monit.html#HTTP

i want to monitor a specific response header, not the content itself, like this:

CHECK HOST example.de WITH ADDRESS example.de
 IF FAILED
   port 443 protocol https
   with ssl options {verify: enable}
   certificate valid > 15 days
   content == "Location: https://example.com/de/"
 THEN alert

As you see, I want to make sure the certificate is valid and the webserver is redirecting to the correct target url (so, only checking for 301 is not the solution).

Content in context of monit seems not to include the response headers. I tried it with send/expect, but monit refuses to start then (I did not investigate that further, because I can't believe it's not possible to do it "right".

Monit status is FAILED to [example.de]:443 type TCP/IP using TLS protocol HTTP with CONNECTION FAILED, which is a lie. Because if I delete the "content" line, the check is green/ok.

0

Latest Monit version (5.25.3) does not support check headers from response.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.