From aj-geddes-useful-ai-prompts-4
Monitors database performance and health: metrics collection, query analysis, connection monitoring, and alerting. Covers PostgreSQL and MySQL setups.
How this skill is triggered — by the user, by Claude, or both
Slash command
/aj-geddes-useful-ai-prompts-4:database-monitoringThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- [Overview](#overview)
references/automated-monitoring-dashboard.mdreferences/connection-monitoring.mdreferences/innodb-monitoring.mdreferences/performance-schema.mdreferences/postgresql-monitoring-setup.mdreferences/query-performance-monitoring.mdreferences/table-index-monitoring.mdscripts/validate-schema.shtemplates/migration-template.sqlImplement comprehensive database monitoring for performance analysis, health checks, and proactive alerting. Covers metrics collection, analysis, and troubleshooting strategies.
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)
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 |
npx claudepluginhub joshuarweaver/cascade-code-languages-misc-1 --plugin aj-geddes-useful-ai-prompts-4Monitors PostgreSQL, MySQL, MongoDB health via CLI queries for connections, throughput, disk usage, cache ratios, locks, with alerting thresholds and automation guidance.
Monitors transactions in PostgreSQL, MySQL, MongoDB for long-running queries, lock contention, idle sessions, and throughput using CLI queries and scripts.
Provides database monitoring, alerting, and observability for PostgreSQL (pg_stat_statements), MySQL (Performance Schema), MongoDB (mongostat), Redis (SLOWLOG). Covers Datadog, Grafana dashboards, metrics, thresholds for troubleshooting and setup.