turbot/prometheus
steampipe plugin install prometheus

Table: prometheus_rule_group - Query Prometheus Rule Groups using SQL

Prometheus Rule Groups are a set of Prometheus rules that are evaluated together in a specific order. These rules can be either recording rules, which precompute frequently needed or computationally expensive expressions and save their result as a new set of time series, or alerting rules, which trigger alerts when certain conditions are observed to be true. Rule Groups are part of Prometheus' configuration and are used to define a list of alerts and recording rules.

Table Usage Guide

The prometheus_rule_group table provides insights into Rule Groups within Prometheus. As a DevOps engineer, explore group-specific details through this table, including the rules, their configuration, and their current status. Utilize it to monitor and manage your Prometheus rules, understand the current state of your alerting and recording rules, and quickly identify any potential issues.

Examples

List all rule groups

Explore all the rule groups in your Prometheus monitoring system to understand how your rules are organized and to identify potential areas for optimization or reconfiguration. This can be especially beneficial for large-scale systems where efficient rule management is crucial.

select
*
from
prometheus_rule_group;
select
*
from
prometheus_rule_group;

Schema for prometheus_rule_group

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
filetextPath to the rule group file definition.
intervaldouble precisionHow often rules in the group are evaluated in seconds.
nametextThe name of the group. Must be unique within a file.
sp_connection_nametextSteampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.

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)" -- prometheus

You can pass the configuration to the command with the --config argument:

steampipe_export_prometheus --config '<your_config>' prometheus_rule_group