Forum Discussion

diegonzal_22654's avatar
diegonzal_22654
Icon for Nimbostratus rankNimbostratus
Mar 26, 2012

Custom Monitor using Send/Receive strings

Hello,

 

 

I have been trying to create a custom monitor that checks a certain internal site for it's availability by looking for a string on the page once the page is available. The word is "Password" in this case.

 

 

This is what I have set up:

 

 

Send String: GET /PEARL-ADMIN/admin/images/logo.gif HTTP/1.1\n\r\n

 

Receive String: Password

 

 

1. I don't believe I'm doing this right because if I add "Password" to the receive string then the monitor does not work. If I leave Receive String blank then the monitor works (doesn't make sense to me). If I change the Send String to something that does not exist on the page with no Receive string then the monitor works. I'm dumbfounded by this.

 

 

2. I have ran a packet capture and used Fiddler2 to see the Request and Return headers for these requests. The Return headers are always 200 but this is not what I'm looking for. I'm looking for a specific word, "Password" on the page for the monitor to then mark it up as good.

 

 

How can I create a custom monitor that queries a webpage for a string and if the string exitsts the monitor will be marked "up". If the string does not exist, the monitor will be marked "down".

 

 

A solution would be appreciated but more importantly perhaps more knowledge on how these send/receive strings work on the LTM.

 

 

Thank you!!

 

 

  • Hi,

     

     

    Here is a general SOL on HTTP/S monitors:

     

     

    sol2167: Constructing HTTP requests for use with the HTTP or HTTPS application health monitor

     

    http://support.f5.com/kb/en-us/solutions/public/2000/100/sol2167.html

     

     

    For the send string, you should terminate it with \r\n\r\n if you're on 10.2.1 or higher:

     

     

    sol10655: Change in Behavior: CR/LF characters appended to the HTTP monitor Send string

     

    http://support.f5.com/kb/en-us/solutions/public/10000/600/sol10655.html

     

     

    If you don't specify a receive string, any TCP data will be considered a success.

     

     

    Here's a SOL on troubleshooting monitors:

     

     

    sol12531: Troubleshooting health monitors

     

    http://support.f5.com/kb/en-us/solutions/public/12000/500/sol12531.html

     

     

    Aaron
  • Ok, I added the missing \r to the end of my GET string and it still does not work. I read the links you sent and I don't see any issues with my syntax.

     

     

    The pool members are up and running and the LTM can talk to them. I tried changing GET requests to some that don't exist and the monitor is still up.

     

     

    I tried the receive syntax to just be this: Password, but the monitor then fails. Is there a syntax issue I'm not seeing?
  • Can you try the steps outlined here:

     

     

    https://devcentral.f5.com/wiki/AdvDesignConfig.TroubleshootingLtmMonitors.ashx

     

     

    Try sending a curl request from LTM to the pool member and check the response headers/content to see if they contain the string Password:

     

     

    curl -v http://1.1.1.1/PEARL-ADMIN/admin/images/logo.gif

     

     

    If that does contain the string Password, then you can run tcpdump to compare the curl request with bigd's monitor request.

     

     

    Aaron
  • diegonzal -

     

    I think your problem is with the match you are trying to make. Your send string is "GET /PEARL-ADMIN/admin/images/logo.gif". This is always going to return the file logo.gif. This is a binary image file and it is unlikely that it contains the string "password' even if that is what appears in the image