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
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ddogctl-2.0.0.tar.gz.
File metadata
- Download URL: ddogctl-2.0.0.tar.gz
- Upload date:
- Size: 206.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60299e6eb68a2c9b0cabff2662250644f757c2a7051395c34a5f813546b3b26e
|
|
| MD5 |
68d7c499adccb0af0644eb5163eea1d1
|
|
| BLAKE2b-256 |
41c3a90837caeca1e98c07b61d6cd4132c311eb21b1338afb6fbb4d9aa843881
|
Provenance
The following attestation bundles were made for ddogctl-2.0.0.tar.gz:
Publisher:
ci.yml on srgfrancisco/ddogctl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ddogctl-2.0.0.tar.gz -
Subject digest:
60299e6eb68a2c9b0cabff2662250644f757c2a7051395c34a5f813546b3b26e - Sigstore transparency entry: 944527689
- Sigstore integration time:
-
Permalink:
srgfrancisco/ddogctl@e4f6f70ab28e270bc68442d2dbd83fb049f93ed4 -
Branch / Tag:
refs/tags/v2.0.0 - Owner: https://github.com/srgfrancisco
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@e4f6f70ab28e270bc68442d2dbd83fb049f93ed4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ddogctl-2.0.0-py3-none-any.whl.
File metadata
- Download URL: ddogctl-2.0.0-py3-none-any.whl
- Upload date:
- Size: 65.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4f182b43a062f3c57646baf7f940f96643345862c628c183fb028aa174150c7
|
|
| MD5 |
f3cd825e015e3f1d955ba65c1afc333e
|
|
| BLAKE2b-256 |
509e28cfcaebbdd3cb9f95f5c4a353e2158b88c2885005cfacc9af16f662c95c
|
Provenance
The following attestation bundles were made for ddogctl-2.0.0-py3-none-any.whl:
Publisher:
ci.yml on srgfrancisco/ddogctl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ddogctl-2.0.0-py3-none-any.whl -
Subject digest:
a4f182b43a062f3c57646baf7f940f96643345862c628c183fb028aa174150c7 - Sigstore transparency entry: 944527697
- Sigstore integration time:
-
Permalink:
srgfrancisco/ddogctl@e4f6f70ab28e270bc68442d2dbd83fb049f93ed4 -
Branch / Tag:
refs/tags/v2.0.0 - Owner: https://github.com/srgfrancisco
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@e4f6f70ab28e270bc68442d2dbd83fb049f93ed4 -
Trigger Event:
push
-
Statement type: