Forum Discussion

Shamsul_Alam_34's avatar
Shamsul_Alam_34
Icon for Nimbostratus rankNimbostratus
Oct 02, 2018

irule to get the F5 server time and display it on maintence page

Hi,

I have following iRules which display maintenance page. I would like to get F5 LTM time stamp and display on the maintenance page. Can anyone help me on this? Thanks

when HTTP_REQUEST {
if { [active_members [LB::server pool]] == 0 }
   { set http_reply "You have reached [HTTP::host], 


This site is currently under maintenance March 5th 6:00am EST <--------- **display server time here** 

Please contact Help Desk at if you continue to experience issues after this maintenance window. window."
        HTTP::respond 200 content $http_reply

}
}

1 Reply

  • Try this:

     

    when HTTP_REQUEST { if { [active_members [LB::server pool]] == 0 } { set http_reply "You have reached [HTTP::host],

     

    This site is currently under maintenance [clock format [clock seconds] -format "%a, %d %h %Y %T GMT" -gmt 1]

     

    Please contact Help Desk at if you continue to experience issues after this maintenance window. window." HTTP::respond 200 content $http_reply

     

    } }