Forum Discussion

name_65682's avatar
Icon for Nimbostratus rankNimbostratus
Sep 02, 2011

Maintenance iRule



Is it possible to write such an iRule?



We have:


LB --> VS_test --> test_poll --> 2 nodes



I would like to have an iRule which will check (once per minute ), if on one of the nodes exist file "maintenance_on" and if it will exist iRule should give acces only to 2 selected IP's (XXX.XXX.XXX.XXX) and reject all other IP's?



It would give possbility to acctivate iRule without loggin on LB.



Does somebody know some other ways to do such thing?



Thanks for help,




2 Replies

  • A similar functionality to what you are wanting is possible, but it would require more configuration than just an iRule.



    If you configure as good a Health Monitor as possible to apply to the pool and test the nodes then it can determine if and when to remove the nodes from the pool.



    You can then use the "active_members" check inside of the iRule ( and an action (route to or display a maintenance or oops page when less than 1 server is available). This could also have a conditional that if the IP Addresses of the incoming client is X or X to route them / to a different location (I would suggest using a Data Group for this to make it easier to add and remove IP Addresses without having to alter your iRule.



    The logic in the "active_members" check portion of the iRule would re-enable access to the application once the node(s) passed the health monitor check that you configure and apply to the pool.



    Does this sound like what you are looking for or similar?