Big-IP: Custom IIS SOAP Monitor

In working on a production issue with my company’s flagship SaaS product I worked with some of the brilliant F5 engineers to isolate one web server in the load balanced pool which was intermittently failing. The F5 engineer recommended a health monitor that does more than just poll for a static page. He suggested we implement some kind of soap call to make the application pool do some work and return a result (I guess in case the IIS application pool is misbehaving but not down). So I worked with one of our developers to do just that but ran into some caveats which required yet another custom health monitor.

Their default soap health monitor did not work as advertised on our load balancers. We discovered through some tcpdumps that the default Big-IP monitor sends a “SoapAction” header in the request but with no value and by default the SOAP call in IIS does not support this I guess. Rather than push for an effort to fix the web configs to handle empty requests I just hacked together a quick custom health monitor to send the header request in a way that the IIS configuration could handle. There are two parts to this monitor, the monitor itself and an xml file with the actual request to send.  I cannot help you with the actual SOAP method creation on your IIS server though, connect with your devs for that. I didn’t use the cool F5 script template like I did with the last monitor but this is still fully functional (assuming you modify the xml request to your environment/custom soap page). First the actual monitor:

Here is a quick example of an xml file you could use, this is based on a quick and dirty custom asmx file that my company’s devs whipped up that simply returns OK if sent a soap request method called “Status”:

save both files to /usr/bin/monitors/ and chmod +x the customsoap.sh. Then define your custom health monitor to call customsoap.sh. An example is below:

Custom Soap Monitor Example Configuration

Custom Soap Monitor Example Configuration

Comments (6)

  1. 8:29 AM, 11/11/2013Alex DeMarco  / Reply

    I have this working but am trying to have it send an email to me when it is back up. However, the echo “up” causes the script to end. If I put the mail prior to the up I never get it. I think it has something to do with writing to std out but not sure any suggestions?

    • 11:55 PM, 11/17/2013Zachary Loeber  / Reply

      Sorry Alex, it has been quite a while since I last looked at this. I don’t have any immediate answers for you unfortunately.

  2. 6:17 AM, 12/15/2011David  / Reply

    Important! You need to add:

    #!/bin/bash

    to the very top line of the script for this to work. Otherwise it will just look like the script isn’t being run.

  3. 3:24 PM, 07/20/2011Kevin Anderson  / Reply

    This is awesome. Thank you so much!

  4. 11:36 AM, 04/14/2011Saviz  / Reply

    Hi Zach,

    I have ran into the exact same problem with the missing SOAPAction header field, so I stumbled upon your custom monitor which I have tried to implement, but not much luck at the moment. Issue is I am not really familiar with scripting which makes it difficult to troubleshoot, but I am trying to pick it up.

    I have setup the script and XML files along with the custom monitor as per the instructions, however I cannot see any health check traffic being generated (running a tcpdump).

    So I tried running the script directly, but I am getting the below error which I have not been able to work out, just wondering if you had any clues? Any assistance is most appreciated.

    [[email protected]:Active] monitors # ./custom_soap_shell 10.8.20.1 8080
    : command not found: line 15:
    : command not found: line 18:
    ./custom_soap_shell: line 34: syntax error: unexpected end of file

    Thanks,
    Saviz

    • 11:21 AM, 04/28/2011zloeber  / Reply

      Hello, Are you certain that you copied the script exactly and saved it via a putty session (rather than via notepad or any other windows program). You can save the file using the nano command at the command line.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Pingbacks (0)

› No pingbacks yet.

Follow

Get every new post delivered to your Inbox

Join other followers