This article describes how to create an HTTP-ECV health monitor to check the health of load-balanced Internet proxy servers.
This is most easily configured through the command line interface (CLI), because using the GUI might inadvertently introduce extraneous carriage-return or new-line characters.
Information Required:The destination on the Internet to use for verifying the connectivity of the proxy server. For example, www.example.com .
Cache-control requirements of the proxy server. For example, you might want to prevent the proxy server from returning cached data to the probe, giving a false positive.
Proxy-authorization requirements. Some proxy servers require the client to submit credentials in their request to verify that they may access the Internet.
Refer to the proxy services to see how they were added (using the show runningConfig command). For the most part, it is a simple HTTP or TCP service.
add service “Inet_Proxy_A” 192.168.100.100 TCP 8080 –gslb NONE –maxClient 0 –maxReq –cip DISABLED –usip NO –sp OFF –cltTimeout 3600 –svrTimeout 3600 –CKA YES –TCPB NO –CMP NORun the following command to add the monitor:
add lb monitor Proxy_Monitor HTTP-ECV -customHeaders "Host: www.example.com\r\nCache-control: no-cache\r\n" -send "GET http://www.example.com/" -recv 200 -LRTM ENABLED -interval 30The –customHeaders statement: Here the HOST header specifies the destination of the Internet host you wish to check against. By default, an HTTP-ECV monitor inserts a HOST header using the server’s IP address. Some proxy servers use the HOST header to understand the client’s request. Also, here the CACHE-CONTROL header is inserted to prevent the proxy server from returning cached content. These two headers are separated by carriage-return and new-line codes (“\r\n”).
The –send statement: Here the actual request is defined. The difference here is that the GET verb is followed by the full request, rather than just the path information present in a normal HTTP request. The request uses <protocol> <host> <path>.
The –recv statement: The use of 200 refers to the text string that will be searched on the message's body. In this case the text string "200"
The –interval: By default, an HTTP-ECV monitor runs every five seconds. This might be considered excessive, and changed to a desired interval (30 seconds in this example).
Notes:
If only one Internet resource or HTTP-ECV monitor is used, the failure of a single Internet resource causes all load-balanced proxy servers to be considered DOWN. For example, if all proxy servers are being checked with monitors accessing www.example.com, and that Web site becomes unavailable, all proxy servers would be put out of service, although the Internet connections are actually available.