Forum Discussion

orangepeelbeef_'s avatar
orangepeelbeef_
Icon for Nimbostratus rankNimbostratus
May 21, 2009

perl create pool & monitor problem

Hi there, I'm trying to get a perl pool creator working properly. Actually Everything is working except for the monitor definition, and when I try to add a monitor, I get back a 500 error from the bigip.

 

Here's the code snippet

 

 
 $Pool = SOAP::Lite 
 -> uri('urn:iControl:LocalLB/Pool') 
 -> proxy("$sProtocol://$sHost:$sPort/iControl/iControlPortal.cgi"); 
 eval { $Pool->transport->http_request->header 
 ( 
 'Authorization' =>  
 'Basic ' . MIME::Base64::encode("$sUID:$sPWD", '') 
 ); }; 
 --------------------------------------------------------------------- 
  Add the default HTTP monitor to a pool 
 --------------------------------------------------------------------- 
 sub addmonitor($) { 
 my $pool = shift; 
 $soapResponse = $Pool->set_monitor_association(  
 SOAP::Data->name(monitor_associations =>  
 \SOAP::Data->name(MonitorAssociation => 
 \SOAP::Data->value( 
 SOAP::Data->name(pool_name => "$pool"), 
 SOAP::Data->name(monitor_rule => 
 \SOAP::Data->value( 
 SOAP::Data->name(type=>"MONITOR_RULE_TYPE_SINGLE"), 
 SOAP::Data->name(quorum=> 0), 
 SOAP::Data->name(monitor_templates=>"http") 
 ) 
 ))))); 
 &checkResponse($soapResponse); 
 } 
 

 

soap envelope

 

portal-qaMONITOR_RULE_TYPE_SINGLE0http 
 SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH(0x89bb5d0) 
 SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal Server Error