Help with LocalLB::Pool/set_monitor_association

Hi again,

I think I’m on the last hurdle here. Trying to associate a health monitor with a pool. I think I’ve built the DS according to the ref: http://devcentral.f5.com/wiki/default.aspx/iControl/LocalLB\_\_Pool\_\_set\_monitor\_association.html.

BUILD DS

my ( @MonitorAssociationA, @MonitorAssociationAofA );

my $MonitorRule = {

type => “MONITOR_RULE_TYPE_SINGLE”,

quorum => 0,

monitor_templates => [$f5_template_name]

};

my $MonitorAssociation = {

pool_name => $f5_pool_name,

monitor_rule => $MonitorRule

};

push @MonitorAssociationA, $MonitorAssociation;

push @MonitorAssociationAofA, [@MonitorAssociationA];

my $soapResponse = $Pool->set_monitor_association(

SOAP::Data->name(monitor_associations => [@MonitorAssociationAofA])

);

When I run the script, however, I see:

$ ./associateMonitor.pl

SOAP-ENV:Server Could not find element by name: pool_name

The pool_name is definitely defined though:

$VAR1 = [

{

‘monitor_rule’ => {

‘type’ => ‘MONITOR_RULE_TYPE_SINGLE’,

‘quorum’ => 0,

‘monitor_templates’ => [

‘https_test_pool2_monitor’

]

},

‘pool_name’ => ‘test_pool2_443’

}

];

Once again, any help would be much appreciated. Thanks!

Justin

Aha, I figured it out. I had a level in the nested array that was empty. Removed that level and it works. Thanks anyway!

Great, it’s always better when you figure it out yourself. That way if you get into the problem again, you’ll have something to reference.

Using the Perl interfaces does take a little learning curve to figure out how to formulate all the parameters. Keep in mind that the stronger typed languages (.Net, Java) have bindings setup so you don’t have to do so much packaging of structure/etc.

-Joe

Hi there,

I am having exactly the same problem. Would you mind posting the Data::Dumper output of your new structure?

Many thanks,

Hayato

I’ve figured it out now! I’m still getting used to it but I’ll get there soon!

Hello,

I am hitting the same issue except with JAVA, any ideas?

monitorAssociationLocalLBPoolMonitorAssociation (id=66)

__equalsCalcnull

__hashCodeCalcfalse

monitor_ruleLocalLBMonitorRule (id=67)

__equalsCalcnull

__hashCodeCalcfalse

monitor_templatesString[1] (id=65)

[0]“AA-passive” (id=68)

count10

hash-1652696102

offset0

valuechar[10] (id=74)

quorum0

typeLocalLBMonitorRuleType (id=47)

_value_“MONITOR_RULE_TYPE_AND_LIST” (id=75)

count26

hash-519180115

offset0

valuechar[26] (id=76)

pool_name"test-pool" (id=71)

count10

hash1541172179

offset0

valuechar[10] (id=72)

the new structure: $VAR1 = { ‘monitor_rule’ => { ‘type’ => ‘MONITOR_RULE_TYPE_SINGLE’, ‘quorum’ => ‘0’, ‘monitor_templates’ => [ ‘https’ ] }, ‘pool_name’ => ‘testabc-pool’ };