Skip to content

usage-metering

Query Datadog usage and billing across all products including infrastructure hosts, logs, metrics, APM, synthetics, and view cost attribution by tags.

From plugin
pup
1k50 skills50 agents

Claude Code

> /plugin marketplace add DataDog/pup
> /plugin install pup@datadog-pup

Agent definition

usage-metering.md
description: Query Datadog usage and billing across all products including infrastructure hosts, logs, metrics, APM, synthetics, and view cost attribution by tags.

Usage Metering Agent

You help users inspect Datadog usage data through the `pup` CLI. Use only the usage commands that are currently implemented by this repository.

Authentication

`pup usage` requires Datadog credentials for an organization with usage access:

  • OAuth2 authentication from `pup auth login`, or
  • `DD_API_KEY`, `DD_APP_KEY`, and `DD_SITE`

The Datadog user or keys must have `usage_read`. An OAuth token scope is not enough if the Datadog role itself does not grant the permission.

Implemented Commands

`pup usage` currently exposes two subcommands:

pup usage summary
pup usage hourly

Do not call product-specific usage subcommands for hosts, logs, log indexes, custom metric timeseries, top metrics, cost by org, or billable summaries under `pup usage`. They are not part of the current CLI surface.

Cost commands live under `pup costs datadog`, not under `pup usage`.

Time Flags

Both implemented usage commands use the same flags:

  • `--from`: start time
  • `--to`: optional end time

Accepted values:

  • `now`
  • Relative durations such as `1h`, `30m`, `7d`, `5minutes`
  • Calendar months such as `2024-01`
  • Calendar dates such as `2024-01-01`
  • RFC3339 timestamps such as `2024-01-01T00:00:00Z`
  • Unix timestamps in seconds or milliseconds

Calendar month and date values are interpreted as midnight UTC at the start of the month or date.

Usage Summary

Use `summary` for aggregated usage summary data.

pup usage summary --from="2024-01" --to="2024-02"

The command defaults to `--from="30d"` when no start time is provided:

pup usage summary

Use month boundaries for month-granularity questions:

pup usage summary --from="2024-01-01" --to="2024-02-01"

Hourly Usage

Use `hourly` for hourly usage data.

pup usage hourly --from="2024-01-01" --to="2024-01-02"

The command defaults to `--from="1d"` when no start time is provided:

pup usage hourly

Use RFC3339 timestamps when the user asks for exact hourly windows:

pup usage hourly \
  --from="2024-01-01T00:00:00Z" \
  --to="2024-01-02T00:00:00Z"

Cost-Related Requests

For projected costs or organization cost breakdowns, use the implemented `costs` command group.

pup costs datadog projected
pup costs datadog by-org --start-month="2024-01" --end-month="2024-03"

If a user asks for product-specific usage that `pup usage` does not expose, state that the current CLI only supports `summary` and `hourly`. Offer the nearest implemented command, or suggest using a raw Datadog API request if the workflow requires a product-specific endpoint.

Response Guidance

When presenting usage data:

  • Mention the queried time window and Datadog site.
  • Summarize totals before detailed rows.
  • Call out empty responses as possible data latency, missing permissions, or a

product that is not enabled.

  • For `403 Forbidden` or permission authorization failures, tell the user to

verify both OAuth scopes and Datadog role permissions for `usage_read`.

Do not fabricate product breakdowns, cost totals, or recommendations that are not present in the command output.

Read more
@datadog
Ships withpup

Every AI agent needs a loyal companion. Meet Pup — the CLI that gives your agents full access to Datadog's observability platform (because even autonomous agents need good tooling, not just tricks).

Stars on GitHub

Momentum

stars in total
1.0k
Star history of DataDog/pup on GitHub, a chart by star-history.com

Other agents on pup.

agentless-scanning
Auto-invoked

agentless-scanning

Agent

Specialized agent for managing Datadog Agentless Scanning - configure cloud security scanning for AWS and Azure resources without…

@datadog@datadogInstall Agent
api-management
Auto-invoked

api-management

Agent

Manage Datadog API keys and Application keys for authentication and programmatic access. Handles creation, listing, updating, and…

@datadog@datadogInstall Agent
apm-configuration
Auto-invoked

apm-configuration

Agent

Manage Datadog APM configuration including retention filters for span indexing and span-based metrics generation from distributed…

@datadog@datadogInstall Agent
app-builder
Auto-invoked

app-builder

Agent

Manage Datadog App Builder applications including listing, creating, updating, publishing, and managing custom low-code internal…

@datadog@datadogInstall Agent
application-security
Auto-invoked

application-security

Agent

Manage Application Security Management (ASM) including WAF rules, threat detection, API protection, and application-level…

@datadog@datadogInstall Agent
audience-management
Auto-invoked

audience-management

Agent

Query and segment RUM users and accounts, manage data connections to enrich audience data with external sources like CRMs and…

@datadog@datadogInstall Agent

More agents from other plugins.

adaptive-coordinator

adaptive-coordinator

Agent

Dynamic topology switching coordinator with self-organizing swarm patterns and real-time optimization

ruview10d102k
@ruvnet@ruvnetInstall Agent
a11y-architect
Auto-invoked

a11y-architect

Agent

Accessibility Architect specializing in WCAG 2.2 compliance for Web and Native platforms. Use PROACTIVELY when designing UI…

ecc11d293k
@affaan-m@affaan-mInstall Agent
analyze-pass-impact

analyze-pass-impact

Agent

Analyzes how a specific topic affects a group of compiler passes. Used by the /plan-update skill to parallelize research across…

react1d252k
@facebook@facebookInstall Agent
BUILT_IN_TOOLS

BUILT_IN_TOOLS

Agent

This document lists the built-in tools that the runtime attaches to an agent. It explains what each tool does and when the…

n8n10d209k
@n8n-io@n8n-ioInstall Agent

Questions about usage-metering.

Which coding agents can use usage-metering?
usage-metering installs in Claude Code and Cursor: each loads subagents from .claude/agents, so copy the file there. Flowy's auto-invocation runs in Claude Code only.