Monit checking URL follow redirects

Posted by beck on Server Fault See other posts from Server Fault or by beck
Published on 2012-03-20T14:43:27Z Indexed on 2012/03/20 23:31 UTC
Read the original article Hit count: 242

Filed under:

I am looking to use monit to keep an eye on my site. I want it to treat it the site like an external user so am testing the url but it doesn't seem to follow redirects. The content check is being performed on the html of the redirect.

#request works:
if failed url http://www.sharelatex.com/blog/posts/future.html content == "301"

#request fails
if failed url http://www.sharelatex.com/blog/posts/future.html content == "actual content"

Finding out how to get the url check to follow 30X would be great.

© Server Fault or respective owner

Related posts about monitoring