Skip to main content
Checks make up the most important unit of your Checkly monitoring setup. Groups help you split them up according to your needs and keep complexity down.

Checks

Browser checks, API checks, Heartbeat monitors and Multistep checks share many arguments, configuration-wise, but also have their own unique ones. The type of your check is controlled using the type argument.

Browser checks

For example, a browser check can look as follows:
For tidiness and ease of use, it is recommended to store scripts in separate files, instead of using the inline option:
You can see all the configuration options for checks on the official Terraform registry documentation page.

API checks

On the other hand, an API check shares some part of the initial configuration, but is organized around the request argument instead of the script argument:
You can see all the configuration options for checks on the official Terraform registry documentation page.

Heartbeat monitors

For example, a heartbeat monitor can look as follows:
Upon applying your terraform configuration changes, you will be returned a read-only key value for the heartbeat ping token. The token is stored in your tfstate file.

Multistep checks

As with Browser checks, when constructing a Multistep check it is possible to provide the script directly in-line, but the recommended approach is to store scripts in separate files.
Multistep checks are only supported on runtime 2023.09 or later. See Runtimes for more details.
For example, a Multistep check can look as follows:

Tcp Monitors

TCP monitors verify the availability and responsiveness of services running on specific ports, ensuring they are reachable and operating within acceptable response time thresholds. Below is a sample configuration for a TCP monitor using Terraform:

Groups

Once you start having more than just a handful of checks, it makes sense to start looking into groups to keep things tidy:

Adding checks to groups

To add a check to a group, link it to that group by setting the group_id argument to the group’s resource ID. For example, to link the API check and the group from this article:
Locations and alert channel subscriptions defined at group level always trump the ones defined at check level. Double-check your config to make sure all checks are running from the intended regions and are set to alert on the correct channels.
You can see all the configuration options for groups, as well as more examples, on the official Terraform registry documentation page.