Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions concepts/monitoring-as-code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: 'Define, version, and maintain your monitoring infrastructure along
canonical: 'https://www.checklyhq.com/docs/concepts/monitoring-as-code/'
---

**Monitoring as Code (MaC)** treats monitoring configurations like any other code artifactversion controlled, reviewed, tested, and deployed through automated pipelines.
**Monitoring as Code (MaC)** treats monitoring configurations like any other code artifactversion controlled, reviewed, tested, and deployed through automated pipelines.

With MaC, you can define, version, and maintain your monitoring infrastructure alongside your application code, reusing existing tests, code, data, and other assets to create a consistent, automated, and scalable monitoring setup.

Expand All @@ -22,6 +22,22 @@ To get started with Monitoring as Code, see our [Constructs](/constructs/overvie

**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 a `logicalId` 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](/constructs/project).

<Frame>
<img src="/images/projects-overview.png" alt="Projects page in the Checkly UI listing two projects with their repository, last deploy, sync status, and resource count" />
</Frame>

A single Checkly account can hold multiple projects. Each team can keep its monitoring code next to the service or repository it owns and deploy it independently, while all results stay in the same account. See [Logical IDs](/constructs/overview#logical-ids) for how projects and their resources are identified.

Every resource deployed from a project with [`checkly deploy`](/cli/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.
Comment thread
stefanjudis marked this conversation as resolved.

<Frame>
<img src="/images/projects-managed-by.png" alt="API check detail page in the Checkly UI with a Managed by row linking to the Storefront project and showing the logical ID api-products" />
</Frame>



## Benefits of Monitoring as Code
Expand All @@ -42,4 +58,4 @@ Checkly supports monitoring as code through multiple approaches:
- **[Pulumi Integration](/integrations/iac/pulumi/overview)**: Define monitoring using modern IaC patterns
- **[API](/api-reference/overview)**: Programmatically manage checks in custom automation

This approach ensures your monitoring evolves with your applications, maintaining accuracy and reducing maintenance overhead.
This approach ensures your monitoring evolves with your applications, maintaining accuracy and reducing maintenance overhead.
Binary file added images/projects-managed-by.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/projects-overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading