Forum Discussion
Maintenance Page using irule
Hi All,
When a request hits the virtual server (HTTPS or HTTP), it should load the customized Maintenance Page irrespective of Pool member status. The maintenance page is a html file which i have stored in /var/tmp directory of the load balancer.
We will enable the irule if customer requested for a maintenance window otherwise it will be removed from the virtual server.
I am new to irule. So help me with the irule.
- Kevin_StewartEmployee
That isn't going to work. Your best bet is to add your HTML page as an iFile:
https://devcentral.f5.com/wiki/iRules.iFile.ashx
Then your iRule might look something like this:
when HTTP_REQUEST { Retrieve the file contents, send it in an HTTP 200 response and clear the temporary variable set ifileContent [ifile get "/Common/iFile-index.html"] HTTP::respond 200 content $ifileContent unset ifileContent }
- Vikneswaran_709Nimbostratus
Hi Kevin, Thanks for the reply.
LB is running with the version 10.2.1. Will ii support iFile ? Also i will go through the link which you have suggested and come back to you.
- Vikneswaran_709Nimbostratus
No option in 10.2.1 for iFile. Pleas help
- Vikneswaran_709Nimbostratus
Hi Kevin, Thanks for the reply. Could you please help me with the second option ? I am new to irule and sorry for asking you again and again in detail.
I have attached the sample image as well.
- Kevin_StewartEmployee
- Vikneswaran_709Nimbostratus
the below link seems to be suitable for my requirement :
https://www.fir3net.com/Loadbalancers/F5-BIG-IP/bigip-f5-ltm-sorry-page-with-base64-images.html
But when i tried to create DATA GROUP, i am getting a error message link below :
01070712:3: Caught configuration exception (0), Max string size exceeded during update of attribute:data type:class_string_item max:65520 received:716657 - EdbCompositeObj.cpp, line 84.
Please help me to fix the issue.
- Kevin_StewartEmployee
How big is the base64-encoded image? You may need to make it smaller (or try a different compressed image format).
- Vikneswaran_709Nimbostratus
Its 524 KB file with 960x500 in size and its in JPEG format
- Kevin_StewartEmployee
Understood. I think you're going to have to make it MUCH smaller.
- ArieAltostratus
Would your organization happen to use a (cloud) CDN? If so you could store the image there.
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