weave
module · Observability

Datadog

Datadog — monitors, downtimes, users

Namespace: weave datadog Env: DATADOG_API_KEY
6
Commands
1
State kinds
Observability
Category
1
API docs

Setup

Configure credentials via environment variables. We recommend sourcing them through 1Password or your secrets manager rather than committing them to the shell rc.

Official API reference

weave commands for this module are checked against the vendor's published API.

Variable Description Status
DATADOG_API_KEYRequired for authentication.required
DATADOG_APP_KEYRequired for authentication.required
DATADOG_SITEDatadog site (e.g. datadoghq.com, datadoghq.eu, us3.datadoghq.com).optional
DATADOG_API_URLFull API URL override when using a custom site.optional

Sanity-check the wiring:

weave secrets check
weave datadog --help
weave doctor   # reports DATADOG_API_KEY status

Capabilities

What this module can do, by entity and verb. means a working CLI surface; · means not (yet) wired.

Entity findlistshowdosnapshotdiffapply
downtime·····
monitor··
user······

Commands

Every registered CLI command, grouped by verb. Each example uses placeholder arguments — substitute real values for your environment.

find (2)

find monitor

read

Find a monitor by name or id.

weave datadog find monitor <identifier>

find user

read

Find a Datadog user by email.

weave datadog find user <email>

list (2)

list downtimes

read

List active and scheduled downtimes.

weave datadog list downtimes <arg>

list monitors

read

List monitors (optionally by tag).

weave datadog list monitors <arg>

do (2)

do cancel-downtime

write

Cancel an active downtime by id.

weave datadog do cancel-downtime <downtime-id>

do schedule-downtime

write

Schedule a downtime for a scope.

weave datadog do schedule-downtime <scope>
snapshot / diff / apply are generated automatically from the State Kinds declared on this module — see the State kinds section below for per-kind details. Workflow: snapshot → edit YAML → diffapply --yes (or confirm interactively; apply --dry-run previews the same diff).

State kinds

Resources this module can snapshot and diff; apply where the kind supports live writes (see Round-trip per kind). Always run diff before apply; use --yes in automation after review. Files live under .weave-state/datadog/.

monitors

snapshot diff apply

All monitors on the Datadog account (name + type are the key).

Scope
Round-trip
Full round-trip — snapshot, diff, apply.

State file skeleton

module: datadog
kind: monitors
items:
  - # <fields specific to this kind — see snapshot output>

Workflows

End-to-end recipes from operators who already run this module in production. Copy, adapt, and put under change-control.

Version-control monitors

weave datadog snapshot monitors
$EDITOR .weave-state/datadog/monitors.yaml
weave datadog diff monitors
weave datadog apply monitors --yes

Silence an alert during maintenance

weave datadog find monitor "High CPU on prod-db"
weave datadog do schedule-downtime --scope=host:prod-db-01 --duration=2h --yes
# after maintenance:
weave datadog do cancel-downtime <downtime-id>

Audit active downtimes

weave datadog list downtimes

Find an on-call engineer's Datadog user

weave datadog find user oncall@company.com

Terraform parity

For each Terraform resource in the canonical provider, here's the equivalent live-API verb in weave. Use this as a migration cheat-sheet, not a 1:1 contract — weave deliberately stays in the live-state lane, not the desired-state lane.

Terraform resource weave equivalent
datadog_monitorweave datadog snapshot/diff/apply monitors + find/list monitor
datadog_downtimeweave datadog list downtimes + do schedule-downtime / cancel-downtime
Downtimes are operational — weave schedules/cancels live, not full YAML round-trip.
datadog_userweave datadog find user
User CRUD not exposed — find-only for correlation during incidents.

Troubleshooting & source

Missing credentials

Run weave doctor — it reports which env vars (including DATADOG_API_KEY) are set and which are blank.

Unexpected behaviour from a state apply

Re-run weave datadog diff <kind> to confirm the controller's current state, then re-snapshot before the next apply. The driver always re-snapshots before diffing.