Forum Discussion
Pushkar_73645
Nimbostratus
Aug 24, 2010php based solution of icontrol
Hi,
I am trying to write an php script to enable and disable nodes.
I was trying to use following call. I get $serv value from my previous call to LB which get list of all servers.
I see myself entering the loop. But the node is not disabled.
if ($serv == "192.168.100.50"){
echo "test";
$client3->set_monitor_state($serv,"STATE_DISABLED");
}
Thanks,
Pushkar
- samstep
Cirrocumulus
set_monitor_state method takes an array of nodes as a first parameter, not a string, check out the API documentation: - Pushkar_73645
Nimbostratus
Thanks. - JRahm
Admin
- Richard_Jones
Nimbostratus
Pushkar, - Pushkar_73645
Nimbostratus
$servers = array(0=>$server); - Richard_Jones
Nimbostratus
Thanks! Unfortunately, it doesn't seem to work for me. I assume $server is the node address? What about for disabling a pool member? Have you tried that at all? - Pushkar_73645
Nimbostratus
yes $server is a node address.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects