Table: pagerduty_ruleset - Query PagerDuty Rulesets using SQL
A PagerDuty Ruleset is a collection of rules that determine what actions to take when an event is triggered. Rulesets help to control the routing, suppression, and grouping of incidents. They are a crucial component in managing the incident response process in PagerDuty.
Table Usage Guide
The pagerduty_ruleset
table provides insights into the rulesets within PagerDuty's incident management system. As an incident response manager or system administrator, explore ruleset-specific details through this table, including the rules defined, their conditions, and actions. Utilize it to manage and optimize the incident response process, such as routing incidents to appropriate responders, suppressing non-critical incidents, and grouping related incidents together.
Examples
Basic info
Explore the different rulesets in your PagerDuty account to understand their types and identifiers. This can help in managing and organizing your incident response workflows effectively.
select name, id, typefrom pagerduty_ruleset;
select name, id, typefrom pagerduty_ruleset;
List default global rulesets
Explore which rulesets are set as the default global rules within your PagerDuty configuration. This is useful for understanding the overarching rules that apply to all incidents, allowing for better incident management and response.
select name, id, typefrom pagerduty_rulesetwhere type = 'default_global';
select name, id, typefrom pagerduty_rulesetwhere type = 'default_global';
List rulesets not owned by any team
Explore which rulesets in your PagerDuty configuration aren't associated with any team. This can help identify potential gaps in your incident management workflows.
select name, id, typefrom pagerduty_rulesetwhere team is null;
select name, id, typefrom pagerduty_rulesetwhere team is null;
Count event rules per ruleset
Analyze the settings to understand the distribution of event rules across different rulesets. This can help you optimize event management by identifying rulesets with an excessive or insufficient number of rules.
select rs.id as ruleset_id, count(r.id)from pagerduty_ruleset as rs left join pagerduty_ruleset_rule as r on rs.id = r.ruleset_idgroup by rs.id;
select rs.id as ruleset_id, count(r.id)from pagerduty_ruleset as rs left join pagerduty_ruleset_rule as r on rs.id = r.ruleset_idgroup by rs.id;
Schema for pagerduty_ruleset
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
creator | jsonb | A set of information about the user who created the ruleset. | |
id | text | = | An unique identifier of a ruleset. |
name | text | The name of the ruleset. | |
routing_keys | jsonb | A list of routing keys for this ruleset. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
team | jsonb | A set of information about the team that owns the ruleset. | |
title | text | Title of the resource. | |
type | text | The type of the ruleset. Allowed values are: 'global' and 'default_global'. | |
updater | jsonb | A set information about the user that has updated the ruleset. |
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_ruleset