Forum Discussion
aries22
Altocumulus
Hi, Kai.
Thank you for this iRule! May I know what exactly this line does and what significance is the number 3?
if { [lindex [LB::select] 3]
May I also ask how to tweak the iRule so that it will still work when there are multiple pool members assigned on each priority group? I have noticed that the iRule is only applicable if there is only one pool member assigned on each priority grp.
Kai_Wilke
Feb 21, 2020MVP
Hi Aries22,
the [lindex 3] command parses the output of the [LB::select] as a whitespace speperated list and then selects the fourth ([lindex] starts counting on zero) element.
The output of [LB::select] has the following format and the bold part is the string we are going to extract...
pool <poolname> member <ip_addr><port>
Cheers, Kai