Forum Discussion
Theo_12742
Apr 26, 2016Cirrus
While it's not well documented, the HTTP monitor will accept any response (including 302's). However, you can control this behavior by using RegEx in the Receive String. For example, I use the following (and use HTTP >= 1.0):
^HTTP.1\.[0|1]\s([2|3][0-9][0-9])
Which marks the monitor as up for any HTTP code 200-399.
- john4665f5Apr 26, 2016NimbostratusHello Theo, Thank you for the response. I've tested a 302 response and the node was marked down, but a 301 works just fine. I didn't get a chance to look further into like the bigd debugs, but I wonder if it was because the response was "302 Found" instead of a typical 302 temporary redirect. Just to clarify the reason for this question is not how to make the node available, I can modify the send/recv strings in a child monitor to pass the host header, 302, etc. and mark it up, but just curious as to what the default expected responses are. Thank you, John
- Theo_12742Apr 26, 2016CirrusIf that's the case, then I'll point you to the LTM monitors reference (https://support.f5.com/kb/en-us/products/big-ip_ltm/manuals/product/ltm-monitors-reference-11-5-0/3.htmlunique_475041279): "Note: If you do not specify both a Send String and a Receive String, the monitor performs a simple service check and connect only."
- john4665f5Apr 26, 2016NimbostratusHello Theo, The default http monitor has a send string configured by default, so there is a send string, but no "recv" string. Based on that documentation the http monitor check is essentially a TCP monitor. Maybe I should contact F5 directly to find this answer. Thank you, John
- Theo_12742Apr 26, 2016CirrusTo be clear, that is a quote from F5's documentation, but you are correct in that it requires both a SEND and a RECEIVE string to evaluate the response. Tthe F5 does send the SEND string to the backend server, but only fails the monitor if it doesn't receive a response. Slightly different from a TCP monitor in the implementation, but very similar result. As a best practice I always specify a RECEIVE string in my implementations.