Forum Discussion
C_D_18583
Nimbostratus
Jun 13, 2007How 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
- hoolio
Cirrostratus
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 - C_D_18583
Nimbostratus
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 - Wil_Schultz_101
Nimbostratus
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 - C_D_18583
Nimbostratus
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_18Historic F5 AccountYour 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 - C_D_18583
Nimbostratus
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_18Historic F5 AccountNo, 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 - Dbow_21284
Nimbostratus
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. - hoolio
Cirrostratus
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
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects