turbot/pagerduty
steampipe plugin install pagerduty

Table: pagerduty_service - Query PagerDuty Services using SQL

PagerDuty is an incident response platform that provides reliable notifications, automatic escalations, on-call scheduling, and other functionality to help teams detect and fix infrastructure problems quickly. The PagerDuty Service is a component of the PagerDuty system that represents something you monitor (like a server, an application, or a database). Each service has its own set of integrations, escalation policies, and notification settings.

Table Usage Guide

The pagerduty_service table provides insights into services within PagerDuty. As a DevOps engineer or system administrator, explore service-specific details through this table, including integrations, escalation policies, and notification settings. Utilize it to uncover information about services, such as their current status, associated teams, and the incidents related to each service.

Examples

Basic info

Explore which services are currently active on your PagerDuty account. This is useful for understanding your overall service usage and identifying any services that may be inactive or unused.

select
name,
id,
status,
self
from
pagerduty_service;
select
name,
id,
status,
self
from
pagerduty_service;

List disabled services

Uncover the details of inactive services on PagerDuty. This query is useful for maintaining system health by identifying services that are no longer in use.

select
name,
id,
status,
self
from
pagerduty_service
where
status = 'disabled';
select
name,
id,
status,
self
from
pagerduty_service
where
status = 'disabled';

List services not associated with any team

Identify services in your PagerDuty account that are not linked to any team. This is useful for ensuring all services are properly assigned for effective incident management.

select
name,
id,
status,
self
from
pagerduty_service
where
jsonb_array_length(teams) < 1;
select
name,
id,
status,
self
from
pagerduty_service
where
json_array_length(teams) < 1;

Schema for pagerduty_service

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
acknowledgement_timeoutbigintTime in seconds that an incident changes to the Triggered State after being Acknowledged. Value is null if the feature is disabled.
alert_creationtextWhether a service creates only incidents, or both alerts and incidents. A service must create alerts in order to enable incident merging.
alert_grouping_parametersjsonbDefines how alerts on this service will be automatically grouped into incidents. Note that the alert grouping features are available only on certain plans.
auto_resolve_timeoutbigintTime in seconds that an incident is automatically resolved if left open for that long. Value is null if the feature is disabled.
create_attimestamp with time zoneThe date/time when this service was created.
descriptiontextThe user-provided description of the service.
escalation_policyjsonbEscalation policy associated with the service.
html_urltextAn URL at which the entity is uniquely displayed in the Web app.
idtext=An unique identifier of a service.
incident_urgency_rulejsonbA list of incident urgency rules.
integrationsjsonbAn array containing integrations that belong to this service. If integrations is passed as an argument, these are full objects - otherwise, these are references.
last_incident_timestamptimestamp with time zoneThe date/time when the most recent incident was created for this service.
nametext=The name of the service.
scheduled_actionsjsonbAn array containing scheduled actions for the service.
selftextThe API show URL at which the object is accessible.
statustextThe current state of the service.
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.
support_hoursjsonbDefines the service's support hours
teamsjsonbThe set of teams associated with this service.
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_service