Core Principles of Monitoring as Code
Declarative Configuration: Define your monitors, alerts, and status pages, and more in code files using structured formats (JSON, YAML, TypeScript). Version Control: Store monitoring configs in Git alongside application code to maintain consistency and enable collaboration. Infrastructure Automation: Deploy monitoring changes through CI/CD pipelines with the same rigor as application deployments.Projects
A project is the unit of deployment in monitoring as code. It bundles your checks, alert channels, and other resources with shared defaults and is identified by alogicalId that is unique within your Checkly account. Every project is defined in its own checkly.config.ts (or checkly.config.js) file at the project root, using the Project construct.

checkly deploy shows a Managed by section in the Checkly UI. It links to the project and shows the logicalId the resource has within it, so you can trace any check back to the code that defines it.

Benefits of Monitoring as Code
- Consistency: Standardized monitoring across environments and teams
- Collaboration: Code reviews ensure monitoring best practices
- Reliability: Automated deployments reduce manual errors
- Auditability: Full change history and rollback capabilities
- Scalability: Template-based monitor creation for similar services
- AI Native: Use any LLM tooling to generate monitoring code, review code, and more.
Implementation with Checkly
Checkly supports monitoring as code through multiple approaches:- CLI: Write checks in TypeScript/JavaScript and deploy via
checkly deploy - Terraform Provider: Manage Checkly resources in your infrastructure code
- Pulumi Integration: Define monitoring using modern IaC patterns
- API: Programmatically manage checks in custom automation