Forum Discussion
Irule to change VS status
Hi All,
we need your help to achieve one requirement. Not sure we can achieve this with Irule or not. we have following Irule on our production VS.
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::path]] {
"/axis/*" {
SSL::disable serverside
pool pool1
}
default {
pool default_pool
}
}
}
application team requirement is when default_pool goes down, VS status should be down.(even though pool1 is UP). can we achieve this with some modification in irule or with different options.
5 Replies
I don't think you need to modify the iRule at all. Just add your default_pool to your virtual server profile as the default pool. That will be the only pool that is monitored from the virtual server perspective. If that pool is unavailable, the virtual server will also be unavailable.
- Vijay_E
Cirrus
If your goal is to prevent load balancing from happening if the default pool is down, can't you use a simple iRule that serves a maintenance page or sorry page whenever the default pool is down instead of marking the entire VS as down ?
This irule will reject connections if no pool members in the default pool are down, but like Odaah mentioned maybe you could do a redirect to a maintenance page instead of a reject.
when HTTP_REQUEST { reject connection if all servers are down in the default pool if { [active_members [LB::server pool]] < 1 } { reject } switch -glob [string tolower [HTTP::path]] { "/axis/*" { SSL::disable serverside pool pool1 } default { pool default_pool } } }- Naumin_Dave_144
Nimbostratus
Hi All,
First of all thank you very much for your reply on this conversation. DevCentral always helps us to learn new things faced by all F5 champs across world. I would like to explain bit more on requirement part.
Since we have GTM(DC/DR) setup for this VS, if default_pool is down then it should mark VS down so that GTM will forward the traffic to the alternate VS. so by applying maintenance page here will not resolve the purpose of the requirement.
- Hicham
Nimbostratus
Hello Naumin Dave,
we're facing your exact situation. How did you manage to get around this issue.
Thank for sharing.
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