Forum Discussion

AJ_6093's avatar
AJ_6093
Icon for Nimbostratus rankNimbostratus
Jan 16, 2009

HTTP monitor with Status code.

Hi,

 

I want to create a HTTP monitor based on http status return code. What should I mention in the HTTP receive string, if I use “HTTP/1.0 200 OK” will it work. Also should I implement it on pool or on nodes?

 

 

Thanks & Regards,

 

AJ

 

3 Replies

  • It really depends on your requirements. If using the http monitor, you can send a query to special page that will give you a "we're good" message that tests more than just the root index, or if that's sufficient, you can implement an http monitor that pretty much just tells you the app is responding, not that it's good. You can also do the negative, where it marks the node/pool member down if the string is received.
  • If you are monitoring the pool members I don't see much benefit in monitoring the nodes separately. If it's down in the pool its status as a node doesn't really make any difference, and you're just duplicating health checks and causing more load on the node if you do that.

     

     

    Denny
  • Assuming the pool member responds to the send string with an HTTP 200 status, using a receive string of "200 OK" should work fine:

     

     

     

    curl -I www.yahoo.com

     

     

    HTTP/1.1 200 OK

     

    Date: Tue, 20 Jan 2009 15:14:39 GMT

     

    P3P: policyref="http://info.yahoo.com/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE LOC GOV"

     

    Cache-Control: private

     

    Vary: User-Agent

     

    X-XRDS-Location: http://open.login.yahooapis.com/openid20/www.yahoo.com/xrds

     

    Last-Modified: Tue, 20 Jan 2009 15:02:20 GMT

     

    Accept-Ranges: bytes

     

    Content-Length: 9562

     

    Connection: close

     

    Content-Type: text/html; charset=utf-8

     

     

     

     

    Aaron