For AI agents and assistants: visit https://docs.pagerduty.com/llms.txt for the index.
AI & Automation
Prometheus Self-Hosted
Connect a Prometheus instance inside your network through the PD Automation Runner and run PromQL queries from Incident Workflows.
Early Access
This feature is currently in Early Access (EA). Click here to sign up for the Early Access program. This feature is only available for PD Reliability Platform accounts.
Use the Prometheus Self-hosted connection for a Prometheus instance inside your network. PagerDuty sends requests through a PD Automation Runner running in your environment, so responders can query Prometheus from an Incident Workflow without exposing it to the internet.
Requirements
- A PD Automation Runner connection whose runner can reach your Prometheus instance. To set one up, see PD Automation Runner. The runner can use any deployment method, and a single runner can serve Kubernetes, Prometheus, and Grafana connections.
Add a Prometheus Self-Hosted Connection
- In PagerDuty, navigate to Integrations Automation Connectors.
- Select Prometheus Self-hosted and click Add Connector.
- Enter the following fields:
| Field | Description |
|---|---|
| Connection Name | The name of the new connection. |
| Runner Connection | The PD Automation Runner connection that can reach this Prometheus instance. |
| Prometheus URL | The base URL of your Prometheus instance as reachable from the runner, for example http://prometheus.monitoring.svc.cluster.local:9090. Do not include /api. |
| Authentication | The authentication the runner uses: None, Basic, or Bearer. Defaults to None. Prometheus has no built-in authentication, so choose Basic or Bearer only if a reverse proxy or similar service sits in front of it. |
| Username | The username for Basic authentication. Ignored for None and Bearer. |
| Password | The Basic authentication password, or the Bearer token. Ignored for None. |
- Click Save.
How PagerDuty Validates the Connection
When you save the connection, the runner calls GET {Prometheus URL}/api/v1/status/buildinfo with the configured authentication. PagerDuty creates the connection only if Prometheus responds successfully. Editing the runner, URL, or authentication runs the same check. Editing only the name does not.
Troubleshoot the Connection
| Error | What to Check |
|---|---|
Runner failed to reach Prometheus: … | The runner cannot reach the URL. Check the host, port, and the runner's network access. |
Prometheus returned a non-JSON response… | The URL responded, but it is not the Prometheus API. For example, it is a login page, another service, or a URL that already includes /api. |
Prometheus rejected the request as "Unauthorized"… | A proxy in front of Prometheus rejected the credentials. Check Authentication, Username, and Password. |
Prometheus rejected the connection check: … | Prometheus returned an error. The message includes the reason from Prometheus. |
Prometheus Workflow Actions
These actions require a Prometheus Self-hosted connection routed through a PD Automation Runner.
To add an action to a workflow:
- If you have not done so, create an Incident Workflow.
- When the instructions prompt you to add actions, select the action.
- Enter the inputs and click Save.
- Publish the workflow.
When the action runs, it returns the outputs listed for that action.
Field References
Fields with the icon accept Field References, which reference incident data or outputs from prior workflow steps. To add a Field Reference, click or enter {{, then select the field.
Instant Query
Evaluates a PromQL expression at a single point in time. The query runs on your runner inside your network, so responders can check the current state of a service, such as whether its targets are up or its current error rate, without leaving the workflow.
| Input | Description |
|---|---|
| Connection Input | The Prometheus Self-hosted connection to use. |
| Query | The PromQL expression to evaluate. For example: up, rate(http_requests_total[5m]), or sum by (pod) (container_memory_usage_bytes). |
| Time (Optional) | The evaluation timestamp, as RFC3339 (for example, 2026-10-06T14:00:00Z) or Unix seconds. If left blank, Prometheus evaluates the query at its current server time. |
| Include Query Statistics (Optional) | Also returns Prometheus timing and sample statistics. Defaults to off. |
| Output | Description |
|---|---|
| Results | An array of series, each with its labels and an array of {timestamp, value, valueRaw} data points. |
| Result Type | The Prometheus result type: vector, scalar, string, or matrix. |
| Series Count | The number of series returned. |
| Statistics | Prometheus timing and sample statistics. Empty unless Include Query Statistics is enabled. |
| Result | Whether the action succeeded: Success or Failed. |
| Result Summary | A brief description of what the action did, or why it failed. |
| Error | A brief description, populated if the action failed. |
Keep Queries Focused
Use label matchers and aggregation, for example sum by (pod) (...) or {job="api"}, to return only the series responders need. Broad queries can return a large number of series and make the output harder to act on.
Range Query
Evaluates a PromQL expression over a time range. The query runs on your runner inside your network, so responders can see how a metric changed leading up to an incident, such as error rate or latency over the last hour, without leaving the workflow.
| Input | Description |
|---|---|
| Connection Input | The Prometheus Self-hosted connection to use. |
| Query | The PromQL expression to evaluate. For example: up, rate(http_requests_total[5m]), or sum by (pod) (container_memory_usage_bytes). |
| Start | The start of the time range, as RFC3339 (for example, 2026-10-06T13:00:00Z) or Unix seconds. |
| End | The end of the time range, as RFC3339 or Unix seconds. Must not be before Start. |
| Step (Optional) | The resolution between data points, for example 15s, 1m, or 5m. Defaults to 1m. |
| Include Query Statistics (Optional) | Also returns Prometheus timing and sample statistics. Defaults to off. |
| Output | Description |
|---|---|
| Results | An array of series, each with its labels and an array of {timestamp, value, valueRaw} data points. |
| Result Type | The Prometheus result type. matrix for a successful range query. |
| Series Count | The number of series returned. |
| Total Data Points | The total number of data points across all series. |
| Statistics | Prometheus timing and sample statistics. Empty unless Include Query Statistics is enabled. |
| Result | Whether the action succeeded: Success or Failed. |
| Result Summary | A brief description of what the action did, or why it failed. |
| Error | A brief description, populated if the action failed. |
Choose a Step
Prometheus rejects a range query that returns more than 11,000 data points per series. For long ranges, use a larger Step. For example, a 24-hour range needs a step of at least 8s, and 1m or 5m is usually enough for incident triage.