Table: datadog_monitor - Query Datadog Monitors using SQL
Datadog is a monitoring and analytics platform for developers, IT operations teams and business users. It brings together data from servers, containers, databases, and third-party services to make your stack entirely observable. Monitors in Datadog provide alerts and notifications based on the metrics and events collected from these systems.
Table Usage Guide
The datadog_monitor
table provides insights into Monitors within Datadog. As a DevOps engineer, explore monitor details through this table, including type, query, message, and options. Utilize it to uncover information about monitors, such as their configuration, status, and alert conditions.
Examples
Basic info
Analyze the settings to understand the overall state and priority of each monitor in your Datadog account, along with their creators and associated messages. This can be useful in assessing the health and urgency of different monitors, and identifying any potential issues or concerns.
select name, id, creator_email, overall_state, priority, query, messagefrom datadog_monitor;
select name, id, creator_email, overall_state, priority, query, messagefrom datadog_monitor;
List monitors in "Alert" and "Warn" state
Explore which monitors are in a state of alert or warning to identify potential issues and take necessary action in a timely manner. This can help in maintaining system health and preventing unexpected failures.
select name, type, created_at, message, overall_statefrom datadog_monitorwhere overall_state in ('Alert', 'Warn');
select name, type, created_at, message, overall_statefrom datadog_monitorwhere overall_state in ('Alert', 'Warn');
List monitors in "Alert" state with an "aws" tag
Explore which monitors are in an alert state and are tagged with 'aws'. This can be useful for quickly identifying potential issues within your 'aws' resources.
select name, type, created_at, overall_state, message, tagsfrom datadog_monitorwhere overall_state in ('Alert') and tags @> '["aws"]' :: jsonb;
Error: The corresponding SQLite query is unavailable.
Schema for datadog_monitor
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
created_at | timestamp with time zone | Timestamp of the monitor creation. | |
creator_email | text | Email of the creator. | |
group_states | jsonb | Dictionary where the keys are groups (comma separated lists of tags) and the values are the list of groups your monitor is broken down on. | |
id | text | ID of the monitor. | |
message | text | Timestamp of the monitor creation. | |
modified_at | timestamp with time zone | Last timestamp when the monitor was edited. | |
multi | boolean | Whether or not the monitor is broken down on different groups. | |
name | text | = | Name of the monitor. |
options | jsonb | A list of role identifiers that can be pulled from the Roles API. Cannot be used with `locked` option. | |
overall_state | text | Current state of the monitor. Possible states are "Alert", "Ignored", "No Data", "OK", "Skipped", "Unknown" and "Warn". | |
priority | bigint | Integer from 1 (high) to 5 (low) indicating alert severity. | |
query | text | The monitor query. | |
restricted_roles | jsonb | Relationships of the user object returned by the API. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
tags | jsonb | Tags associated to monitor. | |
type | text | The type of the monitor. For more information about type, see https://docs.datadoghq.com/monitors/guide/monitor_api_options/. |
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)" -- datadog
You can pass the configuration to the command with the --config
argument:
steampipe_export_datadog --config '<your_config>' datadog_monitor