Forum Discussion

Vaibhav_95632's avatar
Vaibhav_95632
Icon for Nimbostratus rankNimbostratus
Jan 05, 2014

Need an iRule for monitoring the pool health or active member status ---URGENT

Need help to get the irule corrected which is used to monitor the health status of the pool which is not attached to the VIP to which is irule is attached to. iRule is as follows:

 

when LB_FAILED { if { [active_members -list ] < 1 } { catch { LB::down pool member } catch { LB::down pool member } LB::reselect node } else { pool APPSRV_POOL

 

} }

 

Note:- Both the pools i.e APP_SRV & DB_SRV have their each members in different priority groups

 

6 Replies

  • Pasting the irule again as some statements are missing when LB_FAILED { if { [active_members -list ] < 1 } { catch { LB::down pool member } catch { LB::down pool member } LB::reselect node } else { pool APPSRV_POOL } }
  • just wondering why you don't use active_members checks pool status in clientside event before choosing pool (something like example in active_members wiki).

     

    active_members wiki

     

    https://devcentral.f5.com/wiki/iRules.active_members.ashx

     

    anyway, active_members -list returns a list. if you want a number, you do not need the list option.

     

    please be noted there is a bug that active_members does not work properly with priority group. it is fixed in 11.5.0.

     

    ID428895 - active_members iRule command doesn't take into account priority groups for pools with minactive members set

     

  • Thanks for the answer Nitass let me try that.

     

    Will it select the pool member despite of priority groups in place because the member that I need to choose is in the lowest priority amongst the other ones.

     

  • Will it select the pool member despite of priority groups in place because the member that I need to choose is in the lowest priority amongst the other ones.

    i understand there is no issue because you are using node command.

    e.g.

    when CLIENT_ACCEPTED {
      if { [llength [active_members -list db_pool]] < 1 } {
        node app_pool_member_3
      } else {
        pool app_pool
      }
    }
    
  • You could avoid the llength command using this:

    when CLIENT_ACCEPTED {
      if { [active_members db_pool] < 1 } {
        node app_pool_member_3
      } else {
        pool app_pool
      }
    }
    

    Aaron

  • Harish's avatar
    Harish
    Icon for Nimbostratus rankNimbostratus

    Can you suggest similar solution , if i have more than one pools that needs the active members check ? active_members -list db-pool will list members of the pool db_pool, what if I have 2 other pools like app1_pool and app2_pool and i would like to run a common rule for all pools that it would hit on a pool ( depending on the app request ) using : when HTTP_REQUEST...

     

    Thanks,

     

    Harish