Forum Discussion

Brent_West_7733's avatar
Brent_West_7733
Historic F5 Account
Mar 01, 2013

Determine if a monitor is explicitly set or inherited from pool

When querying the PoolMember interface for get_monitor_associations, iControl shows all associated monitors for a member regardless of wether they are inherited or explicit.

 

Wondering how the BigIP GUI can tell the difference? You can explicitly set the same monitor that the pool is using, and the GUI knows wether the association is inherited or not.

 

Additionally, while the PoolMember interface is deprecated for v11, there is no method for Pool::get_member_monitor_association available as of v11, meaning I have to revert to the earlier interface to get this information for v11.

 

1 Reply

  • I found that comparing the monitor_templates for the pool (LocalLB.Pool.MonitorAssociation) with the monitor for the member (LocalLB.PoolMember.MemberMonitorAssociation) would allow me to determine if the member has a monitor set inherited or explicit. If inherited, the monitor would match the pool.

    (LocalLB.Pool.MonitorAssociation){
       pool_name = "pool_test"
       monitor_rule =
          (LocalLB.MonitorRule){
             type = "MONITOR_RULE_TYPE_SINGLE"
             quorum = 0
             monitor_templates[] =
                "tcp",
          }
     }
    (LocalLB.PoolMember.MemberMonitorAssociation){
       member =
          (LocalLB.MonitorIPPort){
             address_type = "ATYPE_EXPLICIT_ADDRESS_EXPLICIT_PORT"
             ipport =
                (Common.IPPortDefinition){
                   address = "1.1.1.1"
                   port = 59595
                }
          }
       monitor_rule =
          (LocalLB.MonitorRule){
             type = "MONITOR_RULE_TYPE_SINGLE"
             quorum = 0
             monitor_templates[] =
                "tcp_59595",
          }
     }