Troubleshoot PagerDuty data source issues
This document provides solutions to common issues you may encounter when configuring or using the PagerDuty data source. For configuration instructions, refer to Configure the PagerDuty data source.
Authentication errors
These errors occur when your API key is invalid, missing, or doesn’t have the required permissions.
“invalid status received from the server. status code received 401”
Symptoms:
- Save & test fails with
invalid status received from the server. status code received 401 - Queries return authorization errors
Possible causes and solutions:
“invalid status received from the server. status code received 403”
Symptoms:
- Save & test succeeds but certain queries return
403errors - Some filters return no results while others work
Solutions:
- Verify the API key has sufficient permissions. A read-only REST API key has access to all read endpoints.
- If using a personal API key (user token), confirm the user has access to the services, teams, or incidents you’re querying.
- Check whether your PagerDuty account tier supports the API endpoints you’re accessing.
Connection errors
These errors occur when Grafana can’t reach PagerDuty’s API endpoints.
“Connection refused” or timeout errors
Symptoms:
- Data source test times out
- Queries fail with network errors
- Intermittent connection issues
Solutions:
- Verify network connectivity from the Grafana server to
api.pagerduty.com(HTTPS, port 443). - Check that firewall rules allow outbound HTTPS traffic.
- If you’re behind a corporate proxy, configure Grafana’s proxy settings in
grafana.ini. - For Grafana Cloud accessing private resources, configure Private data source connect.
Configuration errors
These errors occur when setting up or provisioning the PagerDuty data source.
Provisioned data source fails to connect
Symptoms:
- A provisioned PagerDuty data source shows errors on startup
- Save & test fails after provisioning
Possible causes and solutions:
The correct provisioning structure is:
datasources:
- name: PagerDuty
type: grafana-pagerduty-datasource
jsonData:
auth:
id: api_key
secureJsonData:
auth.api_key.apiKey: <API_KEY>Query errors
These errors occur when running queries against PagerDuty.
“No data” or empty results
Symptoms:
- Query runs without error but returns no data
- Panels show “No data” message
Possible causes and solutions:
“invalid status code: NNN”
Symptoms:
- Queries fail with
invalid status code:followed by a number (for example,400,404,429, or500)
Possible causes and solutions:
Query timeout
Symptoms:
- Query runs for a long time then fails
- Error mentions timeout
Solutions:
- Narrow the time range to reduce the number of incidents returned.
- Add filters such as Service IDs or Statuses to limit results.
- Use the Select fields drop-down to return only the fields you need, reducing response size.
Can’t find query parameters or filters
Symptoms:
- The query editor shows only the Action drop-down with no filter options
- Parameters like Service IDs, Statuses, or Since aren’t visible
Solutions:
- After selecting List incidents from the Action drop-down, look for the Additional parameters (optional) collapsible section and click it to expand.
- All filter parameters for List incidents are optional and appear in this collapsed section by default.
- For Get an incident, the required Id field appears under the Parameters section, which is always expanded.
Annotation errors
These errors occur when using PagerDuty annotations on dashboards.
Annotations don’t appear on the panel
Symptoms:
- Annotation query runs without error but no markers appear on the time series
- Annotation shows “0 events” after running
Possible causes and solutions:
Annotations show at the wrong time
Symptoms:
- Annotation markers appear but are positioned at unexpected points on the timeline
Solutions:
- Check which timestamp field is being used. By default, the
created_atfield determines annotation placement. If you want annotations at resolution time, selectresolved_atunder Select fields. - Verify that the Grafana dashboard timezone matches your expectations. Navigate to Dashboard settings > General to check the timezone.
Alerting errors
These errors occur when using Grafana alerting with the PagerDuty data source.
Alert rule returns “no data”
Symptoms:
- Alert rule evaluates but shows “No Data” state
- Alert never fires despite active incidents in PagerDuty
Possible causes and solutions:
Template variable errors
These errors occur when using template variables with the PagerDuty data source.
Variables return no values
Solutions:
- Verify the data source connection is working by running Save & test in the data source settings.
- Check that the variable query uses the correct Action (for example, List incidents).
- Ensure at least one field is selected under Select fields. The first two selected fields are used as the variable label and value.
- Expand the dashboard time range if the variable query depends on the Since and Until parameters.
Variables are slow to load
Solutions:
- Set variable refresh to On dashboard load instead of On time range change to reduce the number of API calls.
- Add filters to the variable query to limit the number of incidents returned.
- Select only the fields you need under Select fields.
Enable debug logging
To capture detailed error information for troubleshooting:
Set the Grafana log level to
debugin the configuration file:[log] level = debugRestart Grafana for the change to take effect.
Reproduce the issue and review logs in
/var/log/grafana/grafana.log(or your configured log location).Look for entries related to
grafana-pagerduty-datasourcethat include request and response details.Reset the log level to
infoafter troubleshooting to avoid excessive log volume.
Get additional help
If you’ve tried the solutions in this document and still encounter issues:
- Check the Grafana community forums for similar issues.
- Review the PagerDuty REST API documentation for API-specific guidance.
- Contact Grafana Support if you’re a Grafana Cloud Pro, Cloud Advanced, or Enterprise customer.
- When reporting issues, include:
- Grafana version and PagerDuty plugin version
- Exact error messages (redact your API key)
- Steps to reproduce the issue
- Relevant data source configuration (redact credentials)


