---
title: "Integrations: Prometheus"
description: "Scrape RavenDB server metrics with Prometheus using built-in endpoints, with configuration examples and available metric names."
url: "https://docs.ravendb.net/7.2/monitoring/integrations/prometheus"
version: "7.2"
---

# Integrations: Prometheus

> RavenDB publishes an official agent skill for coding assistants at https://docs.ravendb.net/skills/ravendb/SKILL.md (also installable with `npx skills add ravendb/skills`). The skill describes itself as: "Read this before writing any RavenDB query, client call or /databases/ request. Covers server setup, document modelling, the Node.js, .NET and Python clients, RQL, indexes, vector search and AI agents. Code written from recall tends to run and return the wrong rows, because RQL resembles SQL and the clients take field names as plain strings."

## Integrations: Prometheus

> **Note**
>
> - [Prometheus](https://prometheus.io) is an open-source monitoring system.  
>   A Prometheus server scrapes numeric metrics from HTTP endpoints that services expose,
>   stores the values over time, and can graph them and raise alerts when a value crosses
>   a threshold you have set.
>
> - RavenDB exposes data metrics via an HTTP endpoint in a Prometheus-compatible format,
>   allowing a Prometheus server to scrape the data from the endpoint and handle it.
>
> - A Prometheus endpoint is provided by RavenDB instances both on-premise and on the cloud.
>
> - To read metrics as JSON rather than in the Prometheus format, use the
>   [JSON monitoring endpoints](https://docs.ravendb.net/7.2/monitoring/json-monitoring-endpoints.md).
>
> - In this article:
>   - [RavenDB Prometheus Endpoint](#ravendb-prometheus-endpoint)
>     - [Omit or Include Selected Metrics](#omit-or-include-selected-metrics)
>     - [Metrics Provided by the Prometheus Endpoint](#metrics-provided-by-the-prometheus-endpoint)
>   - [Using the RavenDB Endpoint by a Prometheus Server](#using-the-ravendb-endpoint-by-a-prometheus-server)
>     - [Configuring and running Prometheus](#configuring-and-running-prometheus)
>     - [Browsing the metrics in Prometheus](#browsing-the-metrics-in-prometheus)
>     - [Reading the endpoint output directly](#reading-the-endpoint-output-directly)
>   - [Fetching Additional RavenDB Information](#fetching-additional-ravendb-information)

## RavenDB Prometheus Endpoint {#ravendb-prometheus-endpoint}

The path to the Prometheus endpoint of a RavenDB instance is: `/admin/monitoring/v1/prometheus`  
To inspect the endpoint's output using a browser, add the endpoint path to the RavenDB server's URL.  
e.g., <http://live-test.ravendb.net/admin/monitoring/v1/prometheus>

![RavenDB: Prometheus Endpoint Output](https://docs.ravendb.net/assets/images/ravendb_prometheus-endpoint-output-b0ae87ab5ff3ca3b6c8858d69193e22f.png)

- As Prometheus handles only numeric values, the endpoint outputs all values as numbers,
  providing legends that explain what the numbers mean.  
  Metrics values are also explained in the [table below](#metrics-provided-by-the-prometheus-endpoint).

On a secure server, a request to the endpoint must present a client certificate with
[Operator](https://docs.ravendb.net/7.2/server/security/authorization/security-clearance-and-permissions.md#operator)
clearance or higher.  
On an unsecure server, no certificate is needed.

If the server's [license](https://ravendb.net/buy) does not include the Monitoring Endpoints
feature, requests to the endpoint fail with HTTP status `402 Payment Required`.

## Omit or Include Selected Metrics {#omit-or-include-selected-metrics}

Each `skip*` flag omits one metric group from the response when set to `true`; the
`includeGcMetrics` flag adds the GC metrics, the one group that is excluded by default.  
All flags default to `false`.

| Flag | Metric group |
| - | - |
| `skipServerMetrics` | Server metrics |
| `skipDatabasesMetrics` | Database metrics |
| `skipIndexesMetrics` | Index metrics |
| `skipCollectionsMetrics` | Collection metrics |
| `skipEtlsMetrics` | ETL task metrics |
| `skipAiTasksMetrics` | AI task metrics |
| `skipCdcSinksMetrics` | CDC Sink task metrics |
| `includeGcMetrics` | GC metrics (excluded by default) |

e.g., to omit the index metrics:  
`http://localhost:8080/admin/monitoring/v1/prometheus?skipIndexesMetrics=true`

To omit both the index and the server metrics:  
`http://localhost:8080/admin/monitoring/v1/prometheus?skipIndexesMetrics=true&skipServerMetrics=true`

## Metrics Provided by the Prometheus Endpoint {#metrics-provided-by-the-prometheus-endpoint}

The following table lists the metrics that the `/admin/monitoring/v1/prometheus` endpoint provides.  
In the endpoint's output, each name carries the `ravendb_` prefix.  
e.g., the `server_uptime_seconds` metric is exposed as `ravendb_server_uptime_seconds`.

The GC metrics appear only when the request sets the `includeGcMetrics`
[flag](#omit-or-include-selected-metrics), and each carries
a `gckind` label naming the kind of the garbage collection it describes.

| Metrics | Description |
| - | - |
| ai\_task\_documents\_processed\_per\_second | Documents processed per second by the AI task (one minute rate) |
| ai\_task\_errors\_count | Number of errors recorded for the AI task |
| ai\_task\_health\_status | AI task health status + `0`/`1`/`2` <br /> 0 => Healthy <br /> 1 => Impaired <br /> 2 => Failed |
| ai\_task\_last\_successful\_batch\_time\_in\_seconds | Time since the AI task's last successful batch, in seconds |
| archived\_data\_processing\_behavior | Archived data processing behavior + `0`/`1`/`2` <br /> 0 => ExcludeArchived <br /> 1 => IncludeArchived <br /> 2 => ArchivedOnly |
| available\_memory\_for\_processing\_bytes | Available memory for processing |
| backup\_current\_number\_of\_running\_backups | Number of currently running backups |
| backup\_max\_number\_of\_concurrent\_backups | Maximum number of concurrent backups |
| cdc\_sink\_errors\_count | Number of errors recorded for the CDC Sink task |
| cdc\_sink\_health\_status | CDC Sink task health status + `0`/`1`/`2` <br /> 0 => Healthy <br /> 1 => Impaired <br /> 2 => Failed |
| cdc\_sink\_last\_successful\_batch\_time\_in\_seconds | Time since the CDC Sink task's last successful batch, in seconds |
| certificate\_server\_certificate\_expiration\_left\_seconds | Server certificate expiration left in seconds |
| cluster\_current\_term | Cluster term |
| cluster\_index | Cluster index |
| cluster\_node\_state | Current node state + `0`/`1`/`2` <br /> 0 => Passive <br /> 1 => Candidate <br /> 2 => Follower <br /> 3 => LeaderElect <br /> 4 => Leader |
| collection\_documents\_count | Number of documents in collection |
| collection\_documents\_size\_bytes | Size of documents |
| collection\_revisions\_size\_bytes | Size of revisions |
| collection\_tombstones\_size\_bytes | Size of tombstones |
| collection\_total\_size\_bytes | Total size of collection |
| cpu\_assigned\_processor\_count | Number of assigned processors on the machine |
| cpu\_machine\_io\_wait | IO wait in % |
| cpu\_machine\_usage | Machine CPU usage in % |
| cpu\_process\_usage | Process CPU usage in % |
| cpu\_processor\_count | Number of processors on the machine |
| cpu\_thread\_pool\_available\_completion\_port\_threads | Number of available completion port threads in the thread pool |
| cpu\_thread\_pool\_available\_worker\_threads | Number of available worker threads in the thread pool |
| database\_ai\_tasks\_count | Number of AI tasks in the database |
| database\_ai\_tasks\_errors\_count | Total number of AI task errors in the database |
| database\_ai\_tasks\_failed\_count | Number of AI tasks with `Failed` health status in the database |
| database\_ai\_tasks\_healthy\_count | Number of AI tasks with `Healthy` health status in the database |
| database\_ai\_tasks\_impaired\_count | Number of AI tasks with `Impaired` health status in the database |
| database\_alerts\_count | Number of alerts |
| database\_attachments\_count | Number of attachments |
| database\_cdc\_sinks\_count | Number of CDC Sink tasks in the database |
| database\_cdc\_sinks\_errors\_count | Total number of CDC Sink errors in the database |
| database\_cdc\_sinks\_failed\_count | Number of CDC Sink tasks with `Failed` health status in the database |
| database\_cdc\_sinks\_healthy\_count | Number of CDC Sink tasks with `Healthy` health status in the database |
| database\_cdc\_sinks\_impaired\_count | Number of CDC Sink tasks with `Impaired` health status in the database |
| database\_documents\_count | Number of documents |
| database\_etls\_count | Number of ETL tasks in the database |
| database\_etls\_errors\_count | Total number of ETL errors in the database |
| database\_etls\_failed\_count | Number of ETL tasks with `Failed` health status in the database |
| database\_etls\_healthy\_count | Number of ETL tasks with `Healthy` health status in the database |
| database\_etls\_impaired\_count | Number of ETL tasks with `Impaired` health status in the database |
| database\_indexes\_auto\_count | Number of auto indexes |
| database\_indexes\_count | Number of indexes |
| database\_indexes\_errored\_count | Number of error indexes |
| database\_indexes\_disabled\_count | Number of disabled indexes |
| database\_indexes\_errors\_count | Number of indexing errors |
| database\_indexes\_idle\_count | Number of idle indexes |
| database\_indexes\_stale\_count | Number of stale indexes |
| database\_indexes\_static\_count | Number of static indexes |
| database\_performance\_hints\_count | Number of performance hints |
| database\_rehabs\_count | Number of rehabs |
| database\_replication\_factor | Database replication factor |
| database\_revisions\_count | Number of revision documents |
| database\_statistics\_doc\_puts\_per\_second | Number of document puts per second (one minute rate) |
| database\_statistics\_map\_index\_indexes\_per\_second | Number of indexed documents per second for map indexes (one minute rate) |
| database\_statistics\_map\_reduce\_index\_mapped\_per\_second | Number of maps per second for map-reduce indexes (one minute rate) |
| database\_statistics\_map\_reduce\_index\_reduced\_per\_second | Number of reduces per second for map-reduce indexes (one minute rate) |
| database\_statistics\_request\_average\_duration\_seconds | Average request time in seconds |
| database\_statistics\_requests\_count | Number of requests from database start |
| database\_statistics\_requests\_per\_second | Number of requests per second (one minute rate) |
| database\_storage\_documents\_allocated\_data\_file\_bytes | Documents storage allocated size |
| database\_storage\_documents\_used\_data\_file\_bytes | Documents storage used size |
| database\_storage\_indexes\_allocated\_data\_file\_bytes | Index storage allocated size |
| database\_storage\_indexes\_used\_data\_file\_bytes | Index storage used size |
| database\_storage\_io\_read\_operations | Disk IO Read operations |
| database\_storage\_io\_write\_operations | Disk IO Write operations |
| database\_storage\_queue\_length | Disk Queue length |
| database\_storage\_read\_throughput\_bytes | Disk Read Throughput |
| database\_storage\_total\_allocated\_storage\_file\_bytes | Total storage size |
| database\_storage\_total\_free\_space\_bytes | Remaining storage disk space |
| database\_storage\_write\_throughput\_bytes | Disk Write Throughput |
| database\_time\_since\_last\_backup\_seconds | Last backup |
| database\_unique\_attachments\_count | Number of unique attachments |
| database\_uptime\_seconds | Database up-time |
| databases\_loaded\_count | Number of loaded databases |
| databases\_total\_count | Number of all databases |
| etl\_documents\_processed\_per\_second | Documents processed per second by the ETL task (one minute rate) |
| etl\_errors\_count | Number of errors recorded for the ETL task |
| etl\_health\_status | ETL task health status + `0`/`1`/`2` <br /> 0 => Healthy <br /> 1 => Impaired <br /> 2 => Failed |
| etl\_last\_successful\_batch\_time\_in\_seconds | Time since the ETL task's last successful batch, in seconds |
| gc\_compacted | Indicates if the last garbage collection was compacting (`1` = yes, `0` = no) |
| gc\_concurrent | Indicates if the last garbage collection was concurrent (`1` = yes, `0` = no) |
| gc\_finalization\_pending\_count | Number of objects pending finalization observed during the last garbage collection |
| gc\_fragmented\_mb | Heap fragmentation in MB after the last garbage collection |
| gc\_generation | Generation collected by the last garbage collection |
| gc\_heap\_size\_mb | Total GC heap size in MB after the last garbage collection |
| gc\_high\_memory\_load\_threshold\_mb | High memory load threshold in MB at the time of the last garbage collection |
| gc\_index | Index of the last garbage collection |
| gc\_memory\_load\_mb | Memory load in MB at the time of the last garbage collection |
| gc\_pause\_durations\_1\_seconds | First GC pause duration in seconds recorded during the last garbage collection |
| gc\_pause\_durations\_2\_seconds | Second GC pause duration in seconds recorded during the last garbage collection |
| gc\_pause\_time\_percentage | Percentage of time spent paused for GC since the previous collection |
| gc\_pinned\_objects\_count | Number of pinned objects observed during the last garbage collection |
| gc\_promoted\_mb | Memory promoted during the last garbage collection in MB |
| gc\_total\_available\_memory\_mb | Total available memory for the GC in MB at the time of the last garbage collection |
| gc\_total\_committed\_mb | Total committed managed heap size in MB after the last garbage collection |
| index\_entries\_count | Number of entries in the index |
| index\_errors | Number of index errors |
| index\_is\_invalid | Indicates if index is invalid |
| index\_lock\_mode | Index lock mode + `0`/`1`/`2` <br /> 0 => Unlock <br /> 1 => LockedIgnore <br /> 2 => LockedError |
| index\_mapped\_per\_second | Number of maps per second (one minute rate) |
| index\_priority | Index priority + `0`/`1`/`2` <br /> 0 => Low <br /> 1 => Normal <br /> 2 => High |
| index\_reduced\_per\_second | Number of reduces per second (one minute rate) |
| index\_state | Index state + `0`/`1`/`2`/`3` <br /> 0 => Normal <br /> 1 => Disabled <br /> 2 => Idle <br /> 3 => Error |
| index\_status | Index status + `0`/`1`/`2`/`3` <br /> 0 => Running  <br /> 1 => Paused <br /> 2 => Disabled <br /> 3 => Pending (for rolling indexes) |
| index\_time\_since\_last\_indexing\_seconds | Time since last indexing |
| index\_time\_since\_last\_query\_seconds | Time since last query |
| index\_type | Index type + `0`/`1`/`2`/`3`/`4`/`5`/`6`/`7` <br /> 0 => None <br /> 1 => AutoMap <br /> 2 => AutoMapReduce <br /> 3 => Map <br /> 4 => MapReduce <br /> 5 => Faulty <br /> 6 => JavaScriptMap <br /> 7 => JavaScriptMapReduce |
| license\_expiration\_left\_seconds | Server license expiration left |
| license\_max\_cores | Server license max CPU cores |
| license\_type | Server license type + `-1`/`0`/`1`/`2`/`3`/`4`/`5`/`6`/`7` <br /> -1 => Invalid <br /> 0 => None <br /> 1 => Community <br /> 2 => Reserved <br /> 3 => Professional <br /> 4 => Enterprise <br /> 5 => Developer <br /> 6 => Essential <br /> 7 => EnterpriseAi |
| license\_utilized\_cpu\_cores | Server license utilized CPU cores |
| managed\_memory\_bytes | Server managed memory size |
| memory\_allocated\_bytes | Server allocated memory |
| memory\_installed\_bytes | Installed memory |
| memory\_low\_memory\_severity | Server low memory flag value + `0`/`1`/`2` <br /> 0 => None <br /> 1 => Low <br /> 2 => ExtremelyLow |
| memory\_physical\_bytes | Physical memory |
| memory\_total\_dirty\_bytes | Dirty memory that is used by the scratch buffers |
| memory\_total\_swap\_size\_bytes | Server total swap size |
| memory\_total\_swap\_usage\_bytes | Server total swap usage |
| memory\_working\_set\_swap\_usage\_bytes | Server working set swap usage |
| network\_concurrent\_requests\_count | Number of concurrent requests |
| network\_last\_authorized\_non\_cluster\_admin\_request\_time\_in\_sec | Server last authorized non cluster admin request time |
| network\_last\_request\_time\_in\_seconds | Server last request time |
| network\_requests\_per\_second | Number of requests per second (one minute rate) |
| network\_tcp\_active\_connections | Number of active TCP connections |
| network\_total\_requests | Total number of requests since server startup |
| server\_ai\_tasks\_count | Total number of AI tasks across all databases |
| server\_ai\_tasks\_errors\_count | Total number of AI task errors across all databases |
| server\_ai\_tasks\_failed\_count | Number of AI tasks with `Failed` health status across all databases |
| server\_ai\_tasks\_healthy\_count | Number of AI tasks with `Healthy` health status across all databases |
| server\_ai\_tasks\_impaired\_count | Number of AI tasks with `Impaired` health status across all databases |
| server\_cdc\_sinks\_count | Total number of CDC Sink tasks across all databases |
| server\_cdc\_sinks\_errors\_count | Total number of CDC Sink errors across all databases |
| server\_cdc\_sinks\_failed\_count | Number of CDC Sink tasks with `Failed` health status across all databases |
| server\_cdc\_sinks\_healthy\_count | Number of CDC Sink tasks with `Healthy` health status across all databases |
| server\_cdc\_sinks\_impaired\_count | Number of CDC Sink tasks with `Impaired` health status across all databases |
| server\_disk\_remaining\_storage\_space\_percentage | Remaining server storage disk space in % |
| server\_disk\_system\_store\_total\_data\_file\_size\_bytes | Server storage total size |
| server\_disk\_system\_store\_used\_data\_file\_size\_bytes | Server storage used size |
| server\_etls\_count | Total number of ETL tasks across all databases |
| server\_etls\_errors\_count | Total number of ETL errors across all databases |
| server\_etls\_failed\_count | Number of ETL tasks with `Failed` health status across all databases |
| server\_etls\_healthy\_count | Number of ETL tasks with `Healthy` health status across all databases |
| server\_etls\_impaired\_count | Number of ETL tasks with `Impaired` health status across all databases |
| server\_info | Server Info |
| server\_process\_id | Server process ID |
| server\_storage\_io\_read\_operations | Disk IO Read operations |
| server\_storage\_io\_write\_operations | Disk IO Write operations |
| server\_storage\_queue\_length | Disk Queue length |
| server\_storage\_read\_throughput\_bytes | Disk Read Throughput |
| server\_storage\_total\_free\_space\_bytes | Remaining storage disk space |
| server\_storage\_write\_throughput\_bytes | Disk Write Throughput |
| server\_uptime\_seconds | Server up-time |
| unmanaged\_memory\_bytes | Server unmanaged memory size |

## Using the RavenDB Endpoint by a Prometheus Server {#using-the-ravendb-endpoint-by-a-prometheus-server}

### Configuring and running Prometheus

To direct a Prometheus server to the Prometheus endpoint of a RavenDB instance, add a
[scrape job](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config)
for the RavenDB server under the `scrape_configs` section of the `prometheus.yml` configuration file.  
The following sample defines two scrape jobs: one for a local unsecure server, and one for
three secure nodes of a cloud cluster.

```yaml
scrape_configs:
  - job_name: "local-raven-instance"
    # Monitor a local, unsecure RavenDB server
    metrics_path: "/admin/monitoring/v1/prometheus"
    static_configs:
      - targets:
          - "localhost:8080"

  - job_name: "cloud-raven-instance"
    # Monitor 3 RavenDB nodes on the cloud
    scheme: https
    tls_config:
      cert_file: "a.client.certificate.crt"
      key_file: "a.client.certificate.key"
    metrics_path: "/admin/monitoring/v1/prometheus"
    static_configs:
      - targets:
          - "a.cloudtest.ravendb.org"
          - "b.cloudtest.ravendb.org"
          - "c.cloudtest.ravendb.org"
```

To load the scrape jobs, run the Prometheus server and point it at your `prometheus.yml` file:  
`./prometheus --config.file=prometheus.yml`

### Browsing the metrics in Prometheus

Once the Prometheus server is running, you can browse and graph the RavenDB metrics it collects.

Typing **raven** in the search bar lists the metrics the RavenDB endpoint provides:

![Prometheus: Select Metrics](https://docs.ravendb.net/assets/images/prometheus_select-metrics-f1f595b4b1e79e8cdcfd0b14121a5c51.png)

Executing a query over a metric plots its values over time in the **Graph** tab.  
e.g., the RavenDB server's CPU usage:

![Prometheus: Metrics Graph](https://docs.ravendb.net/assets/images/prometheus_metrics-graph-d881584a9afe1390114a9d46e57f694c.png)

### Reading the endpoint output directly

You can also read the metrics directly from RavenDB's endpoint output, without Prometheus:
open the endpoint URL in your browser, as described under
[RavenDB Prometheus Endpoint](#ravendb-prometheus-endpoint).  
In the following endpoint output, the priority of one of the indexes was updated to `2` (high):

![RavenDB Endpoint Output: Index Priority](https://docs.ravendb.net/assets/images/RavenDB_changed-index-priority-352cef760664ff8a8e36af371cfea855.png)

Querying the metric's name in Prometheus displays the change graphically:

![Prometheus Server: Index Priority](https://docs.ravendb.net/assets/images/Prometheus_changed-index-priority-e69671087bb3fc999c22a07ab300b7f9.png)

## Fetching Additional RavenDB Information {#fetching-additional-ravendb-information}

To retrieve additional information about RavenDB, including its version and its
HTTP and TCP URLs, query `ravendb_server_info` in Prometheus:

![Additional Information](https://docs.ravendb.net/assets/images/additional-info-13070ffc440495d71433ac18612da7a5.png)
