turbot/pagerduty
steampipe plugin install pagerduty

Table: pagerduty_team - Query PagerDuty Teams using SQL

PagerDuty Teams is a feature within PagerDuty that allows you to group users, escalation policies, and services based on your organization's structure or responsibilities. It provides a centralized way to manage and organize your incident response structure for better visibility and collaboration. PagerDuty Teams helps you streamline incident management and response by ensuring the right information reaches the right people at the right time.

Table Usage Guide

The pagerduty_team table provides insights into teams within PagerDuty. As a DevOps engineer, you can explore team-specific details through this table, including members, escalation policies, and associated services. Use it to manage and organize your incident response structure, ensuring the right information reaches the right people at the right time.

Examples

Basic info

Explore the essential details of your PagerDuty team to gain insights into team structure and roles, which can be useful for auditing or restructuring purposes.

select
name,
id,
description,
self
from
pagerduty_team;
select
name,
id,
description,
self
from
pagerduty_team;

List teams with no members

Discover the teams that currently have no members assigned to them. This can be useful for identifying and managing unallocated resources or underutilized teams within your organization.

select
name,
id,
description,
self
from
pagerduty_team
where
members is null;
select
name,
id,
description,
self
from
pagerduty_team
where
members is null;

List members with pending invitation

Explore which team members have yet to accept their invitations. This is useful in monitoring the status of team onboarding and identifying any potential issues or delays.

select
t.name as team_name,
member -> 'user' ->> 'summary' as user_name,
member ->> 'role' as role,
u.invitation_sent
from
pagerduty_team as t,
jsonb_array_elements(members) as member,
pagerduty_user as u
where
member -> 'user' ->> 'id' = u.id
and u.invitation_sent;
select
t.name as team_name,
json_extract(member.value, '$.user.summary') as user_name,
json_extract(member.value, '$.role') as role,
u.invitation_sent
from
pagerduty_team as t,
json_each(members) as member,
pagerduty_user as u
where
json_extract(member.value, '$.user.id') = u.id
and u.invitation_sent;

Schema for pagerduty_team

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
descriptiontextThe description of the team.
html_urltextThe API show URL at which the object is accessible.
idtext=An unique identifier of a team.
membersjsonbA list of members of a team.
nametext=The name of the team.
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.
tagsjsonbA list of tags applied on team.
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_team