Forum Discussion

Sisay_Kidane_85's avatar
Sisay_Kidane_85
Icon for Nimbostratus rankNimbostratus
Feb 24, 2012

Need iHelp for iRule

I am creating maintenance page to post on LTM. I have followed few example but I am almost to the finish line with one last problem where the page is showing empty.

Here the example I use:

http://devcentral.f5.com/wiki/irule...epage.ashx

 

http://devcentral.f5.com/Community/...fault.aspx

 

 

 

 

When I force the need to be down by creating to monitor bad port which LTM to show to unknown state. LTM suppose to go Maintenance page but is showing blank screen.

 

I am new to LTM and I have tried to my best I can't figure out where the problem.

 

I appreciate in advance.

 

 

 

 

 

}

 

class maint_index_html_class {

 

"filename" { "/var/class/maint.index.html.class" }

 

}

 

}

 

rule Maintenancehtml {

 

when HTTP_REQUEST {

 

if {[active_members Pool_192.168.12.110.SN01138] < 1} {

 

HTTP::respond 200 content [lindex $::maint_index_html_class 0] "Content-Type" "image/png"

 

HTTP::respond 200 [class element -value 0 maint_index_html_class]

 

log local0. "Maintenance Page has been issued due to pool members not active"

 

}

 

}

 

}

 

[username@F5:Active] log more /var/class/maint.index.html.class

 

"key" :="Maintenance page

 

Sorry! This site is down for maintenance."

 

 

 

 

[username@F5:Active] log

 

 

 

Feb 24 07:08:50 local/tmm1 info tmm1[4996]: Rule Maintenancehtml : Maintenance Page has been issued due to pool members not active

 

 

 

 

 

1 Reply

  • Hi Sisay,

     

     

    This forum is for the old 4.x iRules. For v9-11, you can post here:

     

    https://devcentral.f5.com/Community/GroupDetails/tabid/1082223/asg/50/aff/5/showtab/groupforums/Default.aspx

     

     

    Are you still working on this issue? If so, which LTM version are you testing this on? The format and syntax has changed between 9.x, 10.x and 11.x.

     

     

    Aaron