Forum Discussion
How to create custom monitor
- May 16, 2023
shadow82 If your pool member is listening on port 8080 you do not have to define the Alias Service Port in the health monitor because it will inherit the port from the pool member when the health monitor is performed. Now as far as the send string is concerned, I would use HTTP 1.0 instead of 1.1 since you aren't really defining an appropriate Host value. The reason for the "HEAD" rather than a "GET" is because it doesn't seem as though you are interested in anything from the body of the page so no need to query anything but the HTTP header. In addition to that, your receive string is incorrect and should use an escape \ after the HTTP in the response.
Send String: HEAD /stats HTTP/1.0\r\nConnection: Close\r\n
Receive String: HTTP\/1\.(0|1) 200 OKRealistically if they would like for this to be an HTTP 1.1 connection they shoud provide you with an appropriate host header value rather than the IP of the pool member you are balancing traffic to. If they decide to use HTTP 1.1 and they provide you the appropriate Host value your health monitor should look similar to the following.
Send String: HEAD /stats HTTP/1.1\r\nHost: www.example.com\r\nConnection: Close\r\n\r\n
Receive String: HTTP\/1\.(0|1) 200 OKNow if you wanted to know why the health monitor is failing you should be able to perform the following tcpdump and replacing the information where the <> are less the <> to filter the tcpdump a bit further.
tcpdump -nnvvvi 0.0 host <f5_selfIP_closest_to_destination> and host 10.0.10.11 and port 8080
This should show you the response from the pool members in relatively plain text so you can see what the server is responding back with. The following is a curl command you can enter on the F5 CLI in bash to see what the pool member is responding with.
*** No Host header value ***
curl -Ivk "http://10.0.10.11:8080/stats"*** Host header value ***
curl -IvkH 'Host: <your_fqdn>' "http://10.0.10.11:8080/stats"
Normally you don't need to specify "Alias Address" or "Alias Service Port" in the monitor configuration, because these values will be taken automatically from the poolmember. These two values are only required, if you need to monitor something else, other then the poolmember itself.
But I don't understand the issue in your post at all, means what was your previous configuration (monitor and poolmembers) and what has been changed? From what you are describing it should normally become green with default settings. Alternativelly you could run a tcpdump on the CLI to verify what's the reason for the monitor becoming red.
Regards Stefan 🙂
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