Forum Discussion

AshuA_246482's avatar
AshuA_246482
Icon for Nimbostratus rankNimbostratus
Jan 10, 2018

iRule Maintenance Windows

I am trying to search for an irule which can help in displaying the maintenance page during the weekly maintenance window.I went through the below article but could not understand where to set the values. E.g. If the maintenace window starts every saturday night at 11:30 pm & ends on sunday 00:30 AM where to put these values in i-rule or stats profile..

 

https://devcentral.f5.com/articles/irule-maintenance-windows

 

Also i want to know if it is compulsory to name stats profile 'maintenance_window' as mentioned in article where we want to use our naming conventions in profiles. Would changing the profile name impact the execution of i-rule? i want to use it for multiple different web application and all have different maintenance windows.

 

1 Reply

  • Hi AshuA,

     

    1) The values you want to use for start, end and day are all set in the iRule. In the article you're using as inspiration, the values are set by specifying them as pseudo-directory components of the URL, when the URL begins with "/enable". If you so choose, you could go without this dynamic capability (where changing the relevant time/date values can be done by connecting to the virtual server, rather than attaching to the F5 configuration interface) and set the values as static values in the RULE_INIT event. If you go down that path, you don't need to configure the stats profile

     

    2) The names used in the example are not compulsory, but the name of the stats profile needs to match the name used in the iRule, and the variable names used in the iRule need to match the counters configured in your stats profile. You can create multiple stats profiles, one for each of your applications, and re-use the same counter names in each individual profile (e.g. start, end, day) or you could have a single stats profile and used counter names that are specific to each application (e.g. app1_start, app1_end, app1_day, app2_start, etc.)

     

    Good Luck!

     

    - Rob