---
title: "Get Metrics"
method: GET
path: "/metrics"
tags: ["metrics"]
---

# Get Metrics

`GET /metrics`

This endpoint is used by Prometheus to scrape such metrics from the application:
- alerts_total {incident_name, incident_id} - The total number of alerts per incident.
- open_incidents_total - The total number of open incidents.
- workflows_executions_total {status} - The total number of workflow executions.

Please note that those metrics are per-tenant and are not designed to be used for the monitoring of the application itself.

Example prometheus configuration:
```
scrape_configs:
- job_name: "scrape_keep"
  scrape_interval: 5m  # It's important to scrape not too often to avoid rate limiting.
  static_configs:
  - targets: ["https://api.keephq.dev"]  # Or your own domain.
  authorization:
    type: Bearer
    credentials: "{Your API Key}"

  # Optional, you can add labels to exported incidents. 
  # Label values will be equal to the last incident's alert payload value matching the label.
  # Attention! Don't add "flaky" labels which could change from alert to alert within the same incident.
  # Good labels: ['labels.department', 'labels.team'], bad labels: ['labels.severity', 'labels.pod_id']
  # Check Keep -> Feed -> "extraPayload" column, it will help in writing labels.

  params:
    labels: ['labels.service', 'labels.queue']
  # Will resuld as: "labels_service" and "labels_queue".
```

## Query parameters

- `labels` string[]

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/keephq/apis/keep-api.md) · [All operations](https://skmtc.net/keephq/apis/keep-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/keephq/keep-api/revisions/bb4a0896091f/schema)
