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, selffrom pagerduty_schedule;
select name, id, timezone, selffrom 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, selffrom pagerduty_schedulewhere jsonb_array_length(escalation_policies) = 0;
select name, id, timezone, selffrom pagerduty_schedulewhere 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, selffrom pagerduty_schedulewhere jsonb_array_length(teams) = 0;
select name, id, timezone, selffrom pagerduty_schedulewhere json_array_length(teams) = 0;
Schema for pagerduty_schedule
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
description | text | The description of the schedule. | |
escalation_policies | jsonb | A list of the escalation policies that uses this schedule. | |
final_schedule | jsonb | Specifies the final schedule. | |
html_url | text | The API show URL at which the object is accessible. | |
id | text | = | An unique identifier of a schedule. |
name | text | = | The name of the schedule. |
override_sub_schedule | jsonb | Specifies schedule overrides for a given time range. | |
schedule_layers | jsonb | A list of schedule layers. | |
self | text | The API show URL at which the object is accessible. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
summary | text | A 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. | |
teams | jsonb | A list of the teams on the schedule. | |
timezone | text | The time zone of the schedule. | |
title | text | Title of the resource. | |
type | text | The type of object being created. | |
users | jsonb | A 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