> For the complete documentation index, see [llms.txt](https://docs.pagerly.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pagerly.io/sre-ai-agent/data-sources/prometheus.md).

# Prometheus

## What the Agent Can Do

* Query metrics using PromQL — instant and range queries
* List firing alerts and their severity
* Discover available metrics and labels

## Setup Instructions

1. Get your **Prometheus server URL**
2. If authentication is required, include credentials in the URL or provide a bearer token
3. Paste your Prometheus URL in the Pagerly dashboard

## Required Credentials

| Field                         | Description                     | Example                          |
| ----------------------------- | ------------------------------- | -------------------------------- |
| **Prometheus URL**            | Your Prometheus server URL      | `https://prometheus.example.com` |
| **Bearer Token** *(optional)* | Bearer token for authentication | —                                |

## Context Prompt Tips

> *"Key metrics: http\_requests\_total, container\_cpu\_usage\_seconds\_total. Use namespace label for filtering. Alerts are in prometheus-alerts."*

## Docs

* [Prometheus Querying API](https://prometheus.io/docs/prometheus/latest/querying/api/)
