Forum Discussion
F5_bulldog_5968
Nimbostratus
Feb 06, 2012Health monitor questions
I am not the most experienced at writing custom health monitors, and I need help creating one using send and receive strings. We have three servers in a pool, and today, we are using a basic tcp monitor on port 8182 to monitor the pool members. The problem is that even though the monitor sees the pool members available, the service may not be completely up and ready to handle requests.
Below is a successful request and response we need to use to make sure the service is completely up and ready. My question is: how do I write a health monitor that send a requests then looks for
Request
- Hamish
Cirrocumulus
What's the protocol? - F5_bulldog_5968
Nimbostratus
The protocol is HTTP. Would a simple GET do the trick, and then look for a particular line of text in the response. The app guys have recommended looking for "overallStatusCode="0000"" in the response. - nitass
Employee
e.g.[root@ve1023:Active] config b pool foo list pool foo { monitor all myhttp members 200.200.200.101:8182 {} } [root@ve1023:Active] config b monitor myhttp list monitor myhttp { defaults from http recv "overallStatusCode=\"0000\"" send "GET /test.html HTTP/1.1\r\nHost: \r\nConnection: Close\r\n\r\n" } [root@ve1023:Active] config curl http://200.200.200.101:8182/test.html ... overallStatusCode="0000" ... [root@ve1023:Active] config b pool foo|grep -i pool\ member +-> POOL MEMBER foo/200.200.200.101:8182 active,up [root@ve1023:Active] config curl http://200.200.200.101:8182/test.html ... overallStatusCode="0001" ... [root@ve1023:Active] config b pool foo|grep -i pool\ member +-> POOL MEMBER foo/200.200.200.101:8182 inactive,down
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects