---
updatedAt: 2026-03-08T13:30:45.000Z
agentTools:
  siteIndex: https://docs.jfrog.com/llms.txt
  projectIndex: https://docs.jfrog.com/administration/llms.txt
---

# Prometheus with Grafana

<br />

<br />

<Callout icon="📘" theme="info">
  **Subscription Information**

  This feature is supported on the **Self-Hosted** platform, with a **Pro**, **Pro X**, **Enterprise X**, or **Enterprise+** license.
</Callout>

JFrog supports integration with Prometheus for log monitoring. The JFrog Log Analytics and Metrics solution using Prometheus consists of three segments,

1. Prometheus - the component where metrics data gets ingested
2. Loki - the component where log data gets ingested
3. <Anchor label="Grafana" target="_blank" href="https://grafana.com/oss/grafana/">Grafana</Anchor> - the component where data visualization is achieved via prebuilt dashboards

<Callout icon="📘" theme="info">
  **Note**

  This version replaces all previous implementations. This version is not an in-place upgrade to the existing solution from JFrog but a full reinstall. Any dashboard customizations done on previous versions will need to be redone after this installation
</Callout>

<Callout icon="📘" theme="info">
  **Note**

  This guide assumes the implementer is performing a new setup. Changes to handle install in an existing setup are highlighted where applicable. If Prometheus is already installed and configured, we recommend to have the existing Prometheus release name handy. If Loki is already installed and configured, we recommend to have its service URL handy.
</Callout>

If Prometheus and Loki are already available, you can skip the installation section and proceed to the configuration section.

#### Prerequisites for Prometheus with Grafana

##### For Kubernetes Deployments:

