Cloud customer?
Start for Free >
Upgrade in MyJFrog >
What's New in Cloud >



The JFrog Platform now supports Open Metrics.

Credentials for Accessing Open Metrics

From Artifactory version 7.21.1, an admin user can create a scoped access token using system:metrics:r and use that as the credentials for getting the service metrics. The admin can create read-only access token to get metrics, which then enables anyone with the read-only token to read metrics. To learn more, see Access Token Structure.

To enable metrics in Artifactory, make the following configuration changes to the Artifactory System YAML.

        enabled: true

To enable metrics in Xray, make the following configuration changes to the Xray System YAML.

        enabled: true

To enable metrics in Insight, make the following configuration changes to the Insight System YAML.

## Insight scheduler template
        enabled: false
## Insight server template
        enabled: false
Page Contents


Supported Open Metrics

Artifactory Metrics

The Get the Open Metrics for Artifactory REST API returns the following metrics in Open Metrics format




Total CPU used by the artifactory process


Total Disk used by the application (Home directory)


Total Disk free
jfrt_artifacts_gc_duration_secondsTime taken by a GC run
jfrt_artifacts_gc_binaries_totalNumber of binaries removed by a GC run
jfrt_artifacts_gc_size_cleaned_bytesSpace reclaimed by a GC run
jfrt_artifacts_gc_current_size_bytesSpace occupied by Binaries after a GC run (Only for FULL GC runs)
jfrt_runtime_heap_freememory_bytesAvailable free memory for JVM 
jfrt_runtime_heap_maxmemory_bytesMaximum memory configured for JVM
jfrt_runtime_heap_totalmemory_bytesTotal memory configured for JVM memory
jfrt_runtime_heap_processors_totalTotal number of processors for JVM memory
jfrt_db_connections_active_totalTotal number of active total DB connections
jfrt_db_connections_idle_totalTotal number of idle DB connections
jfrt_db_connections_max_active_totalTotal number of maximum DB connections
jfrt_db_connections_min_idle_totalTotal number of min idle DB connections

Total number of available outbound HTTP connections

jfrt_http_connections_leased_totalTotal number of available leased HTTP connections
jfrt_http_connections_pending_totalTotal number of available pending HTTP connections
jfrt_http_connections_max_totalTotal number of maximum HTTP connections


Slow queries duration in seconds

jfrt_http_connections_* metrics collects outbound HTTP connections for repositories sorted by available pool count. If you want to collect this information for more repositories,  you can set the value in the file (available at $JFROG_HOME/var/etc/artifactory/) using the flag, The default and recommended value is 10. You can set the value to any integer. 

Xray Metrics

The Xray Metrics REST API returns the following metrics:

jfxr_db_sync_started_before_secondsSeconds that passed since the last Xray DB sync started running


DB sync total running time


Seconds that passed since completed persisting new updates to the database


Seconds that passed since DB sync completed sending all impact analysis messages


Total number of Xray scanned artifacts by package type 

Note: Package type is a label package_type


Total number of Xray scanned components by package type

Note: Package type is a label package_type


Seconds that passed since Xray server has started on the particular node


The artifactory_metrics.log will contain system metrics such as: 

      • Total disk space used
      • Total disk space free
      • Time CPU is used by the process
      • JVM available memory
      • JVM number of processors
      • DB number of active, idle, max and min connections
      • HTTP number of available, leased, pending and max connections
      • Xray DB sync running time
      • Xray total number of scanned artifacts and components
      • Xray server start time on a node

The artifactory_metrics_events.log will contain deduplicated metrics related to an event such as a GC run.

Usage Example - Prometheus

Update the prometheus.yml file to add a scrape job. Update the following configuration with the adequate values:

  • job_name: Use a unique name among other scrape jobs. All metrics collected through this job will have automatically a ‘job’ label with this value added to it
  • username: The name of an admin user 
  • password: The admin password
  • targets: The URL of the Artifactory node.
- job_name: 'artifactory'
    # Configures the protocol scheme used for requests.
    [scheme: <scheme> | default = http]
    # Sets the `Authorization` header on every scrape request with
    # the configured credentials.
		[type: <string> | default: Bearer]
  		credentials: <secret> 
    # metrics_path defaults to '/metrics'
    metrics_path: '/artifactory/api/v1/metrics'
    - targets: ['<JFROG_URL>:<PORT>']

For more information about Prometheus scrap job configuration, see here.
  • No labels
Copyright © 2022 JFrog Ltd.