Forum Discussion

Jace_45978's avatar
Jace_45978
Icon for Nimbostratus rankNimbostratus
Sep 01, 2011

irule to return html data when all members are down?

So i am wanting to have irule so that when all the pool members are down the following content will be returned, just not sure how to trigger this response when all members are down.

 

 

 

when HTTP_REQUEST {

 

HTTP::respond 200 content {

 

 

 

Site Unavailable

 

 

 

 

 

 

 

 

 

Unavailable

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The service is currently not accessible.

 

 

 

System will be available shortly.

 

 

 

 

 

 

 

}

 

}
  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    This is precisely what the active_members command is for: Click Here

     

     

    if {[active_members mypool] <= 0} {

     

    HTTP::respond ...

     

    }

     

     

    Colin
  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    No problem, let me know if you have any issues or questions with it.

     

     

    Colin