database-migrations-migration-observability

Implements CDC pipelines, Prometheus metrics, and Grafana dashboards for database migration monitoring.

2|Updated Jun 16, 2026
One-click install
npx skills add https://github.com/monang404/lunawave --skill database-migrations-migration-observability-monang404
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: database-migrations-migration-observability
Source: https://github.com/monang404/lunawave/tree/main/.agent/skills/database-migrations-migration-observability
Command: npx skills add https://github.com/monang404/lunawave --skill database-migrations-migration-observability-monang404

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Database migrations often run blind, leaving teams without visibility into progress, replication lag, or errors until failures surface in production. This Skill provides observability infrastructure for migrations, including real-time monitoring, anomaly detection, and automated alerting. ## Core Features & Use Cases - Observable Migrations: Instruments MongoDB migrations with Prometheus histograms and counters for duration, documents processed, and errors. - CDC Pipelines: Sets up Debezium connectors with Kafka consumers to stream change events and track replication lag between source and target. - Alerting & Dashboards: Detects anomalies like low throughput or high error rates, sends Slack/email alerts, and generates Grafana dashboards programmatically. - Use Case: During a zero-downtime PostgreSQL-to-MongoDB migration, use this Skill to stream CDC events through Kafka, monitor consumer lag in Prometheus, and get Slack alerts when error rates exceed thresholds. ## Quick Start Set up migration observability with Prometheus metrics, a Debezium CDC pipeline, and a Grafana dashboard for my database migration.

Frequently Asked Questions about database-migrations-migration-observability

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

FAQPage Schema
How do I monitor database migrations with Prometheus?▼

Instrument migrations with Prometheus histograms for duration, counters for documents processed, and error counters labeled by version and error type. Expose these metrics through a registry and scrape them during migration execution to track progress in real time.

How to set up Debezium CDC for database migration?▼

Deploy a Debezium connector via the Kafka Connect REST API with source database credentials and the pgoutput plugin for PostgreSQL. Consume change events from Kafka topics, then apply them to the target while tracking consumer lag and replication lag metrics.

Can I track replication lag between source and target databases?▼

Yes, use Prometheus gauges to record replication lag in seconds per source and target table pair. Compare CDC event timestamps against processing times to compute lag, and alert when it exceeds configured thresholds.

Does this work with MongoDB migrations?▼

Yes, the MongoDB migration wrapper wraps each migration in a session transaction while recording duration, document counts, and errors to Prometheus. Failed migrations increment error counters and log details through Winston for troubleshooting.

How do I detect anomalies during a database migration?▼

Compare current throughput against expected rows per second and flag low-throughput warnings when it drops below 50 percent. Trigger critical alerts when the error rate exceeds one percent, then route notifications through Slack or email.