Forum Discussion
irule to get the maintainance page data from third party portal
This is my first ever irule work I have come across.
Problem Statement: We want to display the maintenance page during maintenance window. It is a static Unavailable.html page uploaded as ifile. We need to replace time( for maintenance window) and message for our users in that static html file. We also use third party product(which has got developers api) where we update the maintenance time and message. We want to pull that information and update the static html page with this information. Any approach or irule reference that I use will be good.
Please call out if this is not clear
Hi vg,
Can you try adding variables in iFile (Unavailable.html)?
Example iFile:
<html> <head> <title>We will back soon</title> </head> <body> Sorry, bla bla... $message <br><br> Planned Maintenance Hours: $hours </body> </html>
Example iRule:
when HTTP_REQUEST { set message "your message" set hours "00:01 - 02:00" HTTP::respond 200 content [subst [ifile get "Unavailable.html"]] }
Output:
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com