Forum Discussion
Combine Health check monitor
We wanted to check both 200 OK and the content word "test" on the site and below is our current config. The problem is we're getting two separate logs to the two health-checks and we were wondering if there is a way for us to combine these two health checks.
} ltm pool /Common/POOL-prod1-web-wcp-80 { members { /Common/10.1.1.1:80 { address 10.96.4.11 } /Common/10.1.1.2:80 { address 10.96.4.5 } /Common/10.1.1.3:80 { address 10.96.4.7 } /Common/10.1.1.4:80 { address 10.96.4.8 } } monitor /Common/MON-HTTP-CUSTOM and /Common/MON-HTTP-CUSTOM-200OK }
} ltm monitor http /Common/MON-HTTP-CUSTOM { defaults-from /Common/http destination : interval 5 ip-dscp 0 recv test send "GET /blog/\?HealthCheck01 HTTP/1.1\r\nHost: zzz.com\r\nConnection: close\r\n\r\n" time-until-up 0 timeout 16 } ltm monitor http /Common/MON-HTTP-CUSTOM-200OK { defaults-from /Common/http destination : interval 5 ip-dscp 0 recv "200 OK" send "GET /blog/\?HealthCheck01 HTTP/1.1\r\nHost: zzz.com\r\nConnection: Close\r\n\r\n" time-until-up 0 timeout 16 }
Thanks in advanced!
6 Replies
- DEJ_159363
Cirrus
Hello,
Wouldn't the fact that you can match the content word "test" from the site validate the fact that there is a 200 OK as well? Still learning about F5, so forgive me if there's something I'm missing.
- DEJ_159363
Cirrus
Another possibility is regex. recv "(200\sOK(.|\s)*test)"
- DEJ
Nimbostratus
Hello,
Wouldn't the fact that you can match the content word "test" from the site validate the fact that there is a 200 OK as well? Still learning about F5, so forgive me if there's something I'm missing.
- DEJ
Nimbostratus
Another possibility is regex. recv "(200\sOK(.|\s)*test)"
- anishp_165748
Nimbostratus
Hi Dareuja,
Thanks for the response and I am learning this myself as well so not an expert at all. For your second point about the regex, can you post how the exact health-check would look like with that? Is this something you've already deployed before?
Thanks, John
- DEJ
Nimbostratus
Hello John, I've not deployed a health monitor utilizing a regex recv string. I used a combination of resources referenced below to create and check the regex I suggested. To implement I believe you would just replace the value in recv. It should be easy to check working status by creating a test pool and applying the health monitor. recv "200\sOK(.|\s)*test" https://support.f5.com/kb/en-us/solutions/public/5000/900/sol5917.html https://regex101.com/
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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