Forum Discussion
Maria123
Altostratus
Nov 27, 2019Is assigning virtual server through iRule throws exception if it is offline
If I try to assign a different virtual server based upon some condition, do I need to check the status of the virtual server before assigning, or it will automatically be taken care and in this case...
cjunior
Nacreous
Dec 06, 2019Hi,
Yes, make sense, but as you have only a default pool to virtual server, you can check it instead of create a pool to a single virtual server as well.
Something like this:
when <EVENT_DESIRED> {
if { <condition is true> } {
if { [active_members <default_pool_from_virtual_server1>] > 0 } {
virtual <virtual_server1_name>
} else {
virtual <virtual_server2_name>
}
}
}I hope it helps
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