cancel
Showing results for 
Search instead for 
Did you mean: 
The_Bhattman
Altostratus
Altostratus

Problem this snippet solves:

The following irule allows clients/users who do not have access to the load balancer to view the quick status of the pool assigned on a virtual server for troubleshooting. The code is reusable

Code :

when HTTP_REQUEST {
set response "BIGIP Pool Status - [clock format [clock seconds]]" 
 if {[HTTP::uri] eq "/status" } {
  foreach { selectedpool } [LB::server] {
    pool $selectedpool
    if { [active_members [LB::server pool] ] < 1 } {
      set response "$response DOWN - $selectedpool"  
    } else {
      set response "$response UP - $selectedpool"
    }
  }
  HTTP::respond 200 content $response "Content-Type" "text/html"
 }  
}
Version history
Last update:
‎18-Mar-2015 14:06
Updated by:
Contributors