Have some code. Share some code.
Showing results for 
Search instead for 
Did you mean: 
Custom Alert Banner

Problem this snippet solves:

This iRule allows external http monitors to query specific pools located on an LTM to determine up and down state - based on the minimum number of members within a pool. This allows external monitors such as SiteScope, HP OpenView, WhatsupGold, etc, to alert without requiring the complication of SNMP strings or other permissions. This is a variation of the Current_Pool_Member_status iRule.

Monitor Specifications

Send String : GET ?p=&mmember= HTTP/1.1\Host: \nConnection: close\n\n
Recieve String : UP

Where mmember is the minimum active members in a pool.


Send String : http://&mmember=
Recieve String: UP

Where mmember is the minimum active members in a pool.

How to use this snippet:


  • Scenario 1. GTM needs to monitor a VIP on an LTM. The vip is associated to a pool named "pool_pickle" that contains about 3 webservers. The clients wants GTM to stop DNS response when pool_pickle" active pool members drops to 2 or below, even though the pool is not technically down after 1 member is lost.
Send String: GET ?p=pool_pickle&mmember=3 HTTP/1.1\Host:\nConnection: close\n\np
Receive String: UP

Conclusion : If the pool members in "pool_pickle" drop below 3 it will mark it as DOWN

  • Scenario 2. Clients wants to use Sitescope to send out an alert if a specific pool called "pool_moonracker" on an LTM drops to zero.
Send String : GET ?p=pool_moonracker&mmember=1 HTTP/1.1\Host:\nConnection: close\n\np
Receive String : UP

Conclusion : If the pool members in "pool_moonracker" drop to zerp it will mark it as DOWN and then send out an alert

  • Scenario 3. Clients wants to know the status of a pool named "pool_goldeneye" on his PC, blackberry or iPhone
Clients enters the following in his browsers: http://

Conclusion : He will recieve either UP or DOWN response.

Code :

        set response "BIGIP Pool Status - [clock format [clock seconds]]"
        if {([URI::query [HTTP::uri] p ] ne " ") and ([URI::query [HTTP::uri] mmember ] ne " ") } {
                set poolname [URI::query [HTTP::uri] p]
                set minmember [URI::query [HTTP::uri] mmember]
                if { [catch {
                  if { [active_members $poolname ] < $minmember } {
                          append response "DOWN - $poolname"
                  } else {
                         append response "UP - $poolname"
                } errmsg] } {
                      append response "INVALID - $poolname?"
        } else {
             append response "INVALID OR NO INFO : You must enter in the following format http://&mmember=
       HTTP::respond 200 content $response "Content-Type" "text/html"
Version history
Last update:
‎18-Mar-2015 12:53
Updated by: