Forum Discussion

tbw_90635's avatar
tbw_90635
Icon for Nimbostratus rankNimbostratus
Jul 21, 2009

Integer Property of Monitor Templates

A monitor template configured with interval=5 and timeout=16 was setup on three version of BigIP.

 

 

I called_template_integer_property() using the template name and the types: ITYPE_INTERVAL, ITYPE_TIMEOUT, ITYPE_PROBE_NUM_PROBES, ITYPE_PROBE_NUM_SUCCESSES, and ITYPE_PROBE_TIMEOUT

 

 

 

On a BigIP 9.3:

 

ITYPE_INTERVAL: 5

 

ITYPE_TIMEOUT: 16

 

ITYPE_PROBE_NUM_PROBES: null

 

ITYPE_PROBE_NUM_SUCCESSES: null

 

ITYPE_PROBE_TIMEOUT: null

 

Result: works as expected with correct results

 

 

 

On a BigIP 9.4 (Common partition):

 

ITYPE_INTERVAL: 0

 

ITYPE_TIMEOUT: 16

 

ITYPE_PROBE_NUM_PROBES: 1

 

ITYPE_PROBE_NUM_SUCCESSES: 1

 

ITYPE_PROBE_TIMEOUT: 5

 

Result: seems like the interval value moved to the probe timeout.

 

 

 

On a BigIP 10.0.1 (Common partition):

 

ITYPE_INTERVAL: 5

 

ITYPE_TIMEOUT: 0

 

ITYPE_PROBE_NUM_PROBES: 0

 

ITYPE_PROBE_NUM_SUCCESSES: 0

 

ITYPE_PROBE_TIMEOUT: 0

 

Result: only interval has the correct value

 

 

(I'm using the iControl assembles jar supplied by Dev Central with java 1.6)

 

 

If find these results confusing. The only one that really works is when using a v9.3 Bigip.

 

5 Replies

  • Can you clarify on whether you were getting or setting these values? I'll look into the code to see what's going on with the different version but I need to be able to reproduce your issue. It's not clear on whether the error is while you are trying to set the values or retrieving them.

     

     

    -Joe
  • I'm just attempting to get some of the monitor values using LocalLB.Monitor.get_template_integer_property()
  • I just verified that on 10.0.1 the returned results are correct with the iControl assembly for .NET. Since the java library uses the same passthru logic, the results should be the same.

     

     

    PS C:\> $ic.LocalLBMonitor.get_template_integer_property( `

     

    ("my_http", "my_http", "my_http", "my_http", "my_http"), `

     

    ("ITYPE_INTERVAL", "ITYPE_TIMEOUT", "ITYPE_PROBE_NUM_PROBES", "ITYPE_PROBE_NUM_SUCCESSES", "ITYPE_PROBE_TIMEOUT") )

     

     

    type value

     

    ---- -----

     

    ITYPE_INTERVAL 5

     

    ITYPE_TIMEOUT 16

     

    ITYPE_PROBE_NUM_PROBES 0

     

    ITYPE_PROBE_NUM_SUCCESSES 0

     

    ITYPE_PROBE_TIMEOUT 0

     

     

     

    Could you post the code you are using to make the calls?

     

     

    -Joe
  • I see the error of my ways :-)

     

    I'm not using the same monitor name, for each property type.

     

     

    Thanks, Joe

     

     

    ==============================

     

     

    String [] monitorName = { "http", "https", "tcp", "icmp", "udp", "ftp" }; // wrong

     

     

    LocalLBMonitorIntPropertyType [] ptype = {

     

    LocalLBMonitorIntPropertyType.ITYPE_INTERVAL,

     

    LocalLBMonitorIntPropertyType.ITYPE_TIMEOUT,

     

    LocalLBMonitorIntPropertyType.ITYPE_PROBE_NUM_PROBES,

     

    LocalLBMonitorIntPropertyType.ITYPE_PROBE_NUM_SUCCESSES,

     

    LocalLBMonitorIntPropertyType.ITYPE_PROBE_TIMEOUT

     

    };

     

     

    LocalLBMonitorIntegerValue [] ivalue = m_monitor.get_template_integer_property(monitorName, ptype);
  • Therein lies your issue. The method takes two arrays, the first is for the monitor names, the second is for the property types. This method was designed a bit different that some of the others in our API. For this method, you must pass in a pair of monitor name and type for the n'th index in each array. As you noticed, in your code you were querying the following attributes from the following monitor templates:

     

     

     template -> property 
     http -> ITYPE_INTERVAL 
     https -> ITYPE_TIMEOUT 
     tcp -> ITYPE_PROBE_NUM_PROBES 
     icmp -> ITYPE_PROBE_NUM_SUCCESSES 
     udp -> ITYPE_PROBE_TIMEOUT 
     ftp -> ???

     

     

    The ftp entry will be ignored since there were only 5 entries in the property type array.

     

     

    The correct logic would have been to pass in 5 entries with all 5 monitor template names being the same value for the template you were requesting.

     

     

    Let me know if you run into any other issues...

     

     

    -Joe