ARTIFACTORY: Steps to retrieve JFrog worker metrics

ARTIFACTORY: Steps to retrieve JFrog worker metrics

Products
Frog_Artifactory
Content Type
User_Guide
AuthorFullName__c
Praphakaran sakthivel
articleNumber
000006634
FirstPublishedDate
2025-09-21T07:14:04Z
lastModifiedDate
2025-09-21
VersionNumber
1
Introduction 

JFrog Worker is a service that allows you to create workers that react to events in the JFrog Platform and execute custom code you write. To retrieve metrics from this service, a regular admin-scoped token will not work. Instead, a different scoped token must be used.

This article provides step-by-step instructions for retrieving metrics from the Worker service using the correct scope.

Prerequisites:
  • Artifactory with Worker service configured
  • Open Metrics enabled in Artifactory
Resolution 

When using a regular admin-scoped Access Token to retrieve Worker metrics, the request will fail.

Step-by-Step Instructions:
  • Create a new Access Token with the system:metrics:r scope:
  • Use the following command to create an Access token:
    curl -H "Authorization: Bearer <Token>" -X POST "http://URL/access/api/v1/tokens" -H "Content-Type: application/json" \
      -d '{
            "scope": "system:metrics:r",
            "expires_in": 0
          }'
    
  • Use the newly created Access Token to successfully retrieve worker metrics.
User-added image 

Conclusion

To access Worker metrics, you must generate and use an Access Token with the system:metrics:r scope. Regular admin-scoped tokens are insufficient for this operation.