metrics

Query, list, and submit Datadog metrics using the pup CLI tool.

5|2|Updated Mar 9, 2026
One-click install
npx skills add https://github.com/lauhon/pi --skill metrics-lauhon
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: metrics
Source: https://github.com/lauhon/pi/tree/main/skills/metrics
Command: npx skills add https://github.com/lauhon/pi --skill metrics-lauhon

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It removes the friction of manually navigating the Datadog UI or writing raw API calls when you need to inspect time-series metric data, discover available metrics, or submit custom metrics to your Datadog organization. ## Core Features & Use Cases - Metric Discovery: List all available metrics in your Datadog organization with optional prefix filtering and result limits. - Time-Series Queries: Retrieve metric data with flexible time ranges, aggregations, and tag-based grouping (e.g., CPU usage by host). - Custom Metric Submission: Send custom metric data to Datadog with a confirmation step before any write operation executes. - Use Case: During an incident, ask for memory usage by host over the last four hours and immediately receive a summarized breakdown without opening the Datadog dashboard. ## Quick Start Ask the agent to show CPU usage for the last hour and it will run the appropriate Datadog metrics query and summarize the results.

Frequently Asked Questions about metrics

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query Datadog metrics from the command line?

Use the pup CLI with a query like pup metrics query --query="avg:system.cpu.user{*}" --from="1h" --to="now". The query syntax follows Datadog conventions: aggregation:metric{scope} with optional grouping by tags.

How do I list available metrics in Datadog?

Run pup metrics list to see all metrics in your organization. You can narrow results with a filter such as --filter="system.*" and control output size with --limit.

What credentials are required for the Datadog metrics API?

You need three environment variables: DD_API_KEY for your Datadog API key, DD_APP_KEY for your application key, and DD_SITE for your Datadog site, which defaults to datadoghq.com.

What time formats does Datadog metric querying support?

Supported formats include relative times like 1h, 30m, 2d, or 3600s, Unix timestamps such as 1704067200, the keyword now, and ISO dates like 2024-01-01T00:00:00Z.

Why does my Datadog metric query return an invalid syntax error?

The error occurs when the query does not follow Datadog syntax: aggregation:metric{scope} optionally followed by by {grouping}. Check that the aggregation, metric name, and tag filters are correctly formatted.

Does submitting custom metrics to Datadog require confirmation?

Yes. Write operations like custom metric submission display a warning and require user awareness before execution, while read operations such as listing and querying run automatically.