usage-metering

Query Datadog usage and billing data through the pup CLI summary and hourly commands.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Teams need visibility into Datadog consumption and costs across products, but navigating the Datadog usage APIs and time-window formats manually is error-prone. This Skill guides an agent to query usage summaries and hourly usage data through the pup CLI with correct authentication, time flags, and command selection. ## Core Features & Use Cases - Aggregated Usage Summaries: Run pup usage summary with month, date, or relative time ranges to inspect total consumption across a period. - Hourly Usage Inspection: Run pup usage hourly with RFC3339 timestamps for precise hourly windows. - Cost Breakdowns: Use pup costs datadog projected and pup costs datadog by-org for projected costs and per-organization cost attribution. - Use Case: A finance engineer asks how much usage the organization consumed in Q1 2024; the agent runs pup usage summary --from="2024-01" --to="2024-04" and summarizes totals with the queried time window and site. ## Quick Start Ask the agent to show your Datadog usage summary for last month using the pup CLI.

Frequently Asked Questions about usage-metering

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

FAQPage Schema
How do I check Datadog usage from the command line?

Use the pup CLI with `pup usage summary` for aggregated usage or `pup usage hourly` for hourly data. Both accept --from and --to flags supporting relative durations, calendar months, dates, RFC3339 timestamps, and Unix timestamps.

How do I get Datadog cost breakdown by organization?

Run `pup costs datadog by-org --start-month="2024-01" --end-month="2024-03"` for per-organization cost attribution, or `pup costs datadog projected` for projected costs. Cost commands live under pup costs, not pup usage.

What permissions are needed for Datadog usage API access?

The Datadog user or API keys must have the usage_read permission. OAuth2 login via pup auth login works, but an OAuth token scope alone is insufficient if the Datadog role itself does not grant usage_read.

Why does pup usage return a 403 Forbidden error?

A 403 means missing authorization. Verify both the OAuth scopes from pup auth login and that the Datadog role grants the usage_read permission, since token scope alone does not confer the role-level permission.

Can I query product-specific Datadog usage like logs or hosts?

The current pup CLI only supports `pup usage summary` and `pup usage hourly`; product-specific subcommands for hosts, logs, or custom metrics are not implemented. Use a raw Datadog API request for product-specific endpoints.