Forum Discussion
EKON_26654
Nimbostratus
Aug 19, 2010Monitor interface seems bogus.
Hello,
I am not sure if I am misunderstanding what I am supposed to get as a result, but my basic issue is that I am trying to use icontrol to FORCE a member down in a pool.
In using th...
Aug 19, 2010
The quick and dirty answer is to use the LocalLB.PoolMember methods when you are working on the pool members. We get this question a lot so I'll whip up a tech tip around the Monitor interface and how to use it. For now, look at the LocalLB.PoolMember.set_session_enabled_state() to disable new connections, monitor the LocalLB.PoolMember.get_statistics() method until connections drop to 0, and then use the LocalLB.set_monitor_state() method to down the pool member.
If you aren't concerned with a graceful shutdown (ie, not truncating existing connections), you can just go straight for the set_monitor_state() method.
I've written a few tech tips on this topic like this one:
http://devcentral.f5.com/Tutorials/TechTips/tabid/63/articleType/ArticleView/articleId/254/iControl-Apps--04--Graceful-Server-Shutdown.aspx
And here's the full sample code behind it:
http://devcentral.f5.com/wiki/default.aspx/iControl/PsPoolMemberControl.html
That example is written in PowerShell but hopefully you'll be able to read the logic flow and method calls if you need to translate it to a different language.
Let me know if this needs more clarification.
-Joe
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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