Configuring Monitors on F5 LTM

I am fairly new to F5 and trying to set monitors for my SharePoint farm , I tried creating HTTP monitor , its just basic HTML file with “Up” text in it … What I am trying to achieve is , if I change this text from “Up” to “Down” it should take that node out of Load Balancer Pool , and converting it to “Up” again should put that node back in Load Balancer pool. Below is my Send and Receive strings :

Send String : GET /http://server:port/_layouts/images/filename.html HTTP/1.1\r\n Receive String : Up

As soon as I apply this Receive String , both nodes goes down … If I keep Receive String as “OK” or blank it works fine but that’s not solving my purpose. Please let me know what’s wrong here , Is there any other way to achieve this. Pardon me if its very basic thing to do … Thanks

Can you run a telnet test from the BIG-IP to see what HTTP’s coming back from the server? I just did a quick test and the monitor uses Up or Down in the receive string with no issue. Here’s what my server response looks like:

HTTP/1.1 200 OK
Date: Thu, 07 Nov 2013 21:46:30 GMT
Server: Apache/2.2.22 (Ubuntu)
Last-Modified: Thu, 07 Nov 2013 21:45:45 GMT
ETag: "41028-25-4ea9d3027d15c"
Accept-Ranges: bytes
Content-Length: 37
Vary: Accept-Encoding
Connection: close
Content-Type: text/html

10.12.23.27
server
Up

Thanks for your reply … Can you help me with telnet … How will I do telnet in URL like : http://Server IP:port/_layouts/images/filename.html

I did telnet in server with port , but what’s my GET will be like ? File I am trying to hit is folder structure on server.

Again : Sorry for basic , I am not N/W Admin …

Sure, so it would look something like this (my comments in )

telnet 10.10.10.1 80
 Then type
GET /_layouts/images/filename.html HTTP/1.1
 Enter twice

Another, perhaps easier method:

curl http://10.12.23.27/\_layouts/images/filename.html

Thanks , but that doesn’t look good … here is the response :

HTTP/1.1 400 Bad Request Content-Type: text/html; charset=us-ascii Server: Microsoft-HTTPAPI/2.0 Date: Thu, 07 Nov 2013 23:05:42 GMT Connection: close Content-Length: 334

Bad Request

Bad Request - Invalid Hostname

HTTP Error 400. The request hostname is invalid.

Ah, the host header is required by most web-servers. We’ll try again:

telnet 10.10.10.1 80
 Then type
GET /_layouts/images/filename.html HTTP/1.1
 Enter once
HOST: server domain
 Enter twice

Thanks again , here is telnet response :

HTTP/1.1 200 OK Cache-Control: max-age=31536000 Content-Type: text/html Last-Modified: Thu, 07 Nov 2013 17:52:30 GMT Accept-Ranges: bytes ETag: “4f355421e2dbce1:0” Server: Microsoft-IIS/7.5 X-Powered-By: ASP.NET MicrosoftSharePointTeamServices: 14.0.0.6137 X-MS-InvokeApp: 1; RequireReadOnly Date: Fri, 08 Nov 2013 02:29:53 GMT Content-Length: 2

Your Sharepoint server is not returning the “Up” message you’re waiting for. The reason that your monitor works with the OK message is because in your response header the HTTP code is 200 followed by the message “OK”.

Had you try to reach your Sharepoint web page to check if it’s returning what you want ?

Thanks Thomas but That’s Strange … I am able to browse to HTML file using server name , IP or host header … I get “Up” text on my browser when I browse it.

To clarify .. I created Text file in 14 hive location on SharePoint frontend servers, Put “Up” in that and then change the file extension from txt to HTML … I put , Send String : GET /http://server:port/_layouts/images/filename.html HTTP/1.1\r\n and Receive String : Up. Tried browsing the location using Individual server name , Server IP and Port and through Host header and got good response …

Not sure what am I missing here … Please suggest

Here is your little mistake :

GET /http://server:port/_layouts/images/filename.html HTTP/1.1\r\n

You’re asking your monitor to reach /http://… on your web server. This page cannot exist.

What you have to write into your send string is just :

GET /_layouts/images/filename.html \r\n

It should work with it.

Wow … Thanks a lot Thomas , That worked .. I put “Down” in Receive Disable String , and change send string as you suggested … and its all working as expected… I am sure it was very simple monitor to configure (Not for me though) … but my next task will be little more complicated … basically I am trying to configure monitors for IIS level .. so it should enable or disable Pool member if Application Pool / IIS site goes down and also if there is any interruption on specified windows service. I got this article and it sounds the same that I am trying to do… Please let me know if there is any other link that I can refer… Thanks Thomas and F5Help.

Hi ArtRst Thoman, URGENT early response will be appreciated. if you are still on then can you tell me what you have done exactly to make it work. I am using iApp to configure. I have two node (servers) 10.160.0.106 & 10.160.0.107.

I am able to telnet on port 7002 and working okay. and also both servers returning response for below command from CLI.

GET http://10.160.0.106:7002/oncfo/index.html curl -v http://10.160.0.106:7002/oncfo/index.html

however when I do tcpdump and surprised to see that there is no response of default monitor GET command.

monitor string looks like below. GET /oncfo/index.html

but when I tried from CLI, the below output in tcpdump. GET /oncfo/index.html HTTP/1.1

User-Agent: curl/7.19.7 (i686-redhat-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8u zlib/1.2.3 libidn/0.6.5

Host: 10.160.0.107:7002

Accept: /

however the Pool is still down due to Monitor.

Neeraj Jagetia