Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Answers

Default HTTP/HTTPS monitor acceptable HTTP status codes?

Hello,

I've been digging through F5's LTM documentation, but I am not able to find anything solid on the default acceptable HTTP/HTTPS monitor status codes. What is the LTM expecting back using the default HTTP/HTTPS monitors from the servers residing in a pool or directly associated with the node?

Thank you, John

0
Rate this Question

Answers to this Question

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

I'm pretty sure that ANY HTTP response is enough to keep the monitor up.

1
Comments on this Answer
Comment made 26-Apr-2016 by John 7
Hello Kevin, I don't believe so. I've done some testing on 11.5.3 HF2 with a server responding with a 302 and it failed; however, a 301 response is perfectly fine and the LTM will mark the node available. It would be nice if this was laid out somewhere in an SOL article on the default acceptable responses, but I wasn't able to find anything solid. Thank you, John
0
Comment made 26-Apr-2016 by John 7
Hello Kevin, You were right. Any response is valid except in certain conditions for redirects and other little caveats. Most of the information can be found in the SOL3224. This was confirmed with an F5 contact. https://support.f5.com/kb/en-us/solutions/public/3000/200/sol3224.html Thank you, John
0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

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.

0
Comments on this Answer
Comment made 26-Apr-2016 by John 7
Hello 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
0
Comment made 26-Apr-2016 by Theo 380
If 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.html#unique_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."
0
Comment made 26-Apr-2016 by John 7
Hello 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
0
Comment made 26-Apr-2016 by Theo 380
To 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.
0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

At a minimum the default HTTP monitor send string is too simple. Change it to the following more specific string and you should see a difference:

GET /redir.php HTTP/1.1\r\nHost: foo\r\n\r\n

Obviously change the URI as required.

0
Comments on this Answer
Comment made 26-Apr-2016 by John 7
Hello Kevin, Thank you for the feedback. Unfortunately, this isn't exactly what I'm looking for. Just trying to find out what the LTM is expecting by default. Thank you, John
0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

Take a look at these references:

https://support.f5.com/kb/en-us/solutions/public/11000/300/sol11359.html?sr=53330875

https://support.f5.com/kb/en-us/solutions/public/3000/200/sol3224.html

And most important: https://support.f5.com/kb/en-us/products/lc_9_x/manuals/product/lc-monitors-reference-11-6-0/1.html?sr=53331011

You can also use the default null Receive String value [""]. In this case, any content retrieved is considered a match. If both the Send String and Receive String fields are left empty, only a simple connection check is performed.

0