Forum Discussion
wayney_128269
Nimbostratus
Aug 18, 2005example of a call to PoolMember.set_monitor_state
I cannot find any sample C code in the SDK that does a call to PoolMember.set_monitor_state. Can someone send me some sample c code that makes this call?
thanks
wayne
Sep 26, 2005
Wayne,
What is your configuration? The code looks odd as you are passing in two pools in the first parameter, but not sending in any monitor_states for the second pool.
ie.
+pool101
|-- 10.10.10.12:443 (DISABLED)
|-- 10.10.10.12:80 (DISABLED)
+pool100
Is the node listening on 80 in your pool101? That is what it seems the error is indicating? The reason why I'm confused is that you specified in the post that you were trying to manage two pools when this error occurred.
If the 80 node is in the second pool, you need to add that monitor state to the second entry in the first dimension of the array:
String [] pool_names = new String[] { "pool101","pool100" };
PoolMember.LocalLBPoolMemberMemberMonitorState[][] monitor_states =
new PoolMember.LocalLBPoolMemberMemberMonitorState[2][];
// For pool pool101
monitor_states[0] = new PoolMember.LocalLBPoolMemberMemberMonitorState[1];
monitor_states[0][0] = new PoolMember.LocalLBPoolMemberMemberMonitorState();
monitor_states[0][0].member = new PoolMember.CommonIPPortDefinition();
monitor_states[0][0].member.address = "10.10.10.12";
monitor_states[0][0].member.port = 443;
monitor_states[0][0].monitor_state = PoolMember.CommonEnabledState.STATE_DISABLED;
// For pool pool100
monitor_states[1] = new PoolMember.LocalLBPoolMemberMemberMonitorState[1];
monitor_states[1][0] = new PoolMember.LocalLBPoolMemberMemberMonitorState();
monitor_states[1][0].member = new PoolMember.CommonIPPortDefinition();
monitor_states[1][0].member.address = "10.10.10.12";
monitor_states[1][0].member.port = 80;
monitor_states[1][0].monitor_state = PoolMember.CommonEnabledState.STATE_DISABLED;
PoolMember2.set_monitor_state(pool_names, monitor_states);
This will send the following:
+pool101
|-- 10.10.10.12:443 (DISABLED)
+pool100
|-- 10.10.10.12:80 (DISABLED)
Which is what I think you are trying to do? Correct me if I've got it wrong.
-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