database-monitoring

aj-geddes/useful-ai-prompts · updated Apr 8, 2026

$npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill database-monitoring
0 commentsdiscussion
summary

Implement comprehensive database monitoring for performance analysis, health checks, and proactive alerting. Covers metrics collection, analysis, and troubleshooting strategies.

skill.md

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)

Reference Guides

Detailed implementations in the references/ directory:

Guide Contents
Connection Monitoring Connection Monitoring
Query Performance Monitoring Query Performance Monitoring
Table & Index Monitoring Table & Index Monitoring
Performance Schema Performance Schema
InnoDB Monitoring InnoDB Monitoring
PostgreSQL Monitoring Setup PostgreSQL Monitoring Setup
Automated Monitoring Dashboard Automated Monitoring Dashboard

Best Practices

✅ DO

  • Follow established patterns and conventions
  • Write clean, maintainable code
  • Add appropriate documentation
  • Test thoroughly before deploying

❌ DON'T

  • Skip testing or validation
  • Ignore error handling
  • Hard-code configuration values

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.647 reviews
  • Amelia Johnson· Dec 20, 2024

    database-monitoring reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Chaitanya Patil· Dec 16, 2024

    Keeps context tight: database-monitoring is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Carlos Garcia· Dec 8, 2024

    database-monitoring has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Diego Malhotra· Nov 27, 2024

    Keeps context tight: database-monitoring is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Naina Garcia· Nov 23, 2024

    database-monitoring fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Amelia Garcia· Nov 11, 2024

    I recommend database-monitoring for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Piyush G· Nov 7, 2024

    database-monitoring has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Shikha Mishra· Oct 26, 2024

    Solid pick for teams standardizing on skills: database-monitoring is focused, and the summary matches what you get after install.

  • Anika Malhotra· Oct 18, 2024

    database-monitoring is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Sofia Kim· Oct 14, 2024

    We added database-monitoring from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

showing 1-10 of 47

1 / 5