Coyot_Linden_17
Jan 24, 2011Nimbostratus
ConfigSync
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
Thanks,
coyot
-Matt
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.
-Matt