Forum Discussion
Michael_57183
Feb 22, 2012Nimbostratus
Hi Joe,
Thanks for the link; the table does an excellent job explaining how the Toggle State is derived from the Monitor & Session States (State or Status?).
I'm still a little confused on
1. which monitor_status responses translate to STATE_ENABLED or STATE_DISABLED, and
2. which session_status responses translate to STATE_ENABLED or STATE_DISABLED
According to the LocalLB::MonitorStatus documentation, there exists 9 possible monitor statuses, none of which are "STATE_ENABLED" or "STATE_DISABLED":
0. MONITOR_STATUS_UNCHECKED
1. MONITOR_STATUS_CHECKING
2. MONITOR_STATUS_UP
3. MONITOR_STATUS_DOWN
4. MONITOR_STATUS_FORCED_DOWN
5. MONITOR_STATUS_MAINT
6. MONITOR_STATUS_ADDRESS_DOWN
7. MONITOR_STATUS_DOWN_BY_IRULE
8. MONITOR_STATUS_DOWN_WAIT_FOR_MANUAL_RESUME
My best guess is that "MONITOR_STATUS_UP" should be considered "STATE_ENABLED" and all others should be considered "STATE_DISABLED". Does this logic make sense? Are there any "best practice recommendation" or precedents set from preexisting get_toggle_state() scripts on how to interpret each of these monitor statuses?
Also, according to the , there exists 4 possible monitor statuses, none of which are "STATE_ENABLED" or "STATE_DISABLED":
0. SESSION_STATUS_ENABLED
1. SESSION_STATUS_DISABLED
2. SESSION_STATUS_FORCED_DISABLED
3. SESSION_STATUS_ADDRESS_DISABLED
Again, my best guess here is that "SESSION_STATUS_ENABLED" should be considered "STATE_ENABLED" and all others should be considered "STATE_DISABLED". Is this correct?
TIA
-Michael