Forum Discussion
Nov 13, 2006
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