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, selffrom pagerduty_service;
select name, id, status, selffrom 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, selffrom pagerduty_servicewhere status = 'disabled';
select name, id, status, selffrom pagerduty_servicewhere 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, selffrom pagerduty_servicewhere jsonb_array_length(teams) < 1;
select name, id, status, selffrom pagerduty_servicewhere json_array_length(teams) < 1;
Schema for pagerduty_service
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. | |
acknowledgement_timeout | bigint | Time in seconds that an incident changes to the Triggered State after being Acknowledged. Value is null if the feature is disabled. | |
alert_creation | text | Whether a service creates only incidents, or both alerts and incidents. A service must create alerts in order to enable incident merging. | |
alert_grouping_parameters | jsonb | Defines 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_timeout | bigint | Time in seconds that an incident is automatically resolved if left open for that long. Value is null if the feature is disabled. | |
create_at | timestamp with time zone | The date/time when this service was created. | |
description | text | The user-provided description of the service. | |
escalation_policy | jsonb | Escalation policy associated with the service. | |
html_url | text | An URL at which the entity is uniquely displayed in the Web app. | |
id | text | = | An unique identifier of a service. |
incident_urgency_rule | jsonb | A list of incident urgency rules. | |
integrations | jsonb | An 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_timestamp | timestamp with time zone | The date/time when the most recent incident was created for this service. | |
name | text | = | The name of the service. |
scheduled_actions | jsonb | An array containing scheduled actions for the service. | |
self | text | The API show URL at which the object is accessible. | |
status | text | The current state of the service. | |
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. | |
support_hours | jsonb | Defines the service's support hours | |
teams | jsonb | The set of teams associated with this service. | |
title | text | Title of the resource. | |
type | text | The 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