Database Monitoring
Database monitoring guide covering connections, query performance, indexes, and PostgreSQL and MySQL setup.
- CCM score
- 35 of 100
- skills.sh installs
- 470
- GitHub stars
- 396
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers performance baselines, real-time health checks, capacity planning, and incident troubleshooting for databases
- Includes SQL queries against
pg_stat_activityfor connection counts, long-running queries, and idle transactions - Provides seven reference guides for connection, query, table and index, performance schema, InnoDB, and dashboard monitoring
- Designed for teams setting up monitoring, analyzing metrics, or diagnosing database issues
Install
$ npx -y skills add aj-geddes/useful-ai-prompts --skill database-monitoring -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Database Monitoring
Table of Contents
Overview
Implement comprehensive database monitoring for performance analysis, health checks, and proactive alerting. Covers metrics collection, analysis, and troubleshooting strategies.
When to Use
- Performance baseline establishment
- Real-time health monitoring
- Capacity planning
- Query performance analysis
- Resource utilization tracking
- Alerting rule configuration
- Incident response and troubleshooting
Quick Start
Minimal working example:
-- View current connections
SELECT
pid,
usename,
application_name,
client_addr,
state,
query_start,
state_change
FROM pg_stat_activity
WHERE state != 'idle'
ORDER BY query_start DESC;
-- Count connections per database
SELECT
datname,
COUNT(*) as connection_count,
MAX(EXTRACT(EPOCH FROM (NOW() - query_start))) as max_query_duration_sec
FROM pg_stat_activity
GROUP BY datname;
-- Find idle transactions
SELECT
pid,
usename,
// ... (see reference guides for full implementation)
Details
- Repository
- github.com/aj-geddes/useful-ai-prompts
- Categories
- Databases, DevOps & Cloud
- First seen
- Jun 3, 2026
Questions
What does the database-monitoring skill do?
The database-monitoring skill sets up performance and health monitoring for databases, covering metrics collection, analysis and troubleshooting. Its SKILL.md includes SQL queries that check current connections, connection counts per database and idle transactions in PostgreSQL.
How do I install the database-monitoring skill?
Run npx -y skills add aj-geddes/useful-ai-prompts --skill database-monitoring -y in a project to install it. Once installed, database-monitoring lets the agent set up monitoring, analyze database metrics and troubleshoot database issues.
When should I use the database-monitoring skill?
Use database-monitoring for performance baseline setup, real-time health checks, capacity planning, query performance analysis and alerting rule configuration. It also covers incident response when a database misbehaves.
Which databases does database-monitoring cover?
The database-monitoring skill has reference guides for PostgreSQL monitoring setup, InnoDB monitoring and MySQL Performance Schema. It also covers connection, query, table and index monitoring plus an automated monitoring dashboard.
More from aj-geddes/useful-ai-prompts
All 258- Pull Request Automation470
- Session Management469
- Idempotency Handling468
- Network Analysis467
- Risk Assessment467
- Error Tracking466
- Query Caching Strategies466
- Clustering Analysis464
- Code Metrics Analysis464
- Spring Boot Application464
- Webhook Integration464
- Health Check Endpoints463
- Serverless Architecture463
- Classification Modeling462
- Transaction Management462
- Secrets Rotation461
- Deployment Documentation460
- Natural Language Processing460
- Runbook Creation460
- Autoscaling Configuration458
- Security Documentation458
- Stored Procedures458
- Profiling Optimization457
- Property Based Testing457
Similar to Database Monitoring
More Databasesdatabase-performance-debuggingSkillaj-geddes/useful-ai-prompts500 installsStructured debugging guide that finds slow queries, reviews execution plans, and tunes indexes across major databases.
sql-query-optimizationSkillaj-geddes/useful-ai-prompts529 installsAnalyze and tune slow PostgreSQL and MySQL queries using plans, indexes, and rewrites.
Postgres MCP ProMCP servercrystaldba3.5K starsConnects to PostgreSQL databases for schema browsing, SQL execution, query tuning, and health checks.
database-observabilitySkillgrafana/skills4.8K installsSetup guide that enables query-level database observability for MySQL and PostgreSQL in Grafana Cloud.
PostgreSQL performance Tuner MCP ServerMCP serverisdaniel31 starsAI-assisted PostgreSQL tuning over a live database: slow queries, plans, indexes, bloat, and health.
supabase-postgres-best-practicesSkillsupabase/agent-skills496.8K installsPostgres best-practices guide covering query performance, connections, RLS, schema, locking, and advanced features.