Forum Discussion
Sunit_Tailor_84
Nimbostratus
Nov 13, 2006How to get MemberMonitorState[][] for Pool Members
Hi,
I know how to set MemberMonitorState[][] for a pool member but I don't know how to get it for a poolmember:
Set MemberMonitorState[][]:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
iControl.LocalLBPoolMemberMemberMonitorState[][] memberMonitorState = null;
memberMonitorState = new iControl.LocalLBPoolMemberMemberMonitorState[1][1];
memberMonitorState[0][0] = new iControl.LocalLBPoolMemberMemberMonitorState();
memberMonitorState[0][0].setMember(member);
memberMonitorState[0][0]
.setMonitor_state(iControl.CommonEnabledState.STATE_DISABLED);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This is working good...
For get MemberMonitorState[][] I tried following but it is not working :
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
iControl.LocalLBPoolMemberMemberMonitorState[][] memberMonitorState = null;
memberMonitorState = new iControl.LocalLBPoolMemberMemberMonitorState[1][1];
memberMonitorState[0][0] = new iControl.LocalLBPoolMemberMemberMonitorState();
memberMonitorState[0][0].setMember(member);
monitorStateValue = memberMonitorState[0][0].getMonitor_state().getValue();
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Please let me know what is the best way to get MemberMonitorState for a pool member.
Thanks
1 Reply
- I'm confused. All your code does is initialize local variables. Where are the iControl calls to set/get the data?
In your first example of setting a variable, all you are doing is initializing the memberMonitorState local variable? Where is the call to LocalLB::PoolMember::set_monitor_state()? I'm assuming you are just omitting the call to set_monitor_state() after your initialization.
Your second example looks as it's doing the same thing. In looking at the SDK, there is no associated LocalLB::PoolMember::get_monitor_state(), but a get_monitor_status() method that returns the status of the monitoring system on that pool member.enum MonitorStatus { MONITOR_STATUS_UNCHECKED, // An enabled object that is not being monitored. MONITOR_STATUS_CHECKING, //Initial status of a object until its monitors report. MONITOR_STATUS_UP, // Status of an enabled object when its monitors succeed. MONITOR_STATUS_DOWN, // Status of an enabled object when its monitors fail. MONITOR_STATUS_FORCED_DOWN, //Status of a object when it's forced down manually. MONITOR_STATUS_MAINT, //Status of an object when in maintenance mode. MONITOR_STATUS_ADDRESS_DOWN, // Status of an object whose node address monitor fails. MONITOR_STATUS_DOWN_BY_IRULE, //Status of an object which has been marked down by an iRule. MONITOR_STATUS_DOWN_WAIT_FOR_MANUAL_RESUME, // An object which has been marked down, // and should be manually marked up. }; struct MemberMonitorStatus { IPPortDefinition member MonitorStatus monitor_status } MemberMonitorStatus[][] LocalLB::PoolMember::get_monitor_status( in String[] pool_names );
So, to get the montior state, you'll need to pass in the pool name, and it will return the members and their asociated monitor statuses.
-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