turbot/pagerduty
steampipe plugin install pagerduty

Table: pagerduty_escalation_policy - Query PagerDuty Escalation Policies using SQL

PagerDuty Escalation Policies are a crucial component of the PagerDuty incident management platform. They define the sequence in which alerts are sent to different individuals or teams until the incident is acknowledged or resolved. These policies play a vital role in ensuring timely response to incidents and maintaining service reliability.

Table Usage Guide

The pagerduty_escalation_policy table provides insights into Escalation Policies within PagerDuty's incident management platform. As an incident manager or DevOps engineer, explore policy-specific details through this table, including the associated teams, services, and escalation rules. Utilize it to gain a comprehensive understanding of your incident response workflow, and to ensure an effective and timely response to incidents.

Important Notes

  • If no created_at key qual is specified, incidents from the last 30 days will be returned by default.

Examples

Basic info

Explore the fundamental details of PagerDuty's escalation policies to understand their structure and access points. This can be useful in quickly assessing the policies and identifying the specific ones for review or modification.

select
name,
id,
self,
html_url
from
pagerduty_escalation_policy;
select
name,
id,
self,
html_url
from
pagerduty_escalation_policy;

List default escalation policy

Explore the default escalation policy within your system. This allows you to understand and manage the standard procedures in place for escalating issues.

select
name,
id,
self,
html_url
from
pagerduty_escalation_policy
where
name = 'Default';
select
name,
id,
self,
html_url
from
pagerduty_escalation_policy
where
name = 'Default';

List unused escalation policies

Discover the escalation policies that are not currently linked to any services or teams, which could help optimize resource allocation and streamline incident management processes.

select
name,
id,
self,
html_url
from
pagerduty_escalation_policy
where
jsonb_array_length(services) < 1
and jsonb_array_length(teams) < 1;
select
name,
id,
self,
html_url
from
pagerduty_escalation_policy
where
json_array_length(services) < 1
and json_array_length(teams) < 1;

List policies that do not repeat if incidents are not acknowledged

Explore which escalation policies are set to not repeat if incidents are not acknowledged. This can be useful to identify potential gaps in incident management where critical alerts may be missed.

select
name,
id,
self,
html_url
from
pagerduty_escalation_policy
where
num_loops = 0;
select
name,
id,
self,
html_url
from
pagerduty_escalation_policy
where
num_loops = 0;

Schema for pagerduty_escalation_policy

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
descriptiontextA shortened description of escalation policy.
escalation_rulesjsonbA list of escalation rules.
html_urltextAn URL at which the entity is uniquely displayed in the Web app.
idtext=An unique identifier of an escalation policy.
nametext=The name of the escalation policy.
num_loopsbigintThe number of times the escalation policy will repeat after reaching the end of its escalation.
selftextThe API show URL at which the object is accessible.
servicesjsonbA list of services associated with the policy.
summarytextA short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to name, though it is not intended to be an identifier.
tagsjsonbA list of tags applied on escalation policy.
teamsjsonbA list of teams associated with the policy.
titletextTitle of the resource.
typetextThe type of object being created.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- pagerduty

You can pass the configuration to the command with the --config argument:

steampipe_export_pagerduty --config '<your_config>' pagerduty_escalation_policy