Forum Discussion

4 Replies

  • 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
  • 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.

     

  • Nice one Joe, makes perfect sense - I forget about the DBVariable wsdl, excellent stuff!

     

    -Matt