Skip to main content

A modern CLI for the Datadog API. Like Dogshell, but better.

Project description

ddogctl

A modern CLI for the Datadog API. Like Dogshell, but better.

Features

  • Rich terminal output with tables, colors, and progress bars
  • APM trace search and service listing
  • Log querying with trace correlation
  • Database monitoring (DBM) for slow queries and execution plans
  • Investigation workflows that correlate across monitors, traces, logs, and hosts
  • Retry logic with exponential backoff
  • Region shortcuts (us, eu, us3, us5, ap1, gov)

ddogctl vs Dogshell

Feature ddogctl Dogshell
Rich terminal output Yes No
APM traces Yes No
Log search + correlation Yes No
Database monitoring Yes No
Investigation workflows Yes No
Retry with backoff Yes No
Active maintenance Yes Deprecated

Installation

pip install ddogctl

Or with pipx:

pipx install ddogctl

Or with uv:

uv pip install ddogctl

Configuration

Set the required environment variables:

export DD_API_KEY="your-api-key"
export DD_APP_KEY="your-app-key"
export DD_SITE="us"  # optional, defaults to datadoghq.com

Region Shortcuts

Shortcut Site
us datadoghq.com
eu datadoghq.eu
us3 us3.datadoghq.com
us5 us5.datadoghq.com
ap1 ap1.datadoghq.com
gov ddog-gov.com

Quick Start

# Monitors
ddogctl monitor list --state Alert
ddogctl monitor get 12345

# Metrics
ddogctl metric query "avg:system.cpu.user{env:prod}" --from 1h
ddogctl metric search "cpu"

# Events
ddogctl event list --from 1d --priority normal
ddogctl event post "Deployment" "v2.1.0 deployed to prod"

# Hosts
ddogctl host list --filter "env:prod"
ddogctl host info web-prod-01

# APM
ddogctl apm services
ddogctl apm traces my-service --from 1h

# Logs
ddogctl logs search "status:error" --service my-api --from 30m
ddogctl logs tail "env:prod" --follow

# Database Monitoring
ddogctl dbm slow-queries --service postgres-prod --from 1h
ddogctl dbm explain "SELECT * FROM users WHERE id = 1"

# Investigation Workflows
ddogctl investigate service my-api --from 1h
ddogctl investigate host web-prod-01 --from 30m

Contributing

See CONTRIBUTING.md for setup instructions and development guidelines.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ddogctl-2.0.2.tar.gz (200.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ddogctl-2.0.2-py3-none-any.whl (65.4 kB view details)

Uploaded Python 3

File details

Details for the file ddogctl-2.0.2.tar.gz.

File metadata

  • Download URL: ddogctl-2.0.2.tar.gz
  • Upload date:
  • Size: 200.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ddogctl-2.0.2.tar.gz
Algorithm Hash digest
SHA256 9d5bebbfca41d30ec30c78649aca4dbbc73fa089a96a46c0e3e9c47820a93f61
MD5 1eb427fce17fd220b8b10802aabff7de
BLAKE2b-256 1252dc0bdd6aeddcde1c69bf936bcf45fb5f27620065ab5ef2a4d33038098c02

See more details on using hashes here.

Provenance

The following attestation bundles were made for ddogctl-2.0.2.tar.gz:

Publisher: publish.yml on srgfrancisco/ddogctl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ddogctl-2.0.2-py3-none-any.whl.

File metadata

  • Download URL: ddogctl-2.0.2-py3-none-any.whl
  • Upload date:
  • Size: 65.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ddogctl-2.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4892abfdefd62461270f6b1266f4ff9fb79cb8a72597b43189d1883259865d1e
MD5 af47214f763f3ee9db4243c6c9061eb6
BLAKE2b-256 ebf7e238441792b80d54d84874d75de7b8e0186178a7cf81b3bb9d58c183f22e

See more details on using hashes here.

Provenance

The following attestation bundles were made for ddogctl-2.0.2-py3-none-any.whl:

Publisher: publish.yml on srgfrancisco/ddogctl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page