ARTIFACTORY: Federated Repository Synchronization Status Monitoring Guide
There are few ways to check the synchronization status of federated repositories.
In this article, we will discuss how to check and verify federated repository sync status.
Using REST APIsGet Federation Sync State
It lists synchronization status for all the federated repositories.
❯ curl -uadmin:password http://[ARTIFACTORY_URL]/artifactory/api/federation/state
[ {
"key" : "npm-federated",
"status" : "SYNCING",
"members" : [ {
"remoteKey" : "npm-federated",
"remoteUrl" : "http://[ARTIFACTORY_URL]/artifactory"
} ]
}, {
"key" : "generic-federated",
"status" : "SYNCING",
"members" : [ {
"remoteKey" : "generic-federated",
"remoteUrl" : "http://[ARTIFACTORY_URL]/artifactory"
} ]
}, {
"key" : "debian-federated",
"status" : "SYNCING",
"members" : [ {
"remoteKey" : "debian-federated",
"remoteUrl" : "http://[ARTIFACTORY_URL]/artifactory"
} ]
} ]Get Federated Repository StatusIt returns synchronization status of a specific federated repository.
❯ curl -uadmin:password http://[ARTIFACTORY_URL]/artifactory/api/federation/status/repo/npm-federated
{
"localKey" : "npm-federated",
"binariesTasksInfo" : {
"inProgressTasks" : 0,
"failingTasks" : 0
},
"mirrorEventsStatusInfo" : [ {
"remoteUrl" : "http://[ARTIFACTORY_URL]/artifactory/",
"remoteRepoKey" : "npm-federated",
"status" : "SYNC",
"createEvents" : 0,
"updateEvents" : 0,
"deleteEvents" : 0,
"propsEvents" : 0,
"errorEvents" : 0,
"lagInMS" : 0,
"eventRegistrationTimeStamp" : 0
} ],
"federatedArtifactStatus" : {
"countFullyReplicateArtifacts" : 10,
"countArtificiallyReplicatedArtifacts" : 0
}
}Get Federated Repository Status (v2)Can be used on Artifactory versions 7.82.2 or higher. It returns synchronization status of a specific federated repository, showing more advanced information on the “status” than the above “Get Federated Repository Status” REST API.
❯ curl -uadmin:password http://[ARTIFACTORY_URL]/artifactory/api/v2/federation/status/repo/npm-federated
{
"localKey" : "npm-federated",
"binariesTasksInfo" : {
"inProgressTasks" : 0,
"failingTasks" : 0
},
"mirrorEventsStatusInfo" : [ {
"remoteUrl" : "http://[ARTIFACTORY_URL]/artifactory/",
"remoteRepoKey" : "npm-federated",
"status" : "HEALTHY",
"createEvents" : 0,
"updateEvents" : 0,
"deleteEvents" : 0,
"propsEvents" : 0,
"errorEvents" : 0,
"lagInMS" : 0,
"eventRegistrationTimeStamp" : 0
} ],
"federatedArtifactStatus" : {
"countFullyReplicateArtifacts" : 10,
"countArtificiallyReplicatedArtifacts" : 0
}
}From Artifactory UIView Federation Sync Status
From Artifactory v7.55.1, admin users can check the federated repository synchronization status from the UI. This page shows information such as synchronization delays between federated repositories between JPDs.
From the new UI (from Artifactory v7.90):
View Federated Repository Status
From Artifactory v7.58.0, admin users can view the current status of a specific federated repository. This page shows information such as number of replicated artifacts, number of queued events, error events…etc.
Not a reliable method
The ‘Storage’ monitoring page from the UI is not a reliable option to verify federation synchronization status. It shows artifact size and file counts, but since repositories can hold temporary files such as the ones under the “_uploads” folder or metadata files, which do not get federated over to the federation members, there could be file count / size differences even when the actual artifact binaries are synced.