turbot/pagerduty
steampipe plugin install pagerduty

Table: pagerduty_schedule - Query PagerDuty Schedules using SQL

PagerDuty is a digital operations management platform that integrates with ITOps and DevOps tools to improve operational reliability and agility. It provides an incident response and on-call management platform to businesses, enabling them to monitor their applications and infrastructure, and alert the right people at the right time. PagerDuty Schedules are used to determine who is on-call when an incident occurs.

Table Usage Guide

The pagerduty_schedule table provides insights into the on-call schedules within PagerDuty. As a DevOps engineer, explore schedule-specific details through this table, including the rotations, layers, and users assigned to each schedule. Utilize it to manage and optimize your on-call schedules, ensuring that incidents are handled promptly and efficiently.

Examples

Basic info

Explore which PagerDuty schedules are active to understand the current allocation of resources and manage workflow more effectively. This can help in optimizing resource utilization and ensuring round-the-clock coverage.

select
name,
id,
timezone,
self
from
pagerduty_schedule;
select
name,
id,
timezone,
self
from
pagerduty_schedule;

List unused schedules

Discover the schedules that are not linked to any escalation policies. This can help in identifying and cleaning up unused resources, thereby improving the efficiency of your PagerDuty setup.

select
name,
id,
timezone,
self
from
pagerduty_schedule
where
jsonb_array_length(escalation_policies) = 0;
select
name,
id,
timezone,
self
from
pagerduty_schedule
where
json_array_length(escalation_policies) = 0;

List schedules not assigned to any team

Discover the schedules that are not assigned to any team, helping to identify potential scheduling gaps or unallocated resources within your PagerDuty configuration.

select
name,
id,
timezone,
self
from
pagerduty_schedule
where
jsonb_array_length(teams) = 0;
select
name,
id,
timezone,
self
from
pagerduty_schedule
where
json_array_length(teams) = 0;

Schema for pagerduty_schedule

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
descriptiontextThe description of the schedule.
escalation_policiesjsonbA list of the escalation policies that uses this schedule.
final_schedulejsonbSpecifies the final schedule.
html_urltextThe API show URL at which the object is accessible.
idtext=An unique identifier of a schedule.
nametext=The name of the schedule.
override_sub_schedulejsonbSpecifies schedule overrides for a given time range.
schedule_layersjsonbA list of schedule layers.
selftextThe API show URL at which the object is accessible.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
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.
teamsjsonbA list of the teams on the schedule.
timezonetextThe time zone of the schedule.
titletextTitle of the resource.
typetextThe type of object being created.
usersjsonbA list of the users on the schedule.

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_schedule