database-monitoring

database-monitoring is an agent for Claude Code from DataDog/pup. It costs 27 tokens per session (2,681 once invoked), scanned A, original, Apache-2.0.

A Datadog Database Monitoring agent for examining database health, performance measurements, query behavior, and database-specific alerts. Database Monitoring tracks how databases operate in production.

In plain words
What is it for?
Use it to query database metrics, inspect monitored hosts, analyze query performance, and create monitors for queries, connection pools, and database health.
Why use it?
It brings database performance information and monitor setup together, including cases where detailed query data is accessed through general metrics rather than a separate API.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the pup plugin — 12 skills, 50 agents shipped together

About the project

DataDog/pup is a command-line client that gives AI agents access to Datadog's observability platform. It lets agents retrieve and manage information across Datadog products such as metrics, logs, monitors, RUM, and security data, with structured output for automation.

DataDog/pup · 1,001 stars · on GitHub · datadoghq.com

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/datadog/pup/database-monitoring
Clone the repo
git clone --depth 1 https://github.com/DataDog/pup

Made for: Claude Code.

Or install pup, the plugin that ships this one along with the rest of its 12 skills, 50 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for database-monitoring

README.md
[![agentmods](https://agentmods.dev/badge/agents/datadog/pup/database-monitoring.svg)](https://agentmods.dev/agents/datadog/pup/database-monitoring)
Your own site
<a href="https://agentmods.dev/agents/datadog/pup/database-monitoring"><img src="https://agentmods.dev/badge/agents/datadog/pup/database-monitoring.svg" alt="Measured on agentmods" height="20"></a>
Per session 27 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,681 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00027 $0.02681
Opus 5 $0.00014 $0.01340
Sonnet 5 $0.00005 $0.00536
Haiku 4.5 $0.00003 $0.00268

Measured 6d ago against content hash 47211d8503cd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

database-monitoring scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/database-monitoring.md · 360 lines

How it starts

The opening of the file, as written. The whole thing — 360 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Database Monitoring Agent

You are a specialized agent for interacting with Datadog's Database Monitoring (DBM) features. Your role is to help users query database metrics, create DBM monitors, and understand database performance across their infrastructure.

Your Capabilities

  • Query Database Metrics: Retrieve database performance metrics through the Metrics API
  • Create DBM Monitors: Set up database-specific monitors for query performance, connection pools, and database health
  • List Database Hosts: View databases being monitored in your infrastructure
  • Analyze Query Performance: Help interpret database metrics and identify performance issues
  • Monitor Configuration: Guide users on DBM setup and configuration

Important Context

CLI Tool: This agent uses the pup CLI tool to execute Datadog API commands

Environment Variables Required:

  • DD_API_KEY: Datadog API key
  • DD_APP_KEY: Datadog Application key
  • DD_SITE: Datadog site (default: datadoghq.com)

Note on DBM API Access: Database Monitoring does not have a standalone API for querying DBM-specific data like query samples or explain plans. Instead, DBM data is accessed through:

  1. Metrics API - for database performance metrics
  2. Monitors API - for creating DBM-specific monitors
  3. Datadog UI - for query samples, explain plans, and detailed DBM analysis

Available Commands

Query Database Metrics

List all database-related metrics:

pup metrics list --filter="postgresql.*"
pup metrics list --filter="mysql.*"
pup metrics list --filter="oracle.*"
pup metrics list --filter="sqlserver.*"

Query database connection metrics:

pup metrics query \
  --query="avg:postgresql.connections.count{*}" \
  --from="1h" \
  --to="now"

Query database query performance:

pup metrics query \
  --query="avg:postgresql.queries.count{*} by {host}" \
  --from="4h" \
  --to="now"

Query database lock wait time:

pup metrics query \
  --query="avg:postgresql.locks.waiting{*}" \
  --from="1h" \
  --to="now"

Read the full file on GitHub · 360 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 360 lines · 27 tokens per session scan A 47211d8503cd

Subscribe to this mod's changes

database-monitoring is an agent published in the GitHub repository DataDog/pup (1,001 stars, last pushed yesterday), licensed Apache-2.0. It adds 27 tokens to every session and 2,681 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

database-specialist

Guards schema integrity; reviews every migration.

Hedde/trigger_tree · 0 tokens

ecto-schema-designer

Ecto schema architect - designs migrations, data models, and query patterns. Use proactively when planning database structure for new features.

oliver-kriska/claude-elixir-phoenix · 30 tokens

database-architect

Use this agent for database design and change work: schema design, indexing strategy, query optimization, migration safety, and engine selection. Trigger on "design a schema for", "this query is slow", "is this migration safe", "add an index", "Postgres or Mongo for this", or N+1 complaints. Returns schema/DDL with…

aayushostwal/nexus · 96 tokens

db-performance-auditor

Audits a .NET data-access layer end to end for performance — EF Core query patterns (N+1, projections, tracking), indexing gaps, DbContext configuration, connection resiliency, and bulk-operation opportunities — and produces a ranked report with fixes. Use when the user wants a database/EF performance review of a…

StefanTheCode/dotnet-ai-toolkit · 88 tokens

database-migration

Database migration and modernization specialist. USE FOR: planning database migrations, designing migration strategies, validating data integrity. DO NOT USE FOR: operational database management, routine backups.

ivegamsft/basecoat · 37 tokens

db-migration-engineer

Use when planning or executing a destructive change against a production database — schema migrations with backfills, periodic data imports, one-shot RPCs, drop-constraint operations, anything that mutates prod tables and cannot be trivially undone. Sister agent to db-schema-architect (schemas) and…

nonlinear-xyz/factory-kit · 155 tokens