Adam_Metzler_13
Mar 17, 2015Nimbostratus
Can an iRule perform an action if a data group list is empty
I have two iRules that I would like to compile into one if possible.
The primary iRule sends all traffic to a different pool and rewrites the uri to an unplanned maintenance page if all the primary pool members are offline/down.
The second iRule allows a list of IP addresses to access the web resource, while sending all other traffic to a planned maintenance page. This iRule is used when planned maintenance occurs and the IP list will be different every time.
My question is; Is it possible to perform an action if a data group is empty?
The idea being:
- If the group is empty AND the pool members are up, traffic goes to the normal pool and page
- If the group is empty AND the pool members are down, traffic goes to the unplanned pool and page
- If the group has IP addresses AND the pool members are up, the IPs in the group go to the normal pool and page and everyone else goes to the planned pool and page.
- If the group has IP addresses AND the pool members are down, everyone goes to the planned pool and page (404 for the IPs in the group is fine in this scenario)
Thanks for your help!