Posted October 16, 2009 by MrBerry
We experienced that a lot of our health monitors didnt work on our BigIP boxes, and we sure as hell didnt see why.
After surfing a bit on the magical devcentral.f5.com, we found out that the BigIP only recieves the first 5120 bytes of a fetched result in a health monitor.
This is how to debug with curl:
curl -H 'Host: virtualhost.webserver1.com' -D - "webserver1.com80/index.html?q=bladdibla" | head -c 5120
Now you can ex. grep for a string to see if your healthcheck will do fine on a webserver (within the 5120 first bytes)
Tags: bigip, curl, health, monitor
Posted October 13, 2008 by MrDingle
Normally when I want to see what the hell a webserver returns for any given request i would use telnet
wrky ~ # telnet webserver01 80
Trying 123.123.123.4...
Connected to webserver01.example.org.
Escape character is '^]'.
GET / HTTP/1.0
HTTP/1.1 301 Moved Permanently
Date: Mon, 13 Oct 2008 11:58:12 GMT
Server: Apache/1.3.34
Location: http://localhost/index.html
Content-Length: 100
Connection: close
Content-Type: text/html; charset=utf-8
This item has moved here
But wait, why not do it the more sane way; using curl with the dump headers trigger:
wrky # curl -D - webserver01.example.org
HTTP/1.1 301 Moved Permanently
Date: Mon, 13 Oct 2008 11:58:28 GMT
Server: Apache/1.3.34
Location: http://webserver01.example.org/index.html
Content-Length: 111
Connection: close
Content-Type: text/html; charset=utf-8
This item has moved here.
And if, like me, you have several virtualhosts (vhosts) on the same webserver; add the host header with the -H header trigger;
wrky ~ # curl -H 'host: picsearch.example.org' -D - webserver01.example.org
HTTP/1.1 200 OK
Date: Mon, 13 Oct 2008 12:05:49 GMT
Server: Apache/1.3.34
Content-Length: 6171
Connection: close
Content-Type: text/html; charset=utf-8
This item has moved here.
Be aware that the -H does NOT stand for Host, but Header – you need to put the word “Host:” before the virtualhost address. Somehing like -H ‘Host: www.cnn.com’
Tags: apache, curl, headers, inspect, lighttpd, virtualhost, webserver