# 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.

![configuration.png](/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>

![monitoring-token.png](/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.

![datasource.png](/img/prometheus/datasource.png)

![headers.png](/img/prometheus/headers.png)

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

![datasource-final.png](/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>

![grafana-dashboard.png](/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.
