Forum Discussion

2funky_105078's avatar
Jun 18, 2013

setting "forced offline" status for pool member

Hello,

 

We are coding a script in our servers in order to POST a url in order to put a pool member in FORCED OFFLINE which requires 2 calls.

 

The POST to do simple DISABLED works, but it doesnt work for the FORCED OFFLINE.as it gives HTTP 500 error.

 

This is what was told us to do in order to achieve it,

 

Is this correct? Why do we get HTTP 500?

 

 

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

 

The 2 requests for up/force offline

 

 

STATE_ENABLED

 

REQUEST:

 

 

 

t;10.0.0.10STATE_ENABLED

 

 

REQUEST:

 

 

 

t;10.0.0.10STATE_ENABLED

 

 

STATE_DISABLED

 

REQUEST:

 

 

 

t;10.0.0.10STATE_DISABLED

 

 

REQUEST:

 

 

 

t;10.0.0.10STATE_DISABLED

 

 

 

Php code to achieve the above, beware that the WSDL contains the FQDN of the BIG-IP and SoapClient will use that FQDN to connect to the BIG-IP and not the IP address to download the WSDL file, so your PC needs to be able to resolve the FQDN of the BIG-IP for this to work.

 

 

 

function soap_initialisation() {

 

$username='admin';

 

$password='admin';

 

$hostname='172.29.28.50';

 

$wsdl="https://$hostname/iControl/iControlPortal.cgi?WSDL=LocalLB.NodeAd

 

dress";

 

 

return new SoapClient($wsdl,array('login'=>$username,'password'=>$password,'trace'=>1));

 

}

 

 

$client=soap_initialisation();

 

 

$nodes = array('10.0.0.10');

 

 

$state=array_fill(0, sizeof($nodes), 'STATE_ENABLED');

 

echo "STATE_ENABLEDn"n"n"n"n"n"n"n"n"n";

 

?>

 

 

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

 

1 Reply

  • try this. $state=array_fill(0, sizeof($nodes), 'SESSION_STATUS_ENABLED'); Or $state=array_fill(0, sizeof($nodes), 'MONITOR_STATUS_UP');