Forum Discussion

Young_25175's avatar
Young_25175
Icon for Nimbostratus rankNimbostratus
Jun 19, 2014

syntax for simple http monitor

Hi,

 

I would like to create an http monitor that goes to this sample page http://www.whatever.com/default.aspx. I am struggling with the syntax to put in the send string to accomplish this. What should my send string be?

 

Thanks, Young

 

  • GET /default.aspx HTTP/1.1\r\nHost: www.whatever.com\r\nConnection: Close\r\n\r\n

     

    If you use the HTTP iApp template, entitled 'f5.http', that's included with your BIG-IP system, it'll set up the monitor for you. You just need to provide the FQDN (www.whatever.com), and the requested resource (the default is "/", and in your case you'd change it to "/default.aspx").

     

9 Replies

  • Dayne_Miller_19's avatar
    Dayne_Miller_19
    Historic F5 Account

    GET /default.aspx HTTP/1.1\r\nHost: www.whatever.com\r\nConnection: Close\r\n\r\n

     

    If you use the HTTP iApp template, entitled 'f5.http', that's included with your BIG-IP system, it'll set up the monitor for you. You just need to provide the FQDN (www.whatever.com), and the requested resource (the default is "/", and in your case you'd change it to "/default.aspx").

     

  • GET /default.aspx HTTP/1.0\r\nhost:www.whatever.com\r\n\r\n
    

    usually works well for me.

    • Dayne_Miller_19's avatar
      Dayne_Miller_19
      Historic F5 Account
      Some HTTP servers (like IIS) default to needing HTTP/1.1 connections, so this won't work for everything. Also the Host header isn't required for HTTP/1.0 connections.
    • mimlo_61970's avatar
      mimlo_61970
      Icon for Cumulonimbus rankCumulonimbus
      though host is not required for http/1.0, it is valid. I agree though, yours is a better string, I am just lazy and don't like to type Connection: Close. I didn't know that about IIS, they must configure all of ours to support 1.0 because I have never run into an issue. Thanks for the tip.
  • Is that URL the external address of one of your VIP's that has servers behind it?

     

    If so and you want to make the sure that the VIP only keeps healthy member servers in the vip for whatever.com, then you will want to setup a monitor that hits the internal server directly If they only server one site and say it is internally served on port 80 then your monitor send string for this particular vip would be

     

    GET /default.aspx

     

  • Thanks for all your answers. I tried what Dayne suggested since it's the closest syntax to the HTTP GET when I did a wireshark capture of me browsing to that website, http://www.tdsb.on.ca/default.aspx. In my browser capture, I see the 2 files that I'm looking for 'favicon.ico' for status up and favicon2.ico for status down. However, when I did a tcpdump of what the F5 monitor is doing, I don't get the same HTTP response and therefor don't see those files so the pool is marked down.
  • For the string use GET or > HEAD if you don't need the payload GET /default.aspx HTTP/1.1\nHost: www.yourhost.com \nConnection: close\n\n

     

    receive string 200

     

  • GET /default.aspx HTTP/1.1\r\nHost: www.whatever.com\r\nConnection: Close\r\n\r\n or GET /default.aspx HTTP/1.1\r\nHost: www.whatever.com\r\n\r\n