Forum Discussion

Pankaj_71762's avatar
Pankaj_71762
Icon for Nimbostratus rankNimbostratus
Dec 09, 2008

Monitor multiple recieve strings for HTTP monitor

Hi,

 

 

Is it possible to monitor for multiple responses under the same HTTP monitor.

 

We like to monitor both 503 or 200 response by sending

 

get / HTTP1.1

 

 

Thank you.

4 Replies

  • Not really within the base HTTP monitor type. You could either create 2 separate monitors and require that the pool members pass both of them with the Availability Requirement setting set to All (default - under Advanced in the Pool dialog), or you could create a scripted monitor (External type) that would use curl and parse the result for the codes you want to see.

     

     

    Denny
  • Actually I misspoke, for your scenario with the 2 monitors I would set the pool's Availability Requirement to At Least 1, not All. That way either the 200 or the 503 response would result in success.

     

     

    Denny
  • I think the receive string is evaluated as a regular expression. So you could potentially set the receive string to something like:

     

     

    (200 OK|503)

     

     

     

    The 200 OK string is logically OR'd with the 503 string. You should avoid using just 200 as it's commonly found in the date response header regardless of the HTTP status of the response.

     

     

    And a send string like:

     

     

    GET / HTTP/1.1\r\nHost: \r\nConnection: close\r\n

     

     

    Aaron
  • Thanks Alot. It works good.

     

    Moreover, I don't need to use atleast one option now.

     

    Also the polling is less as well.

     

     

    Great!!