Forum Discussion

C_D_18583's avatar
C_D_18583
Icon for Nimbostratus rankNimbostratus
Jun 13, 2007

How to specify the FQDN in the header for a MONITOR

 

I have defined a monitor as follows

 

 

Send String : GET /diagnostic/index.html HTTP1.1\r\n

 

Receive String : Diagnostics Page

 

 

The problem I am having is that the monitor is marking the node down because the page is not being found. This is because the policy agent on the NODE does a redirect ( 302) to the FQDN. I need to be able to define the FQDN of the diagnostic page in the monitor. Is this possible?

 

 

Thanks in advance.

 

 

 

 

9 Replies

  • HTTP v1.1 requires you specify the host value in the Host header. You can check SOL3224 on AskF5.com for an example:

     

     

    https://tech.f5.com/home/solutions/sol3224.html

     

     

    Aaron
  • Thanks

     

     

    The monitor works with the host specified below

     

     

    GET /diagnostics/index.html HTTP/1.1\nHost: dino.tmi.togo.com\nConnection: close\n\n

     

     

    However, I have a few nodes in my pool and I need somthing more generic . I tried

     

     

    GET /diagnostics/index.html HTTP/1.1\nHost: \nConnection: close\n\n

     

     

    But this fails

     

     

    Please advise

     

     

  • If I recall correctly, these should be \r\n at the end of each.

     

     

    GET /diagnostics/index.html HTTP/1.1\r\nHost: dino.tmi.togo.com\r\nConnection: close\r\n

     

  • Hi

     

     

    How do I write a monitor for many nodes in a pool so that the hostname will be replaced with the appropriate host name.

     

    I have many host in my pool :

     

    dino,

     

     

    GET /diagnostics/index.html HTTP/1.1

     

    Host:dino.tmi.telus.com

     

    Connection: close

     

     

     

    See below:

     

     

     

    lego:infra$ telnet dino 6001

     

    Trying 172.23.96.44...

     

    Connected to lego.

     

    Escape character is '^]'.

     

    GET /diagnostics/index.html HTTP/1.1

     

    Host:dino.tmi.telus.com

     

    Connection: close

     

     

    HTTP/1.1 200 OK

     

    Server: Sun-ONE-Web-Server/6.1

     

    Date: Tue, 26 Jun 2007 20:52:28 GMT

     

    Content-length: 183

     

    Content-type: text/html

     

    Last-modified: Tue, 15 May 2007 21:55:35 GMT

     

    Etag: "b7-464a2c57"

     

    Accept-ranges: bytes

     

    Connection: close

     

     

     

     

    Diagnostics Page

     

     

     

    ALIVE

     

    This page is by Big-IP for monitoring that this server is alive. Please do not remove.

     

     

     

    Connection to dino closed by foreign host.

     

    dino:infra$

     

     

     

  • Deb_Allen_18's avatar
    Deb_Allen_18
    Historic F5 Account
    Your only option if a unique Host header is required for each pool member is to create a specific monitor for each node, or create an external monitor that cross-references the node addresses to the hostnames and performs the appropriate substitution when constructing the request.

     

     

    There are a couple of other options you might be able to explore, though:

     

     

    Try specifying the VS IP addres as the Host header.

     

    Try specifying a blank Host header. (Host: \n)

     

    Try specifying HTTP/1.0, which doesn't require a Host header at all.

     

     

    HTH

     

    /deb
  • How do I create an external monitor that cross-references the node addresses to the hostnames and performs the appropriate substitution when constructing the request? Can this be done through an Irule ?

     

     

  • Deb_Allen_18's avatar
    Deb_Allen_18
    Historic F5 Account
    No, iRules can't help you with monitor configuration.

     

     

    You'd need to create a shell script following the example script found on your LTM filesystem @ /usr/bin/monitors/sample_monitor.

     

     

    The simplest approach I think would be to use "switch"or "case" to populate the host variable based on the IP address, then

     

     

    I posted a monitor script to the codeshare that will do just that. Just edit the case statement to include your pool member IP addresses and hostnames: http://devcentral.f5.com/wiki/default.aspx/AdvDesignConfig/http_monitor_cURL+GET+HostSpecificHeaders.html

     

    Click here

     

     

     

     

  • Is there a way to specify FQDN for an HTTPS monitor? I have a site that is SSL only, I need to do this for.
  • ddenbow, the HTTPS monitor send and receive strings should be identical to the HTTP monitor send and receive strings. The HTTPS monitor definition dictates that the monitoring daemon will negotiate the SSL connection and then send the HTTP request.

     

     

    Aaron