# Monitor Database Migrations in Real Time

Database migrations can fail without clear signals about lag, throughput, or errors. This skill designs CDC monitoring, metrics, dashboards, and alerts for migration workflows.

## Install

```bash
npx skillstore add sickn33/database-migrations-migration-observability
```

## Metadata

- Status: approved
- Slug: sickn33-database-migrations-migration-observability
- Skillstore revision: r2
- Version status: missing
- Tree hash: af01a5cd4eb97c3b27a7089b7d0bc55e93c58bec5975a2d067ef9b0bb1f6a455
- Author: sickn33
- GitHub username: sickn33
- License: MIT
- Repository: https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/database-migrations-migration-observability
- Ref: f9e2c34b4f19c7f3e6b0a1e93227b5f77cc12526
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands, network, env\_access
- Quality score: 69
- Public page: https://skillstore.pages.dev/skills/sickn33-database-migrations-migration-observability
- Manifest: https://skillstore.pages.dev/api/skills/sickn33-database-migrations-migration-observability/manifest

## Capabilities

- Provides MongoDB migration patterns with structured logs and Prometheus metrics.
- Outlines Debezium and Kafka monitoring for CDC events and replication lag.
- Defines migration metrics for duration, row counts, lag, throughput, and errors.
- Creates Grafana dashboard concepts and automated dashboard provisioning patterns.
- Shows anomaly alerts and CI health checks for migration workflows.

## Use Cases

- Instrument a Live Migration: Add logs, progress metrics, lag measurements, and error counters to an active database migration.
- Monitor a CDC Pipeline: Design Debezium and Kafka visibility for event throughput, consumer lag, and source-to-target delay.
- Build Migration Alerts: Define dashboards, thresholds, notifications, and CI health gates for production migration operations.

## Prompt Templates

### Choose Basic Migration Metrics

```
Recommend essential metrics for a [database type] migration. Include progress, duration, lag, throughput, failures, and practical alert thresholds.
```

### Design CDC Monitoring

```
Design monitoring for a Debezium pipeline from [source] to [target] through Kafka. Cover connector health, lag, throughput, errors, and recovery signals.
```

### Plan Dashboards and Alerts

```
Create a Grafana dashboard and alert plan for [migration]. Use Prometheus metrics and separate warning, critical, and recovery conditions.
```

### Architect Production Observability

```
Design end-to-end observability for [migration architecture]. Include metric definitions, label controls, CDC validation, anomaly detection, dashboards, alerts, CI gates, and rollback signals.
```

## Limitations

- The skill provides guidance and examples, not deployed monitoring infrastructure.
- Examples contain placeholders and require adaptation for each database, network, and authentication model.
- The skill does not validate configured endpoints, credentials, schemas, or migration data.
- The guidance does not replace load testing, rollback planning, or production review.

## Best Practices

- Define baseline throughput and lag before choosing alert thresholds.
- Use bounded labels to prevent excessive Prometheus metric cardinality.
- Test dashboards, alerts, credentials, and rollback signals in a staging environment.

## Anti Patterns

- Do not expose database credentials, API tokens, or webhook URLs in logs and metrics.
- Do not treat event counts alone as proof that source and target data match.
- Do not deploy untested alert thresholds that can hide failures or create alert noise.

## Security Audit

- Audited at: 2026-07-23T22:39:06.46\+00:00
- Summary: All 11 external-command alerts are false positives caused by Markdown fences or JavaScript template literals. Three examples perform outbound POST requests, including one that sends a Grafana bearer token to a configured endpoint. No prompt injection or malicious intent appears, but users should validate destinations and use least-privilege credentials.

## Stats

- Views: 127
- Downloads: 9
- Favorites: 0
- Popularity score: 0
