Forum Discussion
Coyot_Linden_17
Nimbostratus
Jan 24, 2011ConfigSync
When we log into the F5 BUI, we see a red or green bar next to ConfigSync. Is there a way to check this value via pyControl?
Thanks,
coyot
4 Replies
- L4L7_53191
Nimbostratus
I don't see a call in the API for this, but it's a great idea. It would be a feature request for iControl, submitted via a support case.
-Matt - Joe_Wojcik
Employee
You can pull this already via the API. The status indicator that you see in the GUI is determined by the value of a DB variable named 'configsync.state'. Here's some sample code and the output that I get from running it.
C:\dev\Python27\pycontrol_scripts>python configsync_status.py
3 - Config modified on both systems, manual intervention required!/usr/bin/python import pycontrol.pycontrol as pc myLTM = pc.BIGIP(hostname = '192.168.1.100', username = 'admin', password = 'password', fromurl=True, wsdls = ['Management.DBVariable']); myState = myLTM.Management.DBVariable.query( ['configsync.state']); print myState[0].value;
Edit:
The response codes are basically
0 - Synchronized
1 - Local config modified, recommend configsync to peer
2 - Peer config modified, recommend configsync from peer
3 - Config modified on both system, manual intervention required
So to use your Green or Red status then Green = 0 and everything else is Red. - L4L7_53191
Nimbostratus
Nice one Joe, makes perfect sense - I forget about the DBVariable wsdl, excellent stuff!
-Matt - Coyot_Linden_17
Nimbostratus
Indeed, many thanks! Will try this out soon!
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