Forum Discussion
Russell_Moore_8
Dec 09, 2010Nimbostratus
script to disable all pool members if minimum not met
I wrote this originally in perl using iControl and decided to re-write it via tmsh.
I used some stuff from the code share but modified it.
Small, simple, effective. ...
Alex_Huan_3427
Jan 18, 2012Nimbostratus
Hi Russell,
I tested your script on my BigIP with version 10.2.1 and found it cannot work.
The up number or total number is always 0:
dn: supl_inbound_pool_v4 total up/available: 0, total 0
Seems below part is not working as expected:
foreach obj [tmsh::get_status /ltm pool $pool_name detail] {
if { [tmsh::get_type $obj] != "ltm pool-member" } {
continue
}
incr total
if { [tmsh::get_field_value $obj pool-member.status.availability-state] == "available" &&
[tmsh::get_field_value $obj pool-member.status.enabled-state] == "enabled" } {
incr usable
}
}
The reset function works fine.
Could you please take a look?
Br,
Alex
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