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"
- Hitlar_350051Feb 22, 2018
Nimbostratus
Hi,
I have the scenario ,Loadbalancing based on the URI,
For example 1. to go one server pool under the VIP 2. to go to another server pool under the vip
/study and /sports are different URI
Could anyone please share the syntax of the irule to achieve this target
You can create your own. It is pretty simple. Use next URLs for examples
https://devcentral.f5.com/wiki/iRules.pool.ashx https://devcentral.f5.com/wiki/irules.http_request.ashx https://devcentral.f5.com/wiki/irules.http__uri.ashx
Share the code you created to see if there is any mistake
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