Forum Discussion
Feb 24, 2015
BIG-IP : determine active device
F5 BIG-IP Virtual Edition v11.4.1 (Build 635.0) LTM on ESXi
Via iControl API :
How to determine if a specific device is operating in active or standby mode for an active-standby sync-failo...
shaggy
Feb 24, 2015Nimbostratus
I was able to get v11 failover-state using 'Management.DeviceGroup.get_failover_status()' (https://devcentral.f5.com/wiki/iControl.Management__DeviceGroup__get_failover_status.ashx)
Not sure what language you use, but the python commands are:
Python 2.7.6
Type "help", "copyright", "credits" or "license" for more information.
>>> import bigsuds
>>> import getpass
>>> nameuse = raw_input('user: ')
user: admin
>>> passuse = getpass.getpass()
Password: xxxxxxx
>>> b1 = bigsuds.BIGIP(hostname = "lb-01.test.com",username = nameuse,password = passuse)
>>> b2 = bigsuds.BIGIP(hostname = "lb-02.test.com",username = nameuse,password = passuse)
>>> print b1.Management.DeviceGroup.get_failover_status()
{'failover_status': 'HA_STATE_STANDBY', 'color': 'COLOR_GRAY', 'status': 'STANDBY', 'details': [], 'summary': '1/1 standby'}
>>> print b2.Management.DeviceGroup.get_failover_status()
{'failover_status': 'HA_STATE_ACTIVE', 'color': 'COLOR_GREEN', 'status': 'ACTIVE', 'details': ['active for /Common/traffic-group-1'], 'summary': '1/1 active'}
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