Manual monitoring systems don't scale. See how to use Monitoring as Code to scale your monitoring setup and make it easy to use for you and your teammates.
When you first get started with monitoring, the UI feels like the natural choice. It’s quick to open your browser, plug in a URL or endpoint, set a status code, and start pinging your app. In just a few clicks, you’ve got your critical pages covered and visibility into uptime.
But this setup doesn’t scale for long. As your product evolves, so do your monitoring needs. More environments, more checks, more edge cases, and more people making changes.
Suddenly, what started as a simple setup turns into something fragile: hard to maintain, easy to break, and impossible to audit.
That’s when it’s time to shift from clicking around in the UI to managing your monitoring like the rest of your infrastructure and application: as code.
As systems grow, the cracks in a UI-based setup start to show. The workflow that once felt simple now gets in the way of moving fast and staying reliable.
For example:
Eventually, teams start looking for something better—something that fits into the way they already build and deploy software:
That’s the promise of Monitoring as Code and why more teams adopt it as they grow.
Monitoring as Code addresses all these problems. Just like Infrastructure as Code transformed the way teams manage cloud resources, Monitoring as Code gives you a way to manage your monitors with consistency, structure, and automation.
Instead of relying on manual UI edits, you define your checks, alert channels, and groups as code. They live in your Git repo, are version-controlled, reviewed via pull requests, and deployed through CI/CD—just like the rest of your infrastructure.
Here’s an example of a simple browser monitor running a Playwright script defined with code:
import { BrowserCheck, Frequency } from 'checkly/constructs'
import * as path from 'path'
new BrowserCheck('browser-check-1', {
name: 'Browser check #1',
frequency: Frequency.EVERY_10M,
locations: ['us-east-1', 'eu-west-1'],
code: {
entrypoint: path.join(__dirname, 'home.spec.js')
}
})
import { expect, test } from '@playwright/test'
test('Visit Checkly HQ page', async ({ page }) => {
const response = await page.goto('https://checklyhq.com')
// Test that the response did not fail
expect(response.status()).toBeLessThan(400)
})
By codifying both the infrastructure and the test logic, you ensure your monitoring is reproducible, reviewable, and easy to scale across teams.
Say you’ve updated your login endpoint. In the UI, this means manually editing every check that uses the old URL: across staging, production, and anywhere else.
With Monitoring as Code, it’s a one-line change in your codebase:
const loginCheck = new ApiCheck('login-check', {
name: 'Login endpoint check',
request: {
url: 'https://api.example.com/v2/login', // just update this line
method: 'POST',
},
assertions: [/* ... */],
})
Update one or more monitoring resources, commit the change, let your pipeline deploy it, and your monitoring stays in sync with your application automatically. No clicking, no copy-pasting, no missed updates.
💡 Teams like LinkedIn have made this shift already. After migrating from internal tools and moving monitoring into code, they were able to deploy checks 99% faster. They gained transparency, reproducibility, and removed manual friction from their workflows, exactly what you want when your infrastructure is getting more complex.
If you’ve already set up all of your checks in the UI, then you’ve probably been too hesitant to migrate to Monitoring as Code. Losing your history and rebuilding all that from scratch in code can take a lot of time and energy.
That’s exactly why we built checkly import
.
This new CLI feature lets you pull your existing UI-managed checks, alert channels, and groups into your codebase — cleanly and safely. You get all the structure and benefits of Monitoring as Code without starting over.
To start, copy and paste this command into your terminal:
$ npx checkly import
The command generates code for your existing resources, but doesn’t commit or deploy anything. You can review everything locally, make adjustments, and only commit what you’re ready for. It’s a safe, incremental step toward a fully code-based monitoring setup.
If you’re new to Checkly’s CLI, it’s easy to get started:
npm create checkly@latest
npx checkly login
npx checkly import
This approach gives you the best of both worlds: the monitoring setup you’ve already built in the UI, and the version-controlled structure your team needs as you grow.
Check out the docs for more details.
To get the most out of Monitoring as Code, it’s important to treat it like any other part of your software stack—modular, testable, and easy to evolve. Here are some practices we’ve seen work well across teams:
Monitoring as Code works best when it’s treated as a living part of your system—not just a static config you set once and forget.
Scaling your monitoring setup isn’t just about adding more checks—it’s about making your monitoring smarter, more consistent, and easier to maintain as your team and infrastructure grow.
UI-based workflows are great for getting started, but they fall short when it comes to collaboration, reuse, and reliability. Monitoring as Code gives you the structure and flexibility you need to move fast without losing control.
With checkly import
, you don’t need to start over. You can bring your existing checks into code gradually, test locally, and scale your monitoring setup with confidence.
If your team is growing—or your monitoring is starting to feel messy—this is your next step.
Getting started with the Checkly CLI - Run your first deploy.
Create Uptime Monitoring in minutes with Checkly - Use the CLI and Checkly Constructs to monitor every endpoint.
VIDEO: What’s new with Checkly - Learn the product vision behind uptime monitors, 1-second frequency checks, and Playwright check suites.