Table: pagerduty_on_call - Query PagerDuty On-calls using SQL
PagerDuty On-call is a feature within PagerDuty that allows you to manage and view who is currently on-call and when. It provides a centralized way to set up and manage on-call schedules for various teams and individuals. PagerDuty On-call helps you stay informed about the on-call status and take appropriate actions when needed.
Table Usage Guide
The pagerduty_on_call
table provides insights into on-call schedules within PagerDuty. As a DevOps engineer, explore on-call details through this table, including who is currently on-call, when they started, and when they will end. Utilize it to uncover information about on-call schedules, such as overlapping schedules, and the verification of on-call rotations.
Examples
Basic info
Explore which users are currently on call and the associated escalation policies and schedules. This can help in understanding the current on-call management setup and in planning future on-call schedules.
select escalation_policy, user_on_call, schedule, escalation_level, start, "end"from pagerduty_on_call;
select escalation_policy, user_on_call, schedule, escalation_level, start, "end"from pagerduty_on_call;
Get the current on call user's name for a given schedule name
Determine the current on-call individual for a specific schedule. This is useful for identifying who is responsible for handling urgent issues during a particular time frame.
select user_on_call ->> 'summary' as "User"from pagerduty_on_callwhere schedule ->> 'summary' = 'Schedule Name';
select json_extract(user_on_call, '$.summary') as "User"from pagerduty_on_callwhere json_extract(schedule, '$.summary') = 'Schedule Name';
Schema for pagerduty_on_call
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. | |
end | timestamp with time zone | The end of the on-call. If null, the user does not go off-call. | |
escalation_level | bigint | The escalation level for the on-call. | |
escalation_policy | jsonb | The escalation_policy object. | |
schedule | jsonb | The schedule object. | |
start | timestamp with time zone | The start of the on-call. If null, the on-call is a permanent user on-call. | |
user_on_call | jsonb | The user object. |
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_on_call