Forum Discussion
Can F5 Health Monitor follow a redirect chain?
I have an application that I am trying to setup a health monitor for and have the following:
Send String: GET /layout.json HTTP/1.1\r\nHost: \r\nConnection: Close\r\n\r\n
Receive String: HTTP/1.(0|1) (2|302)
This works except when the database connection goes down. Tomcat is still running, so the page still sends a 302 redirect to some cookie check. Then 302 redirects back to the layout page which produces a status 500 error. Is there a way for the health check to follow this chain to the end where it would give a 200 or 500 code and down the node? Thanks for any help.
5 Replies
- Michael_Jenkins
Cirrostratus
You could create a secondary monitor to check the layout page for success and use them both on the pool. I don't remember if the monitors function as OR or AND so this may not work. But it's worth a shot.
- Michael_Jenkins
Cirrostratus
Does the 302 redirect to a single page, or does it use different locations depending on other circumstances?
- nitass
Employee
just wondering why don't monitor the redirection target.
sol3224: HTTP health checks may fail even though the node is responding correctly
https://support.f5.com/kb/en-us/solutions/public/3000/200/sol3224.htmlmetaif you really want to follow redirection, external monitor (e.g. curl -L) may be a way to go.
- R_Melissari_180
Nimbostratus
Michael J: Not sure what a secondary monitor would check? The initial responses look the same whether the database is up or not. It 302 directs to a cookie check and then back to the page. It is only at the end does it give me a status 200 or 500 that I could use. The application does this cookie check redirect on every page it serves out as far as I can tell. At the end of the chain it is at the same page I initially went to.
Nitass: It is just a cookie check and arrives back at the original location. I just don't know how to send it a fake cookie or string to bypass the check and get to the end of the chain. Do you have any documentation handy on setting up a curl monitor with the F5 to down nodes?
Thank you for your responses.
- Michael_Jenkins
Cirrostratus
I haven't done custom external monitors before, but I think what nitass mentioned would be something like this. It may get you started on the path.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com