Forum Discussion

refra_151287's avatar
Aug 17, 2014

mark server down when receive 503

Hi, i've iis server and monitor it with http monitor, but when service becomes unavailable the member stills up, so it included in loadbalancing. I want to customize Http monitor to check status code and mark it down when receive 503. i did one but it didn't do the job.

 

11 Replies

  • nathe's avatar
    nathe
    Icon for Cirrocumulus rankCirrocumulus

    refra,

     

    Try this as a Receive String:

     

    HTTP/1/[01] [23]0[0-6]

     

    This will look for good status codes e.g. 200, 301, 302. Server will be marked down if a 503 is received.

     

    Rgds Nathan

     

    • nathe's avatar
      nathe
      Icon for Cirrocumulus rankCirrocumulus
      Sorry nitass you're right. I'm sure I meant to pop a . in there but it seems to have got lost. Used the wrong direction of slash too to escape this nonexistent . Glad u spotted that. Too hasty I think. ;-)
    • refra_151287's avatar
      refra_151287
      Icon for Cirrus rankCirrus
      thnx guys, I used something like that "HTTP/1/[01] [23]0[0-6]" before but it marked member up also, where i asked to get the home page (ex. GET /home.spx HTTP/1.1) what could be the issue.
    • nitass's avatar
      nitass
      Icon for Employee rankEmployee
      have you tried the receive string i posted (HTTP/1\.[01] [23]0[0-6])?
    • nathe's avatar
      nathe
      Icon for Cirrocumulus rankCirrocumulus
      Sorry nitass you're right. I'm sure I meant to pop a . in there but it seems to have got lost. Used the wrong direction of slash too to escape this nonexistent . Glad u spotted that. Too hasty I think. ;-)
    • refra_151287's avatar
      refra_151287
      Icon for Cirrus rankCirrus
      thnx guys, I used something like that "HTTP/1/[01] [23]0[0-6]" before but it marked member up also, where i asked to get the home page (ex. GET /home.spx HTTP/1.1) what could be the issue.
    • nitass_89166's avatar
      nitass_89166
      Icon for Noctilucent rankNoctilucent
      have you tried the receive string i posted (HTTP/1\.[01] [23]0[0-6])?
    • refra_151287's avatar
      refra_151287
      Icon for Cirrus rankCirrus
      thnx Macro, finally I used it and it worked well: Request: GET /index.html HTTP/1.1\r\nHost: hoostname.company.com\r\nConnection: Close\r\n Receive String: h.*k