The problem with dashboard-only monitoring
When monitoring configuration lives only in a web UI:- No version history — who changed that alert threshold last week?
- No review process — changes go live without team review
- No reproducibility — setting up a new environment means manual recreation
- Configuration drift — staging and production diverge silently
- Bus factor — only the person who clicked the buttons knows the setup
How Monitoring as Code works
MaC follows the same principles as Infrastructure as Code (IaC):- Define monitors, channels, and policies in a declarative format (YAML, HCL, or code)
- Version the config in Git alongside your application code
- Review changes through pull requests with team review
- Test by validating syntax and previewing changes before applying
- Deploy automatically through CI/CD on merge to main
Benefits
Reproducibility
Spin up identical monitoring for a new environment in seconds:Auditability
Git provides a complete history of every change:Review process
Monitoring changes go through the same PR review as code changes. Team members can catch issues like:- Missing alerts on critical services
- Overly aggressive check frequencies
- Incorrect assertion thresholds
Drift prevention
When someone changes a monitor through the dashboard, the next deploy reverts it to what’s in code. The YAML file is always the source of truth.Disaster recovery
If you need to rebuild your monitoring from scratch, the config file has everything. No screenshots of dashboard settings, no tribal knowledge.Declarative vs imperative
| Approach | Tools | How it works |
|---|---|---|
| Declarative | YAML config, Terraform HCL | Describe the desired state; the tool figures out what to create/update/delete |
| Imperative | SDK scripts, CLI commands | Write step-by-step instructions to create each resource |
Getting started
DevHelm supports MaC through multiple tools:YAML + CLI
Define everything in devhelm.yml — fastest path.
Terraform provider
Manage monitors alongside cloud infrastructure.
CI/CD patterns
Automate deploys on every push.
Migration guide
Move from dashboard-only to code-managed monitoring.