Forum Discussion
5 Replies
Do you mean physical NIC's on the F5?
I'm not sure you can easily do it, or if it would be supportable or why you would want to.
- What_Lies_Bene1Cirrostratus
I'd suggest using iControl is the way to go if you are someone in the team has some coding skills (or wants to learn): https://devcentral.f5.com/icontrol/getting-started
- JRahmAdmin
this is actually a great use case for an iCall script. You can use a periodic icall handler to kick off a script every x number of minutes, and if percentage of available members drops below your threshold, the script can initiate a a shutdown of the interface.
- JRahmAdmin
You'll need to customize to only actually modify when there is a change in state rather than because the status is above/below the threshold (as I've shown below with the simple if/else condition), but this should get you started down the path:
foreach pn $pool_names { set total 0 set usable 0 foreach obj [tmsh::get_status /ltm pool $pn detail] { foreach member [tmsh::get''field''value $obj members] { incr total if { [tmsh::get''field''value $member pool-member.status.availability-state] == "available" && [tmsh::get''field''value $member pool-member.status.enabled-state] == "enabled" } { incr usable } } } if { [expr $usable.0 / $total] < 0.7 } { tmsh::modify /net interface 1.1 disabled } else { tmsh::modify /net interface 1.1 enabled } }
- JRahmAdmin
Here's the writeup as promised.