HTTP Health Check Using Web Monitoring Tool

We have a web monitoring tool that checks the status of a application on some servers and if it’s all good it returns a value of SUCCESS I am trying to integrate that into a HTTP health check on the BIG-IP load balancers. Here is how my HTTP Check is setup

Send String GET /monitoringtool/default.aspx?servername \r\nHost: http://monitoringserver\r\nConnection: Close\r\n\r\n Receive StringSUCCESS

If I assign this to a pool member the member is marked down. If I leave the receive string empty the check works.

I have tested the GET from command line using telnet monitoringserver 80 and then running GET /monitoringtool/default.aspx?servername

And it returns HTTP/1.1 200 OK

SUCCESS

So it should be working, what am I doing wrong?

I’d check out the following SOL, if u haven’t already: 404 Page not found | BIG-IP Documentation

I’d specify http version and shouldn’t the host header be a fqdn? Rather than a URL?

Presume you’re tmos v10.2 or above?

N

I did check out the SOL before asking. I tried it with FQDN as well. I have specified version right now and the same issue occurs. If receive string is empty it’s working fine, if I’m looking for SUCCESS it fails, I also tried to put just 200 in the receive string and it still fails.

Hmmm. I’d probably check curl from the bigip to fully construct the send request. See if that pops up with anything.

Sorry for the late reply.

Curl didn’t pop up anything out of the ordinary. See output below:

[user@INT-f5-1:Active] ~ curl -v http://monitoringserver/gatewaymonitoringtool/default.aspx?servername * About to connect() to monitoringserver port 80 * Trying IP… connected * Connected to monitoringserver (IP) port 80

GET /gatewaymonitoringtool/default.aspx?servername HTTP/1.1 User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5 Host: monitoringserver Accept: /

< HTTP/1.1 200 OK < Date: Sun, 27 Jul 2014 13:47:00 GMT < Server: Microsoft-IIS/6.0 < X-Powered-By: ASP.NET < X-AspNet-Version: 2.0.50727 < Cache-Control: private < Content-Type: text/html; charset=utf-8 < Content-Length: 523 SUCCESS

Given your cURL string, the monitor send string should look something like this:

GET /gatewaymonitoringtool/default.aspx?servername HTTP/1.1\r\nHost: monitoringserver\r\n\r\n

This will send just the request line and Host header. You may want to test with the cURL command to see if the application actually needs these other headers (rare but possible):

curl -v http://monitoringserver/gatewaymonitoringtool/default.aspx?servername -H "Accept:" -H "User-Agent:"

Also, because your monitor request isn’t encrypted, you should be able to tcpdump on that interface and see what the actual traffic looks like between the monitor and the server:

tcpdump -lnni 0.0 -Xs0 port 80 [and any additional filters]

Thanks for the reply Kevin.

The get is set as in your example, the application doesn’t require additional headers.

Here comes the interesting part, running a tcpdump -lnni 0.0 -Xs0 port 80 | grep monitoringserverIP doesn’t bring back any traffic when asigning the health monitor to a pool member, but it does bring back traffic when doing the curl from the command line.

Any ideas?

Do you see ANY traffic back from the monitor request? Do you at least see a complete TCP 3-way handshake? It could be a routing issue. The cURL requests are sourcing from the management IP, while the monitor requests are sourcing from the self-IP.