> ## Documentation Index
> Fetch the complete documentation index at: https://upstash-context7-agent-09df3c1c-9c05-4093-9d6e-e4e2644ee98c.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Prometheus - Upstash QStash Integration

To monitor your QStash metrics in Prometheus and visualize in Grafana, follow these steps:

<Check>
  **Integration Scope**

  Upstash Prometheus Integration covers Prod Pack.
</Check>

## **Step 1: Enable Prometheus in Upstash Console**

1. Open the Upstash Console and navigate to QStash.
2. Go to Settings → Monitoring.
3. Enable Prometheus to allow scraping QStash metrics.

<img src="https://mintcdn.com/upstash-context7-agent-09df3c1c-9c05-4093-9d6e-e4e2644ee98c/ZDiv7UWtCm9RRR6n/img/prometheus/configuration-qstash.png?fit=max&auto=format&n=ZDiv7UWtCm9RRR6n&q=85&s=7b67fc74cd0cd62417c98c6ed4857ee6" alt="configuration.png" width="1956" height="680" data-path="img/prometheus/configuration-qstash.png" />

## **Step 2: Copy Monitoring Token**

1. After enabling, a monitoring token is generated and displayed.
2. Copy the token. It will be used to authenticate Prometheus requests.

<Check>
  **Header Format**

  Send the token as `Authorization: Bearer <MONITORING_TOKEN>`.
</Check>

<img src="https://mintcdn.com/upstash-context7-agent-09df3c1c-9c05-4093-9d6e-e4e2644ee98c/ZDiv7UWtCm9RRR6n/img/prometheus/monitoring-token.png?fit=max&auto=format&n=ZDiv7UWtCm9RRR6n&q=85&s=c77b8489ffc2ae637d5bbf25e072ee9b" alt="monitoring-token.png" width="950" height="520" data-path="img/prometheus/monitoring-token.png" />

## **Step 3: Configure Prometheus (via Grafana Data Source)**

1. In Grafana, add a Prometheus data source.
2. Set the address to `https://api.upstash.com/monitoring/prometheus`.
3. In HTTP headers, add the monitoring token.

<img src="https://mintcdn.com/upstash-context7-agent-09df3c1c-9c05-4093-9d6e-e4e2644ee98c/ZDiv7UWtCm9RRR6n/img/prometheus/datasource.png?fit=max&auto=format&n=ZDiv7UWtCm9RRR6n&q=85&s=188b1ff8593777635603e72b0f6d6d98" alt="datasource.png" width="1848" height="464" data-path="img/prometheus/datasource.png" />

<img src="https://mintcdn.com/upstash-context7-agent-09df3c1c-9c05-4093-9d6e-e4e2644ee98c/ZDiv7UWtCm9RRR6n/img/prometheus/headers.png?fit=max&auto=format&n=ZDiv7UWtCm9RRR6n&q=85&s=50fe82bca10f47396c9f4da0debccc6e" alt="headers.png" width="1322" height="346" data-path="img/prometheus/headers.png" />

Click <b>Test and Save</b>.

<img src="https://mintcdn.com/upstash-context7-agent-09df3c1c-9c05-4093-9d6e-e4e2644ee98c/ZDiv7UWtCm9RRR6n/img/prometheus/datasource-final.png?fit=max&auto=format&n=ZDiv7UWtCm9RRR6n&q=85&s=c836a13bf35addcae655c9b241473b14" alt="datasource-final.png" width="1560" height="412" data-path="img/prometheus/datasource-final.png" />

## **Step 4: Import Dashboard**

You can use the Upstash Grafana dashboard to visualize QStash metrics.

Open the import dialog and use: <a href="https://grafana.com/grafana/dashboards/24206-upstash-qstash-dashboard/">Upstash QStash Dashboard</a>

<img src="https://mintcdn.com/upstash-context7-agent-09df3c1c-9c05-4093-9d6e-e4e2644ee98c/ZDiv7UWtCm9RRR6n/img/prometheus/grafana-qstash-dashboard.png?fit=max&auto=format&n=ZDiv7UWtCm9RRR6n&q=85&s=c6d88739c2dd9b9f603db57a28947139" alt="grafana-dashboard.png" width="2978" height="1250" data-path="img/prometheus/grafana-qstash-dashboard.png" />

## **Conclusion**

You’ve integrated QStash with Prometheus. Use Grafana to explore message throughput, retries, DLQ, schedules, and Upstash Workflows.

If you encounter issues, contact support.
