Forum Discussion
VIP to go offline if 50% of servers behind it is down
Is there a way to configure a BIG-IP LTM to turn a VIP offline if 50% of the servers behind it goes down?
Hi gclafiguera,
You can use external monitor, when x members is down.
https://devcentral.f5.com/s/question/0D51T00006i7k0u/mark-a-vs-down-when-1-pool-member-is-down
- gclafiguera
Nimbostratus
Thank you.
- iaine
Nacreous
...or you could use iCall. Following Jason's post here - https://devcentral.f5.com/s/articles/disable-interface-if-pool-member-availability-drops-below-threshold - you can modify his code slightly to something like
## Script ## sys icall script poolCheck.v1.0.0 { app-service none definition { set pn "/Common/my_pool" set vip "/Common/my_vip" set total 0 set usable 0 foreach obj [tmsh::get_status /ltm pool $pn detail] { #puts $obj foreach member [tmsh::get_field_value $obj members] { #puts $member incr total if { [tmsh::get_field_value $member status.availability-state] == "available" && \ [tmsh::get_field_value $member status.enabled-state] == "enabled" } { incr usable } } } if { [expr $usable.0 / $total] <= 0.5 } { tmsh::log "Not enough pool members in pool $pn, VIP $vip disabled" tmsh::modify /ltm virtual $vip disabled } else { tmsh::log "Enough pool members in pool $pn, VIP $vip enabled" tmsh::modify /ltm virtual $vip enabled } } description none events none } ## Handler ## sys icall handler periodic poolCheck.v1.0.0 { first-occurrence 2014-09-16:11:00:00 interval 60 script poolCheck.v1.0.0 }
- gclafiguera
Nimbostratus
Thanks you
- youssef1
Cumulonimbus
Hi,
Otherwise, set juste a maintenance page:
when LB_FAILED { if { [active_members [LB::server pool]] == 0 } { HTTP::respond 503 content [ifile get " maintenance.html"]} }
you can set the number of server down before activating your error page.
it's dynamic and easier to set up.
Regards
- gclafiguera
Nimbostratus
Thanks
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