* Working and configured Kubernetes Cluster - Amazon EKS / Google GKE / Azure AKS / Docker Desktop / Minikube

  * Recommended Kubernetes version 1.25.2 and above
  * ['kubectl' utility](https://kubernetes.io/docs/tasks/tools/) on the workstation which is capable of connecting to the Kubernetes cluster
* HELM v3 Installed
* Versions supported and tested:

  * Jfrog Platform: 10.9.2
  * Artifactory: 7.46.10
  * Xray: 3.59.4
  * Prometheus: 2.39.1
  * Grafana: 9.2.3
  * Loki: 2.6.1

##### For Non-Kubernetes Deployments:

* A running instance of JFrog Artifactory.
* Root/Admin access to the server/VM where you intend to host the monitoring tools.
* Network connectivity between the monitoring server and the JFrog Platform.

#### Install Prometheus, Loki and Grafana

The Prometheus Community <Anchor label="kube-prometheus-stack" target="_blank" href="https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack">kube-prometheus-stack</Anchor> helm chart allows the creation of Prometheus instances and includes Grafana. The Grafana Community <Anchor label="grafana helm chart" target="_blank" href="https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack">grafana helm chart</Anchor> allows the creation of Loki instances and includes Grafana that can link to Prometheus.

##### On Kubernetes:

Once the prerequisites are met, to install Prometheus Kubernetes stack:

###### Create the Namespace required for Prometheus Stack deployment

```
kubectl create namespace jfrog-plg
```

We will use `jfrog-plg` as the namespace throughout this document.

###### Install the Prometheus Chart

1. Add the required Helm Repositories:

   ```
   helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
   helm repo update
   ```
2. Install the chart:

   ```
   helm install "prometheus" prometheus-community/kube-prometheus-stack -n jfrog-plg
   ```

   **Where**: "prometheus" is the value that needs to be used against the value for "release\_name" in the configuration section.

For Docker Desktop, run this additional command to correct the mount path propagation for Prometheus node-exporter component. An error event will appear as follows "Error: failed to start container "node-exporter": Error response from daemon: path / is mounted on / but it is not a shared or slave mount".

```
kubectl patch ds prometheus-prometheus-node-exporter --type "json" -p '[{"op": "remove", "path" : "/spec/template/spec/containers/0/volumeMounts/2/mountPropagation"}]' -n jfrog-plg
```

###### Install the Loki Chart

1. Add the required Helm Repositories:

   ```
   helm repo add grafana https://grafana.github.io/helm-charts
   helm repo update
    
   helm repo add loki https://grafana.github.io/loki/charts
   helm repo update
   ```
2. Install the chart:

   ```
   helm upgrade --install "loki" grafana/loki-stack -n jfrog-plg
   ```

   **Where**:

   * "loki" will be the service name. The url to access Loki as a datasource can be visualised as `http://<service_name>.<namespace>:<port>`. Example: `http://loki.jfrog-plg:3100` will be the "loki\_url" value.
   * \--version v2.6.1 is the most recent Loki version at the time of writing the document. If there is a need to deploy this exact version, then add "--version v2.6.1" to the command line.

##### On Non-Kubernetes:

For Pro and Self-Hosted customers not using Kubernetes, we recommend installing Prometheus and Grafana using the official vendor packages. This ensures you have the latest stable versions compatible with your specific operating system (RPM, Debian, Windows, etc.).

1. **Install Grafana**: Download and install Grafana for your OS by following the Official <Anchor label="Grafana" target="_blank" href="https://grafana.com/docs/grafana/latest/setup-grafana/installation/">Grafana</Anchor> Installation Guide.
2. **Install Prometheus**: Download and install Prometheus by following the Official [Prometheus](https://prometheus.io/docs/prometheus/latest/installation/) Installation Guide.

#### Prometheus with Grafana Configuration

The configuration that is needed before the JFrog products installation can take place are listed below:

From any of the value files for applying charts, that is in `helm/jfrog-platform-values.yaml`, `helm/artifactory-values.yaml`, `helm/artifactory-ha-values.yaml` or `helm/xray-values.yaml` download and provide the following values for `global.prometheus.loki_url` and `global.prometheus.release_name` as per the installation if Prometheus and Loki are already installed:

```
global:
   jfrog:
      observability:
         branch: master
   prometheus:
      loki_url: http:\/\/loki.jfrog-plg:3100
      release_name: prometheus
```

#### Configuration for Non-Kubernetes Support

If you installed Prometheus manually, you must configure it to scrape metrics from the JFrog Platform.

1. Generate an Access Token: Log in to the JFrog Platform and generate a scoped token or admin token that has permissions to read metrics.
2. Configure Prometheus: Locate your `prometheus.yml` file (typically found in `/etc/prometheus/` on Linux). Add the Artifactory scrape job to the `scrape_configs` section.
   <Callout icon="📘" theme="info">
     Replace `<YOUR_JFROG_ACCESS_TOKEN>` and `<YOUR_JFROG_PLATFORM_IP>` with your actual details.
   </Callout>
   ```yaml
   scrape_configs:
     - job_name: 'jfrog_artifactory'
       metrics_path: '/artifactory/api/v1/metrics'
       bearer_token: '<YOUR_JFROG_ACCESS_TOKEN>'
       scheme: http
       static_configs:
       - targets: ['<YOUR_JFROG_PLATFORM_IP>:8081']
   ```
3. **Restart Prometheus**: Restart the Prometheus service to apply the configuration change.

#### Prometheus with Grafana - JFrog Platform + Metrics via Helm

Ensure JFrog repo is added to helm.

```
helm repo add jfrog https://charts.jfrog.io
helm repo update
```

To configure and install JFrog Platform with Prometheus metrics being exposed use our file `helm/jfrog-platform-values.yaml` to expose a metrics and new service monitor to Prometheus.

JFrog Platform:

```
helm upgrade --install jfrog-platform jfrog/jfrog-platform \
       -f helm/jfrog-platform-values.yaml \
       -n jfrog-plg
```

<Callout icon="📘" theme="info">
  **Note**

  **If you are installing in the same cluster with the deprecated solution, Use the same namespace as the previous one instead of jfrog-plg above.**
</Callout>

#### Prometheus with Grafana - Artifactory / Artifactory HA + Metrics via Helm

For configuring and installing Artifactory Pro/Pro-x use the `artifactory-values.yaml` file.

For configuring and installing Enterprise/Ent+ use the `artifactory-ha-values.yaml` file.

You can apply them to your helm install examples below:

Artifactory:

```
helm upgrade --install artifactory jfrog/artifactory \
       --set artifactory.masterKey=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF \
       --set artifactory.joinKey=EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE \
       -f helm/artifactory-values.yaml \
       -n jfrog-plg
```

**If you are installing in the same cluster with the deprecated solution, Use the same namespace as the previous one instead of jfrog-plg above.**

Artifactory-HA:

```
helm upgrade --install artifactory-ha jfrog/artifactory-ha \
       --set artifactory.masterKey=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF \
       --set artifactory.joinKey=EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE \
       -f helm/artifactory-ha-values.yaml \
       -n jfrog-plg
```

**If you are installing in the same cluster with the deprecated solution, Use the same namespace as the previous one instead of jfrog-plg above.**

Note the above examples are only references you will need additional parameters to configure TLS, binary blob storage, or other common Artifactory features.

This will complete the necessary configuration for Artifactory and expose a new service monitor `servicemonitor-artifactory` to expose metrics to Prometheus.

#### Prometheus with Grafana - Xray + Metrics via Helm

To configure and install Xray with Prometheus metrics being exposed use our file `helm/xray-values.yaml` to expose a metrics and new service monitor to Prometheus.

Xray:

```
helm upgrade --install xray jfrog/xray --set xray.jfrogUrl=http://my-artifactory-nginx-url \
       --set xray.masterKey=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF \
       --set xray.joinKey=EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE \
       -f helm/xray-values.yaml \
       -n jfrog-plg
```

**If you are installing in the same cluster with the deprecated solution, Use the same namespace as the previous one instead of jfrog-plg above.**

#### Grafana Dashboard

Once Prometheus is connected to Grafana as a data source, you can import the pre-built dashboards to visualize your data.

##### For Kubernetes:

Example dashboards are included in the <Anchor label="grafana directory" target="_blank" href="https://github.com/jfrog/log-analytics-prometheus/tree/master/grafana">grafana directory</Anchor>. These dashboards needs to be imported to the grafana. These include:

* [Artifactory Metrics and Log Analytics Dashboard](https://github.com/jfrog/log-analytics-prometheus/blob/master/grafana/ArtifactoryLogAnalyticsAndSystemMetrics.json) .
* [Xray Metrics and Log Analytics Dashboard](https://github.com/jfrog/log-analytics-prometheus/blob/master/grafana/XrayLogAnalyticsAndSystemMetrics.json) .

##### For Non-Kubernetes:

1. Download the Artifactory Exporter <Anchor label="Dashboard JSON" target="_blank" href="https://github.com/peimanja/artifactory_exporter/blob/master/grafana/dashboard.json">Dashboard JSON</Anchor>.
2. Open Grafana and navigate to Dashboards > Import.
3. Upload the JSON file or paste the JSON content.
4. Select your Prometheus data source when prompted.

#### Assess the Prometheus with Grafana Setup

Use kubectl port forwards as mentioned in two terminal windows.

```
kubectl port-forward service/prometheus-operated 9090:9090 -n jfrog-plg
kubectl port-forward service/prometheus-grafana 3000:80 -n jfrog-plg
```

1. Go to the web UI of the Prometheus instance (for example, <http://localhost:9090>)  and verify "Status -> Service Discovery", the list shows the new ServiceMonitor for Artifactory or Xray or Both.

   <Image alt="180127117.jpeg" border={false} src="https://files.readme.io/3ae038845083d353c8533c15aa3e9a2658a6183994e6c51181497d576b238cb4-uuid-5d7d1c81-2eeb-8ebe-4441-8ad2353efadd.png" />
2. Go to Grafana "<http://localhost:3000>" to add your Prometheus instance and Loki Instance as a datasource.

   While specifying datasource url for Loki and Prometheus,please test and confirm that the connection is successful.

   For Loki, specify url value as <http://loki:3100>.

   For Prometheus specify url value as '<http://prometheus-kube-prometheus-prometheus.jfrog-plg:9090/>'.

   You can get the url content from the command `kubectl get svc -n jfrog-plg`

   ```
   Default credentials (UNAME / PASSWD) for Prometheus grafana is ->  "admin" / "prom-operator"
   ```

   <Image alt="180127118.jpeg" border={false} src="https://files.readme.io/461d4fb36a99a2ccdc324150aa083211528313536d92fb9aa0284e8abc343406-uuid-0c7479b8-359f-b42d-ad81-8419b7e93299.png" />

   <Image alt="180127119.jpeg" border={false} src="https://files.readme.io/084b4364eebc4d85c36b5afb0926c230967a4d806c6c8a4f589569580aef3721-uuid-d54f8d76-ea7f-daab-aa66-711c01d92b7e.png" />
3. Finally in the Grafana, import the Dashboards and select the appropriate sources.

   <Image alt="180127120.jpeg" border={false} src="https://files.readme.io/98e55223ff9f691a0e88918bb9bbcce4478f497a6a06ef54a8d4b9d989bc1b98-uuid-087c44f3-9db2-26a5-44f3-b4da07f11114.png" />

   <Image alt="180127121.jpeg" border={false} src="https://files.readme.io/62a13f2d2c7e10ee3a14a3770f0bfcfae9e36a16407727e4a8d7585fb32ed77a-uuid-d1249091-fd7c-958c-9da1-225b15a50916.png" />

   <Image alt="180127122.jpeg" border={false} src="https://files.readme.io/d59c38ae04b6c2f4803ab1d8266543f5be37f42aeb9419525a4bd3a1417c8111-uuid-0cc4e87f-8984-1290-b317-26ae489bd439.png" />

<br />