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, rolefrom pagerduty_user;
select name, id, email, rolefrom 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, rolefrom pagerduty_userwhere invitation_sent;
select name, id, email, rolefrom pagerduty_userwhere 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, rolefrom pagerduty_userwhere jsonb_array_length(teams) < 1;
select name, id, email, rolefrom pagerduty_userwhere ( 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, rolefrom pagerduty_user, jsonb_array_elements(tags) as twhere t ->> 'label' ilike 'owner';
select name, id, email, rolefrom pagerduty_user, json_each(tags) as twhere json_extract(t.value, '$.label') like 'owner';
Schema for pagerduty_user
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. | |
avatar_url | text | The URL of the user's avatar. | |
color | text | The schedule color. | |
contact_methods | jsonb | A list of contact methods for the user. | |
description | text | The user's bio. | |
text | = | The user's email address. | |
html_url | text | An URL at which the entity is uniquely displayed in the Web app. | |
id | text | = | An unique identifier of an user. |
invitation_sent | boolean | If true, the user has an outstanding invitation. | |
job_title | text | The user's job title. | |
name | text | = | The name of the user. |
notification_rules | jsonb | A list of notification rules for the user. | |
role | text | The 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'. | |
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 user. | |
teams | jsonb | A list of teams to which the user belongs. Account must have the teams ability to set this. | |
timezone | text | The preferred time zone name. If null, the account's time zone will be used. | |
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_user