database-monitoring

Query Datadog Database Monitoring metrics and manage DBM monitors via the pup CLI.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It gives operators a direct way to inspect database performance in Datadog without navigating the UI, letting them query DBM metrics, check replication lag and slow queries, and manage database monitors from the command line. ## Core Features & Use Cases - Database Metric Queries: Retrieve PostgreSQL, MySQL, SQL Server, and Oracle metrics such as connections, query counts, lock waits, and replication lag through the Datadog Metrics API. - DBM Monitor Management: List, search, and inspect database-specific monitors, with guidance on creating connection pool, query performance, and replication alerts. - Database Host Discovery: List infrastructure hosts with DBM enabled to understand monitoring coverage. - Use Case: When a user asks "are my databases slow?", the agent queries slow-query and lock-wait metrics per host, summarizes anomalies, and recommends next steps such as reviewing query samples in the Datadog DBM UI. ## Quick Start Ask the agent to show your PostgreSQL database connection counts and replication lag for the last hour.

Frequently Asked Questions about database-monitoring

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

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

Use the pup CLI metrics query command with a database metric namespace, for example pup metrics query --query="avg:postgresql.connections.count{*}" --from="1h" --to="now". You must set DD_API_KEY, DD_APP_KEY, and DD_SITE environment variables first.

How do I check database replication lag in Datadog?

Query the replication metrics for your database technology, such as postgresql.replication.delay for PostgreSQL or mysql.replication.seconds_behind_master for MySQL, grouped by host. Use a time range like the last hour to see current lag.

Can I get query samples and explain plans through the Datadog API?

No, DBM query samples, explain plans, and normalized query metrics are not exposed through public API endpoints. These features are only available in the Datadog Database Monitoring UI at app.datadoghq.com/databases.

Which databases does Datadog Database Monitoring support?

Datadog DBM supports PostgreSQL, MySQL, SQL Server, Oracle, MongoDB, and Amazon DocumentDB, including managed variants like Amazon RDS, Aurora, Google Cloud SQL, and Azure SQL Database. Each technology has its own metric namespace.

Why does my database metrics query return no data?

Empty results usually mean DBM is not configured on the Datadog Agent for those hosts, or the metric namespace does not match your database technology. Verify the Agent has database access configured and DBM enabled, then list metrics with a filter like postgresql.* to confirm.