Forum Discussion
Regarding custom monitor for multiple pool members
I have three pool members and I wanted to create a custom monitor. The pool member will response with string "GREEN" in response to
https://pool_member_ip/inside/nzvi/poll
when I am creating a monitor with the following send and receive string as:
send string - GET /inside/nzvi/poll HTTP/1.1\r\nHost: pool_member_1_ip\r\nConnection: Close\r\n\r\n
receive string - GREEN
only pool member 1 is showing up, rest pool member 2 and pool member 3 are showing down.
if I change the IP in the send string to pool member 2 IP, pool member 2 will show up and other two members will show down and so on.
pls help me how I create the send string to accommodate all the pool members.
This depends on the configuration of your backend servers, here's a few things to test:
- Send the application hostname in the host header instead of the ip address.
- Send an empty host header (Host: \r\n)
- If the above don't work, this means that your backend server requires explicit host header to identify the resource to serve. In this case, you can create three custom monitors, one for each pool member, and within the member configuration override the 'inherit from pool' default monitor setting and select the appropriate monitor
- Shoaib_020
Altostratus
Thanks for the reply.
Regarding the first point, do you mean to say I have to define the VIP IP in the send string as below:
send string - GET /inside/nzvi/poll HTTP/1.1\r\nHost: VIP_IP\r\nConnection: Close\r\n\r\n
No I mean the hostname www.example.com
You can also try without forcing the HTTP version to HTTP/1.1 and so you can get rid of the host header, as mentioned by zamroni777 but this assumes your server supports HTTP/0.9
For details you need to read Constructing HTTP requests for use with the HTTP or HTTPS application health monitor (f5.com)
because the intended value is pool member's IP address, then you dont need to specify the value for the Host header because it is default value used by LTM monitor.
Connection: close and HTTP/1.1 things are also not needed as LTM monitor will use the TCP connection for 1 requset and properly close it after getting response.
- Shoaib_020
Altostratus
Okay. So the send string will look like as below right ?
GET /inside/nzvi/poll \r\n Host: \r\n
This is not correct. Please be aware of these basic http monitors concepts:
- If you don't specify the HTTP version, then the monitor will default to version 0.9 which is not supported by many web servers
- If you need to talk to a server using HTTP/1.1, then you need to specify a Host header, although its value can be empty
- Connection: close is not mandatory but a good practice to be sure servers implementing keep alives do close the connection
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