Scrapes data about resolved incidents using the PagerDuty API and sends them to New Relic Insights. Runs on Azure Functions.
- Create/gather the API keys listed below.
- Click the button above.
- Pick a name and location for your function app.
PAGERDUTY_API_KEY
: Your PagerDuty API key (v2).INSIGHTS_INSERT_KEY
: Your New Relic Insights insert key.INSIGHTS_ACCOUNT
: The numeric ID of your New Relic account.
Here are some sample NRQL queries you can run or use to build dashboards:
SELECT count(*) FROM PagerDutyIncident facet firstAssignedToName since 1 week ago timeseries auto
SELECT count (*) as 'Alerts received' from PagerDutyIncident since 1 week ago facet firstAssignedToName
SELECT histogram(createdHour - 6, 24, 24) from PagerDutyIncident SINCE 1 week ago
This could indicate false or non-actionable alerts.
SELECT count(*) as 'Incidents' from PagerDutyIncident where acknowledgedBy is null and resolvedByType NOT LIKE '%user%' since 1 week ago
SELECT count(*) as 'Escalations' from PagerDutyIncident where escalations > 0 since 1 week ago
This project was inspired by a similar script authored by the New Relic team. Check it out for more NRQL queries and ideas.