steampipe plugin install datadog

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,
message
from
datadog_monitor;
select
name,
id,
creator_email,
overall_state,
priority,
query,
message
from
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_state
from
datadog_monitor
where
overall_state in ('Alert', 'Warn');
select
name,
type,
created_at,
message,
overall_state
from
datadog_monitor
where
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,
tags
from
datadog_monitor
where
overall_state in ('Alert')
and tags @> '["aws"]' :: jsonb;
Error: The corresponding SQLite query is unavailable.

Schema for datadog_monitor

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
created_attimestamp with time zoneTimestamp of the monitor creation.
creator_emailtextEmail of the creator.
group_statesjsonbDictionary where the keys are groups (comma separated lists of tags) and the values are the list of groups your monitor is broken down on.
idtextID of the monitor.
messagetextTimestamp of the monitor creation.
modified_attimestamp with time zoneLast timestamp when the monitor was edited.
multibooleanWhether or not the monitor is broken down on different groups.
nametext=Name of the monitor.
optionsjsonbA list of role identifiers that can be pulled from the Roles API. Cannot be used with `locked` option.
overall_statetextCurrent state of the monitor. Possible states are "Alert", "Ignored", "No Data", "OK", "Skipped", "Unknown" and "Warn".
prioritybigintInteger from 1 (high) to 5 (low) indicating alert severity.
querytextThe monitor query.
restricted_rolesjsonbRelationships of the user object returned by the API.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
tagsjsonbTags associated to monitor.
typetextThe 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