incident_metrics
Creates, updates, deletes, gets or lists an incident_metrics resource.
Overview
| Name | incident_metrics |
| Type | Resource |
| Id | pagerduty.analytics.incident_metrics |
Fields
The following fields are returned by SELECT queries:
- list
| Name | Datatype | Description |
|---|---|---|
service_id | string | ID of the service. Only included when aggregating by service. Not included when aggregating by all. |
team_id | string | ID of the team to which the incident was assigned. Not included when aggregating by all. |
service_name | string | Name of the service. Only included when aggregating by service. Not included when aggregating by all. |
team_name | string | Name of the team to which the incident was assigned. Not included when aggregating by all. |
mean_assignment_count | integer | Mean count of instances where responders were assigned an incident (including through reassignment or escalation) or accepted a responder request. |
mean_engaged_seconds | integer | Mean engaged time across all responders. Engaged time is measured from the time a user engages with an incident (by acknowledging or accepting a responder request) until the incident is resolved. This may include periods in which the incidents were snoozed. |
mean_engaged_user_count | integer | Mean number of users who engaged with an incident. Engaged is defined as acknowledging an incident or accepting a responder request in it. |
mean_seconds_to_engage | integer | A measure of people response time. This metric measures the time from the first user engagement (acknowledge or responder accept) to the last. This metric is only used for incidents with multiple responders; for incidents with one or no engaged users, this value is null. |
mean_seconds_to_first_ack | integer | Mean time between the start of an incident, and the first responder to acknowledge. |
mean_seconds_to_mobilize | integer | Mean time between the start of an incident, and the last additional responder to acknowledge. For incidents with one or no engaged users, this value is null. |
mean_seconds_to_resolve | integer | Mean time from when an incident was triggered until it was resolved. |
mean_user_defined_engaged_seconds | integer | Mean engaged time across all responders. Engaged time is measured from the time a user engages with an incident (by acknowledging or accepting a responder request) until the incident is resolved. This may include periods in which the incidents were snoozed. This metric uses the incident response effort values that [users have defined](https://support.pagerduty.com/docs/edit-incidents#edit-incident-duration), if they exist. |
p50_seconds_to_first_ack | integer | Median time between the start of an incident, and the first responder to acknowledge. |
p50_seconds_to_resolve | integer | Median time from when an incident was triggered until it was resolved. |
p75_seconds_to_first_ack | integer | 75th percentile for the time between the start of an incident, and the first responder to acknowledge. |
p75_seconds_to_resolve | integer | 75th percentile for the time when an incident was triggered until it was resolved. |
p90_seconds_to_first_ack | integer | 90th percentile for the time between the start of an incident, and the first responder to acknowledge. |
p90_seconds_to_resolve | integer | 90th percentile for the time when an incident was triggered until it was resolved. |
p95_seconds_to_first_ack | integer | 95th percentile for the time between the start of an incident, and the first responder to acknowledge. |
p95_seconds_to_resolve | integer | 95th percentile for the time when an incident was triggered until it was resolved. |
range_start | string | Start of the date range for which the metrics were calculated. Only included when an aggregate unit is specified in the request. |
total_business_hour_interruptions | integer | Total number of unique interruptions during business hours; 8am-6pm Mon-Fri, based on the user’s time zone. |
total_engaged_seconds | integer | Total engaged time across all responders. Engaged time is measured from the time a user engages with an incident (by acknowledging or accepting a responder request) until the incident is resolved. This may include periods in which the incidents were snoozed. |
total_escalation_count | integer | Total count of instances where an incident is escalated between responders assigned to an escalation policy. |
total_incident_count | integer | The total number of incidents that were created. |
total_incidents_acknowledged | integer | The total count of assigned incidents acknowledged. Only explicit incident acknowledgment counts; reassign, resolve, and escalation actions do not imply acknowledgement. |
total_incidents_auto_resolved | | The total count of incidents that were resolved automatically. This count includes incidents resolved via an integration and those that were [auto-resolved in PagerDuty](https://support.pagerduty.com/docs/configurable-service-settings#auto-resolution). |
total_incidents_manual_escalated | integer | The total count of incidents that were manually escalated. |
total_incidents_reassigned | integer | The total count of incidents that were reassigned. |
total_incidents_timeout_escalated | integer | The total count of incidents that were escalated due to timeouts. |
total_interruptions | integer | Total number of unique interruptions. |
total_notifications | integer | The total count of incident notifications sent via email, SMS, phone call and push. |
total_off_hour_interruptions | integer | Total number of unique interruptions during off hours; 6pm-10pm Mon-Fri and all day Sat-Sun, based on the user’s time zone. |
total_sleep_hour_interruptions | integer | Total number of unique interruptions during sleep hours. Sleep hours: 10pm-8am every day, based on the user’s time zone. |
total_snoozed_seconds | integer | Total number of seconds incidents were snoozed. |
total_user_defined_engaged_seconds | integer | Total engaged time across all responders. Engaged time is measured from the time a user engages with an incident (by acknowledging or accepting a responder request) until the incident is resolved. This may include periods in which the incidents were snoozed. This metric uses the edited incident response effort values that [users have defined](https://support.pagerduty.com/docs/edit-incidents#edit-incident-duration), if they exist. |
up_time_pct | number | The percentage of time in the defined date range that the service was not interrupted by a [major incident](https://support.pagerduty.com/docs/operational-reviews#major-incidents). Only included when aggregating by team, escalation policy, service, or all services. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | Provides aggregated enriched metrics for incidents.<br /><br />The provided metrics are aggregated by day, week, month using the aggregate_unit parameter, or for the entire period if no aggregate_unit is provided.<br /><br /><!-- theme: info --><br />> A team_ids or service_ids filter is required for [user-level API keys](https://support.pagerduty.com/docs/using-the-api#section-generating-a-personal-rest-api-key) or keys generated through an OAuth flow. Account-level API keys do not have this requirement.<br /><!-- theme: info --><br />> Note: Data availability reflects [pipeline processing cycles](https://support.pagerduty.com/main/docs/insights#:~:text=Data%20Update%20Schedule) and is generally within 24 hours under normal conditions.<br /><br />Scoped OAuth requires: analytics.write<br /> |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|
SELECT examples
- list
Provides aggregated enriched metrics for incidents.<br /><br />The provided metrics are aggregated by day, week, month using the aggregate_unit parameter, or for the entire period if no aggregate_unit is provided.<br /><br /><!-- theme: info --><br />> A team_ids or service_ids filter is required for [user-level API keys](https://support.pagerduty.com/docs/using-the-api#section-generating-a-personal-rest-api-key) or keys generated through an OAuth flow. Account-level API keys do not have this requirement.<br /><!-- theme: info --><br />> Note: Data availability reflects [pipeline processing cycles](https://support.pagerduty.com/main/docs/insights#:~:text=Data%20Update%20Schedule) and is generally within 24 hours under normal conditions.<br /><br />Scoped OAuth requires: analytics.write<br />
SELECT
service_id,
team_id,
service_name,
team_name,
mean_assignment_count,
mean_engaged_seconds,
mean_engaged_user_count,
mean_seconds_to_engage,
mean_seconds_to_first_ack,
mean_seconds_to_mobilize,
mean_seconds_to_resolve,
mean_user_defined_engaged_seconds,
p50_seconds_to_first_ack,
p50_seconds_to_resolve,
p75_seconds_to_first_ack,
p75_seconds_to_resolve,
p90_seconds_to_first_ack,
p90_seconds_to_resolve,
p95_seconds_to_first_ack,
p95_seconds_to_resolve,
range_start,
total_business_hour_interruptions,
total_engaged_seconds,
total_escalation_count,
total_incident_count,
total_incidents_acknowledged,
total_incidents_auto_resolved,
total_incidents_manual_escalated,
total_incidents_reassigned,
total_incidents_timeout_escalated,
total_interruptions,
total_notifications,
total_off_hour_interruptions,
total_sleep_hour_interruptions,
total_snoozed_seconds,
total_user_defined_engaged_seconds,
up_time_pct
FROM pagerduty.analytics.incident_metrics
;