Forum Discussion

Wade_98751's avatar
Wade_98751
Icon for Nimbostratus rankNimbostratus
Dec 08, 2008

Developing Maintenace Page iRule

Hello,

 

 

I would like to write a iRule maintenance page which I can turn on and off as the websites are taking down for maintenance. I would like to write the iRule logic to redirect users from each hosted website to the maintenance website but I only want that logic to run during maintenance hours.

 

 

Can I turn iRules on and off via iRules commands? This would be perfect.

 

 

That way the iRule logic is written and attached to virtual servers but lays dormant until we want the re-direct to happen (during maintenance hours). The reason to keep the iRule dormant during normal operations is that the iRule will not process during each normal request which seems optimal and more efficient.

 

 

Please let me know if I'm thinking about this wrong, if there's a better approach or how to turn iRules off and on.

 

 

Another option I could do which seems more intensive is during maintenance hours have a script write and attach an iRule to the virtual server being brought down for maintenance and then remove the iRule after maintenance.

 

 

I'm trying to write all this in scripts so our patching team can redirect certain hosted websites without engineering involvement. They will essentially run a script from a Windows host which then in turns talks to an iRule which will handle the applicable iRule commands.

 

 

Thanks for your help!

 

 

Wade

1 Reply

  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    Wade,

     

     

    This is absolutely possible. There are several ways that you could approach this. Perhaps the most optimal way would be with some simple date / time checks and the event_disable command, if your maintenance windows don't shift around much.

     

     

    If they do, however, Joe's already written up a very elegant iRule solution here- Click here

     

     

    HTH,

     

    Colin