Forum Discussion
Michael_-_Harr1
Nimbostratus
Jan 10, 2017Help with IRULE to send status 500 if all members of pool equal 0 and code 200 if at least 1 member is operational
Need help with IRULE please,
URL from client application https://online.mydomain.org/statusCheck2
to send a status code 500 if there are 0 pool members and if there at least 1 pool member send ...
Jan 10, 2017
This might work:
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] eq "/statuscheck2" && [active_members ] > 0 }{
HTTP::respond 200 content ""
} else {
HTTP::respond 500 content ""
}
}
Replace
pool_name and your content with the correct values.
/Patrik
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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