Forum Discussion

Plumtree_72679's avatar
Plumtree_72679
Icon for Nimbostratus rankNimbostratus
Jan 11, 2012

Sending User-Agent headers properly in health monitor

Folks,

 

 

An application (Oracle WebCenter Interaction 10.3.0) throws warnings in the logs (filling them up) each time it is hit by an F5 health monitor. This is because the app is trying to read the headers to find the User-Agent.

 

 

The existing health monitor works fine, but triggers the app warning:

 

 

monitor portal_http {

 

defaults from http

 

dest *:7001

 

recv "Test Passed"

 

send "GET //portal/server.pt?PT_HEALTH\r\n"

 

}

 

 

but if I change the send line to:

 

 

send "GET //portal/server.pt?PT_HEALTH HTTP/1.1\r\nUser-Agent: Mozilla/5.0 (Windows NT 5.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1\r\n"

 

 

...the members drop from the pool. I don't even see the health check being received by the app.

 

 

I tried doubling the \r\n; e.g. \r\n\r\n because I read something about different F5 versions.

 

 

The User-Agent string is exactly that which is now sent by my browser to the app, and the app likes it fine.

 

 

What am I doing wrong?

 

 

Thanks!

 

Robert Wagner

 

  • Can you try this:

     

     

    send "GET /portal/server.pt?PT_HEALTH HTTP/1.1\r\nUser-Agent: User-agent: Mozilla/5.0 (Windows NT 5.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1\r\n"
  • Or with two CRLF's at the end of the HTTP 1.0 request (which does not require the host header):

     

     

    send "GET /portal/server.pt?PT_HEALTH HTTP/1.0\r\nUser-Agent: User-agent: Mozilla/5.0 (Windows NT 5.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1\r\n\r\n"

     

     

    Aaron
  • Thanks folks! The solution was, as nitass said, to add a null host header:

     

     

    monitor portal_http-test {

     

    defaults from http

     

    dest *:7001

     

    recv "Test Passed"

     

    send "GET //portal/server.pt?PT_HEALTH HTTP/1.1\r\nHost:\r\nUser-Agent: Mozilla/5.0 (Windows NT 5.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1\r\n"

     

    }