Stop hoping your alerts work. Start proving they do.
Litmus is a testing and validation framework for Prometheus Alertmanager configurations. It brings software engineering rigor to alert routing through automated regression snapshots, behavioral unit tests, and static analysis.
✅ Interactive Web UI — Explore routes, run tests, and view diffs in your browser
✅ Regression Testing — Detect unintended routing changes
✅ Behavioral Tests — Verify alert logic under real-world conditions
✅ Static Analysis — Catch shadowed routes and circular inhibitions
✅ CI/CD Ready — Fast validation, exit codes, clear reporting
✅ Production Parity — Uses official Alertmanager libraries
# Initialize workspace
litmus init
# Create regression baseline
litmus snapshot
# Validate configuration
litmus check
# See what changed
litmus diffLitmus includes a web-based UI for interactive testing and exploration.
# Start the web server
litmus serveThis launches a local web server that provides:
- Route Explorer — Interactively trace how an alert is routed.
- Test Lab — Run behavioral and regression tests from your browser.
- Diff Viewer — See regression test failures in a rich UI.
For a full guide, see the Interactive UI Guide.
- User Guide — How to use Litmus
- Configuration — Config schema
- Whitepaper — Vision and motivation
- Architecture — Design philosophy
- Full Docs Index — Complete documentation map
go install github.com/nyambati/litmus/cmd/litmus@latestdocker run ghcr.io/nyambati/litmus:latest litmus check# 1. Initialize
$ litmus init
Created litmus.yaml, tests/, .gitattributes
# 2. Create baseline
$ litmus snapshot
✓ Generated baseline: regressions/regressions.litmus.mpk
✓ YAML mirror: regressions/regressions.litmus.yml
# 3. Write a test
$ cat > tests/critical-alert.yml << 'EOF'
- name: "Critical alerts reach on-call"
system_state:
active_alerts: []
alert:
labels:
severity: critical
team: database
expect:
receivers: [database-oncall]
EOF
# 4. Validate
$ litmus check
Litmus Check: alertmanager.yaml
--------------------------------------------------
1. Sanity (Static Analysis)
[OK] No shadowed routes detected
2. Regressions (Automated)
[PASS] 42/42 cases passed
3. Behavioral (Unit Tests)
[PASS] 1/1 unit tests passedUses official Prometheus Alertmanager libraries. If a test passes in Litmus, it behaves identically in production.
- Regression — Catch accidental routing changes
- Behavioral — Verify intent under specific conditions
- Sanity — Find dead code and logical errors
Catch alert routing errors during development, not in production.
litmus diff # See exactly what changed
litmus check # Validate the changeWrite behavioral tests. Litmus verifies routing and silencing logic.
Use litmus snapshot --update to accept changes, then test with litmus check.
Version: 0.2.0-alpha
Status: Active Development
See Backlog for planned features.
Contributions welcome! See Engineering Standards.
- Questions? Check FAQ in User Guide
- Found a bug? File an issue
- Ideas? See Backlog or start a discussion
MIT License. See LICENSE file.
By the Litmus team. Part of the observability ecosystem.