Wallace1
Oct 31, 2014Nimbostratus
iRule based on ltm policy
I am upgrading from pre-11.4 OS and I have an iRule that will check the status of the pool members selected based on a HTTPCLass. When I upgrade to 11.5.1, this rule does not work. For some reason the ltm policy must kick off after the iRule and I am unable to get the pool status.
The irule looks like this in 10.2.4:
when HTTP_CLASS_SELECTED {
if { [HTTP::uri] ends_with "/status" } {
set response "Virtual Server Diagnostic
" append response "Reported: [clock format [clock seconds]]
" foreach { selectedpool } [LB::server] { set thispool [getfield $selectedpool " " 1] if { [catch { if { [active_members $thispool] < 1 } { append response "Virtual Server [HTTP::host] is
" } else { append response "Virtual Server [HTTP::host] is
" Member Status Section for "UP" pools" foreach { pmem } [members -list $thispool] { append response " " append response "[join $pmem ":"] : [LB::status pool $thispool member [getfield $pmem " " 1] [getfield $pmem " " 2] ]
" } } } errmsg ] } { append response "$thispool ERROR
I am not sure how to call the ltm policy, any help would be greatly appreciated.
Thanks