turbot/datadog

steampipe plugin install datadogsteampipe plugin install datadog

Datadog + Steampipe

Datadog is the essential monitoring and security platform for cloud applications.

Steampipe is an open source CLI to instantly query cloud APIs using SQL.

For example:

select
name,
type,
overall_state
from
datadog_monitor
where
overall_state in ('Alert', 'Warn');
+-------------------------------+---------------+---------------+
| name | type | overall_state |
+-------------------------------+---------------+---------------+
| Spend Alert | query alert | Alert |
| [Auto] Clock in sync with NTP | service check | Warn |
+-------------------------------+---------------+---------------+

Documentation

Get started

Install

Download and install the latest Datadog plugin:

steampipe plugin install datadog

Configuration

Installing the latest datadog plugin will create a config file (~/.steampipe/config/datadog.spc) with a single connection named datadog:

connection "datadog" {
plugin = "datadog"
# Get your API key from https://app.datadoghq.com/organization-settings/api-keys
# Steampipe will resolve the API key in below order:
# 1. The "api_key" specified here in the config
# 2. The `DD_CLIENT_API_KEY` environment variable
# api_key = "1a2345bc6d78e9d98fa7bcd6e5ef56a7"
# Get your application key from https://app.datadoghq.com/organization-settings/application-keys
# Steampipe will resolve the application key in below order:
# 1. The "app_key" specified here in the config
# 2. The `DD_CLIENT_APP_KEY` environment variable
# app_key = "b1cf234c0ed4c567890b524a3b42f1bd91c111a1"
# The API URL. By default it is pointed to "https://api.datadoghq.com/"
# If working with the EU version of Datadog, use "https://api.datadoghq.eu/"
# Please note that this URL must not end with the /api/ path.
# api_url = "https://api.datadoghq.com/"
}
  • api_key (required) - API keys are unique to an organization. An API key is required by the Datadog Agent to submit metrics and events to Datadog. Get an API key. May alternatively be set via the DD_CLIENT_API_KEY environment variable.

  • app_key (required) - Application keys in conjunction with organization’s API key, give users access to Datadog’s programmatic API. Application keys are associated with the user account that created them and have the permissions and capabilities of the user who created them. Get an application key. May alternatively be set via the DD_CLIENT_APP_KEY environment variable.

  • api_url (optional) - The API URL used for all requests. Defaults to "https://api.datadoghq.com/". If working with the EU version, this should be changed to "https://api.datadoghq.eu/".

Get Involved