turbot/pagerduty
steampipe plugin install pagerduty

Table: pagerduty_user - Query PagerDuty Users using SQL

PagerDuty is a real-time operations platform that integrates machine data & human intelligence to improve visibility & agility across organizations. It is used for incident response, on-call scheduling, escalation policies, and analytics. Users in PagerDuty are individuals who have access to the platform and their profile information includes details like email, role, job title, time zone, etc.

Table Usage Guide

The pagerduty_user table provides insights into user profiles within PagerDuty. As an IT manager or DevOps engineer, explore user-specific details through this table, including their roles, job titles, and time zones. Utilize it to manage user access, understand user responsibilities, and ensure appropriate on-call schedules are in place.

Examples

Basic info

Explore the user base in your PagerDuty account to understand their roles and contact information. This can help in managing team responsibilities and communication channels effectively.

select
name,
id,
email,
role
from
pagerduty_user;
select
name,
id,
email,
role
from
pagerduty_user;

List invited users

Discover the details of users who have been invited to join your PagerDuty team. This can help you track pending invitations and understand the roles assigned to each invitee.

select
name,
id,
email,
role
from
pagerduty_user
where
invitation_sent;
select
name,
id,
email,
role
from
pagerduty_user
where
invitation_sent = 1;

List users not in any team

Discover the segments that consist of users who are not part of any team, a useful approach for identifying potential areas for team expansion or redistribution of tasks.

select
name,
id,
email,
role
from
pagerduty_user
where
jsonb_array_length(teams) < 1;
select
name,
id,
email,
role
from
pagerduty_user
where
(
select
count(*)
from
json_each(teams)
) < 1;

List users with owner tags

Discover the segments that consist of users tagged as 'owners' in your system. This allows you to quickly identify and communicate with the responsible parties for specific tasks or issues.

select
name,
id,
email,
role
from
pagerduty_user,
jsonb_array_elements(tags) as t
where
t ->> 'label' ilike 'owner';
select
name,
id,
email,
role
from
pagerduty_user,
json_each(tags) as t
where
json_extract(t.value, '$.label') like 'owner';

Schema for pagerduty_user

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
avatar_urltextThe URL of the user's avatar.
colortextThe schedule color.
contact_methodsjsonbA list of contact methods for the user.
descriptiontextThe user's bio.
emailtext=The user's email address.
html_urltextAn URL at which the entity is uniquely displayed in the Web app.
idtext=An unique identifier of an user.
invitation_sentbooleanIf true, the user has an outstanding invitation.
job_titletextThe user's job title.
nametext=The name of the user.
notification_rulesjsonbA list of notification rules for the user.
roletextThe user role. Account must have the 'read_only_users' ability to set a user as a 'read_only_user' or a 'read_only_limited_user', and must have advanced permissions abilities to set a user as 'observer' or 'restricted_access'.
selftextThe API show URL at which the object is accessible.
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 user.
teamsjsonbA list of teams to which the user belongs. Account must have the teams ability to set this.
timezonetextThe preferred time zone name. If null, the account's time zone will be used.
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_user