Forum Discussion
Ricardo_77091
Nimbostratus
Mar 26, 2009HTTP Monitor that follows redirects
We are trying to configure an HTTP monitor to monitor a .NET application and mark the member as down if it does not receive the response it expects. The problem is that the first response is a 401 Unauthorized. By putting 401 Unauthorized in the receive string we can cover the service being down, website stopped, or application pool unavailable. However, it does not cover us for when we receive 500 server errors as they are returned after the 401 Unauthorized.
Does anyone have a suggestion as to how we can do this using a simple HTTP monitor, or if necessary, an irule/ECV ?
- hoolio
Cirrostratus
Will the application accept basic authentication? Or does it only use NLTM? If the former, you could include an auth header in the monitor send string. The header name is Authorization and the value should be a base64 encoded user:pass. The send string would be something like: - hoolio
Cirrostratus
Here is an example for using curl and NTLM if you do need to use an external monitor: - Ricardo_77091
Nimbostratus
Thanks Hoolio, we've tried using your suggestion in conjunction with one of the template scripts we found in devcentral (see below) but we are still unable to get it to work ie. when doing a tcpdump we can see the packets hitting the destination pool member but we keep getting a 401 Unauthorized response. When running the same curl command, with the same logon credentials, locally on the desktop as a test, we get successful communication, ie. curl follows the redirects correctly and eventually receives a 200 OK. - hoolio
Cirrostratus
What do you see if you call the shell script manually using valid parameters for the script? - STP_88362
Nimbostratus
I'm having a similar problem with an external monitor using the script and NTLM. From an SSH login to the LTM I'm able to input my command and watch the "200 OK" response come up after the initial "401 Unauthorized" happens -- the LTM just tries a second time and is successful. - STP_88362
Nimbostratus
Just a quick update - I ran the external script from an SSH session at the LTM and ran it with the "sh -x" command in front. I was better able to see the output. - STP_88362
Nimbostratus
I ended up speaking too soon about the success of the external monitor. My LTM runs the script from the SSH console w/out a problem at all. When it's applied against the pool via the LTM GUI, the node in the pool is immediately marked down. I opened a case w/ F5 support and also grabbed two packet captures: one from the LTM when I run the script via the SSH console (I see all the HTTP traffic generated by the script), and a second from the LTM when the monitor is applied to the pool (which shows no HTTP traffic at all). Perhaps the script isn't running when applied as an external monitor, though I am 100% certain that I've typed the script name correctly. - STP_88362
Nimbostratus
Update for anyone interested -- - hoolio
Cirrostratus
Hi, could you post the final result for your external monitor using curl for an NTLTM pool? - STP_88362
Nimbostratus
Posted By hoolio on 07/13/2009 6:54 AM
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