Forum Discussion
Get sync-status
I am updating an iControl for a customer and I am unable to get the sync status of the active device. In version 10.x, I was able to access the DBVariable for Configsync.State and read the value for the sync state. However, in 11.x this does not provide reliable results. There is a tmsh command "show /cm sync-status" but I cannot find the equivalent iControl function to obtain this data.
None of the available methods in iControl :: System (ConfigSync, HAGroup or HAStatus) seems to yeild the simple information that I am needing to determine the current sync status of the active device.
19 Replies
- Jonathan_Scholi
Cirrostratus
- Jay_Lancaster_3Historic F5 AccountThanks Jonathan, that is the way I was retrieving the sync status on v.10x, however, that variable is not reliably populated in v.11x. I know the sync status is being stored somewhere, hence the tmsh command to view it, but I can find nothing in the 11.2 iControl.dll that reports the status.
- Jay_Lancaster_3Historic F5 AccountIs it possible to execute a tmsh command within an iControl and capture the output? The iControl is written in vb.net. If this is possible then I could execute the command above and parse the output for the sync status.
- Glenn_33003
Nimbostratus
I'm hoping the answer is an 'iControl' centric solution; an API or DB Variable. - John_Matlock_42
Nimbostratus
Glenn and Jay,
I, too, am looking for a solution to this problem. Have you had any success?
John - Glenn_33003
Nimbostratus
I have had NO success :-(
The values retured by some DB variables are not populated, or are invalid. I'm currently working with our f5 rep who said:
>>In 11.x we introduced Device Service Clustering (DSC) and Device Groups,
>>Traffic-groups, etc. so iControl libraries for sync status were moved
>>under this heading.
>>
>>https://devcentral.f5.com/wiki/iCon...Group.ashx
>>
>>I believe this should provide the information you were looking for.
Sadly, and unfortunately, the API ''get_sync_state" in Management::DeviceGroup does not exist in version11.2 of the 'iControl' library download from their site.
In other words, I've been stuck for over a month with no solution :-(
- Jonathan_Scholi
Cirrostratus
Unfortunately, it's not just missing from the library download on the F5 site, it doesn't exist in the 11.2.0 WSDL on the device itself: https://your-ltm/iControl/iControlPortal.cgi?WSDL=Management.DeviceGroup - John_Matlock_42
Nimbostratus
Ugh. I also reached out to our F5 rep. I wonder if the situation is at all improved in v11.3. Thanks for responding so quickly Glenn.
John - Michael_Yates
Nimbostratus
Hi guys,
I queried multiple devices from v10.2.x to v11.2.x and was able to retrieve the Sync Status.
Try: Management::DBVariable
with the query variable.
string[] lbstatus = new[] { "configsync.state" };
ManagementDBVariableVariableNameValue[] syncValue = f5Interface.ManagementDBVariable.query(lbstatus);
switch (syncValue[0].value)
{
case "0 - Synchronized":
settings.SyncStatus = "Synchronized";
break;
case "1 - Local config modified, recommend configsync to peer":
settings.SyncStatus = "Local config modified, Sync Recommended";
break;
case "2 - Peer config modified, recommend configsync from peer":
settings.SyncStatus = "Peer config modified, Sync Recommended";
break;
case "3 - Config modified on both systems, manual intervention required":
settings.SyncStatus = "Config modified on both systems, Sync Recommended";
break;
case "-1 - uninitialized or disabled config state":
settings.SyncStatus = "Standalone - N/A";
break;
default:
settings.SyncStatus = syncValue[0].value;
break;
} - John_Matlock_42
Nimbostratus
Michael,
That's essentially the code I've been using. Having dug a little deeper, this works fine on my 6900s, but not on my Viprions. On my Viprion pair it just comes back as standalone. Any thoughts?
John- Michael_Yates
Nimbostratus
Unfortunately, I do not currently have access to any Viprions yet. I should soon, so as soon as I do I will dig into it and see what I can find.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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
