Get Federation Mirror Lag Time

JFrog REST APIs

Products
JFrog Xray
Content Type
REST API
ft:sourceType
Paligo

Description: Returns the elapsed time since the last event that was not handled on each Federation mirror for all repositories.

Since: 7.49.3

Security: Requires an admin user.

Usage:GET api/federation/status/mirrorsLag

Usage Strategy: Use this API to gather lag statistics at regular intervals (e.g. every few minutes/hours). When a repository with significant lag is detected, use the repository status API to get additional details.

Query Parameters (optional):

Field

Type

Description

thresholdTimeInMs

integer

(Introduced in 7.61.0.) Returns only those repositories whose lag exceeds this defined threshold (in milliseconds).

Sample Request:

    GET api/federation/status/mirrorsLag

Sample Response (no threshold defined):

[
    {
        "localRepoKey" :  "example-repo-local" ,
        "remoteUrl" :  "http://docker.for.mac.localhost:10103/artifactory/" ,
        "remoteRepoKey" :  "test1-repo" ,
        "lagInMS" :  1500 ,
        "eventRegistrationTimeStamp" :  1663772736117
    },
    {
        "locallRepoKey" :  "example-repo-local" ,
        "remoteUrl" :  "http://docker.for.mac.localhost:10102/artifactory/" ,
        "remoteRepoKey" :  "test2-repo" ,
        "lagInMS" :  5200 ,
        "eventRegistrationTimeStamp" :  1663772736117
    }
]

Sample Response (with defined threshold of 5000 ms):

GET api/federation/status/mirrorsLag?thresholdTimeInMs=5000
[
    {
        "locallRepoKey" :  "example-repo-local" ,
        "remoteUrl" :  "http://docker.for.mac.localhost:10102/artifactory/" ,
        "remoteRepoKey" :  "test2-repo" ,
        "lagInMS" :   5200,
        "eventRegistrationTimeStamp" :  1663772736117
    }
]

The response displays the following information:

Property

Description

localRepoKey

The name of the local repository.

remoteUrl

The URL of the Federation mirror.

remoteRepoKey

The name of the repository on the Federation mirror.

lagInMS

The amount of time the event waits to be processed (in milliseconds). The calculation is current time/query time (eventRegistrationTimeStamp).

eventRegistrationTimeStamp

The time when the event was created.