Monday, July 04, 2011

F5 BIGIP LTM Maintenance Page Update for v10

The folks at F5 devcentral have kindly provided a number of 'Maintenance Page' examples that allow you to host a page directly from the BIGIP LTM and display it automatically when all pool members go off-line. The example I used is http://devcentral.f5.com/wiki/default.aspx/iRules/LTMMaintenancePage.html (login required, registration is free).

However there are a few changes required to get it working with the latest version of TMOS (v10).

Follow the instructions provided in the aforementioned link and change them as follows:

Create iRule Data Groups with the following information:

maint_index_html_class

General Properties
Name: maint_index_html_class
Partition: Common
Type: (External File)

Records
Path/Filename: /var/class/maint.index.html.class
File Contents: String
Key/Value Pair Selector: :=
Access Mode: Read/Write

The file will need to look like the following (add "index.html" := to the beginning of existing example):



main_index_logo_class

General Properties
Name: maint_index_logo_class
Partition: Common
Type: (External File)

Records
Path/Filename: /var/class/maint.logo.png.class
File Contents: String
Key/Value Pair Selector: :=
Access Mode: Read/Write

The file will need to look like the following (add "logo.png" := to the beginning of the existing example):



generic_irule_maintenance_page
  • Change [lindex $::maint_index_html_class 0] with [class element -value 0 maint_index_html_class] 
  • Change [b64decode [lindex $::maint_logo_png_class 0]] with [b64decode [class element -value 0 maint_index_logo_png_class]] 

No comments: