Forum Discussion
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
Cirrocumulus
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
- nitass
Employee
HTTP/1/[01] [23]0[0-6]
shouldn't it be like this?
HTTP/1\.[01] [23]0[0-6]
sol5917: Using regular expressions in a health monitor Receive String
http://support.f5.com/kb/en-us/solutions/public/5000/900/sol5917.html- nathe
Cirrocumulus
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
Cirrus
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
Employee
have you tried the receive string i posted (HTTP/1\.[01] [23]0[0-6])?
- nitass_89166
Noctilucent
HTTP/1/[01] [23]0[0-6]
shouldn't it be like this?
HTTP/1\.[01] [23]0[0-6]
sol5917: Using regular expressions in a health monitor Receive String
http://support.f5.com/kb/en-us/solutions/public/5000/900/sol5917.html- nathe
Cirrocumulus
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
Cirrus
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
Noctilucent
have you tried the receive string i posted (HTTP/1\.[01] [23]0[0-6])?
- Marco_T_166679
Nimbostratus
if you just want the 503, you can also try that
when HTTP_RESPONSE { if { [HTTP::status] = 503 } { LB::down } }
https://support.f5.com/kb/en-us/solutions/public/7000/400/sol7440.html
- refra_151287
Cirrus
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
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com