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, selffrom pagerduty_team;
select name, id, description, selffrom 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, selffrom pagerduty_teamwhere members is null;
select name, id, description, selffrom pagerduty_teamwhere 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_sentfrom pagerduty_team as t, jsonb_array_elements(members) as member, pagerduty_user as uwhere 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_sentfrom pagerduty_team as t, json_each(members) as member, pagerduty_user as uwhere json_extract(member.value, '$.user.id') = u.id and u.invitation_sent;
Schema for pagerduty_team
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. | |
description | text | The description of the team. | |
html_url | text | The API show URL at which the object is accessible. | |
id | text | = | An unique identifier of a team. |
members | jsonb | A list of members of a team. | |
name | text | = | The name of the team. |
self | text | The API show URL at which the object is accessible. | |
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. | |
tags | jsonb | A list of tags applied on team. | |
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_team