Last updated: May 29, 2026
Manage Synthetic Checks as Code
Synthetic checks are Dash0 assets that can be versioned and managed as infrastructure as code. This approach enables version control, automated deployment pipelines, consistent configuration across environments, and code review for monitoring changes.
Dash0 Operator for Kubernetes
Define synthetic checks as Dash0SyntheticCheck custom resources that sync to Dash0, enabling workflows and native Kubernetes management.
Example
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051apiVersion: operator.dash0.com/v1alpha1kind: Dash0SyntheticCheckmetadata:name: frontend-health-checknamespace: productionspec:enabled: truedisplay:name: Frontend Health Checkplugin:kind: httpspec:request:method: geturl: https://api.example.com/healthheaders: []queryParameters: []redirects: followtls:allowInsecure: falseassertions:criticalAssertions:- kind: status_codespec:value: "200"operator: is- kind: timingspec:type: responseoperator: ltevalue: 5000msdegradedAssertions:- kind: timingspec:type: responseoperator: ltevalue: 2000msschedule:interval: 5mlocations:- us-east- eu-weststrategy: all_locationsretries:kind: fixedspec:attempts: 3delay: 1slabels:team: platformservice: frontend
The Dash0 Operator for Kubernetes watches for Dash0SyntheticCheck resources in namespaces with a Dash0 monitoring resource deployed. When it detects changes:
- New synthetic check resources are created as checks in Dash0
- Modified resources update the corresponding checks
- Deleted resources remove the corresponding checks
Apply and Manage
1234567891011121314# Apply the synthetic checkkubectl apply -f synthetic-check.yaml# List all synthetic checkskubectl get dash0syntheticchecks -n production# View detailskubectl describe dash0syntheticcheck frontend-health-check -n production# Update the synthetic checkkubectl edit dash0syntheticcheck frontend-health-check -n production# Delete the synthetic checkkubectl delete dash0syntheticcheck frontend-health-check -n production
For more information, refer to the Dash0 Operator for Kubernetes documentation.
Dash0 Terraform Provider
Manage synthetic checks in your Terraform infrastructure alongside other cloud resources for unified infrastructure management.
Example Usage
12345678910111213141516171819202122232425262728293031323334353637383940414243terraform {required_providers {dash0 = {source = "dash0hq/dash0"version = "~> 1.0"}}}provider "dash0" {url = "https://api.dash0.com"auth_token = "auth_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}resource "dash0_synthetic_check" "frontend_health" {dataset = "production"synthetic_check_yaml = <<-EOTkind: Dash0SyntheticCheckmetadata:name: api-healthspec:enabled: truedisplay:name: API Health Checkplugin:kind: httpspec:request:method: geturl: https://api.example.com/healthassertions:criticalAssertions:- kind: status_codespec:value: "200"operator: isschedule:interval: 5mlocations:- us-eaststrategy: all_locationsEOT}
For more information, see the Dash0 Terraform provider documentation.
Dash0 CLI
Script synthetic check operations with the Dash0 CLI for automated deployments and batch operations.
Create from File
12# Create a synthetic check from a YAML filedash0 synthetic-checks create -f frontend-health.yaml
List Synthetic Checks
12# List all synthetic checksdash0 synthetic-checks list
Get Synthetic Check Details
12345# Get a single synthetic check as YAMLdash0 synthetic-checks get <id> -o yaml# Get check details in JSON formatdash0 synthetic-checks get <id> -o json
Update Synthetic Check
12# Update an existing synthetic checkdash0 synthetic-checks update <id> -f frontend-health-updated.yaml
Delete Synthetic Check
12# Delete a synthetic checkdash0 synthetic-checks delete <id>
Batch Operations
1234567# Create multiple checks from a directoryfor file in checks/*.yaml; dodash0 synthetic-checks create -f "$file"done# Export all checks for backupdash0 synthetic-checks list -o yaml > checks-backup.yaml
For more information, see the Dash0 CLI documentation.
Further Reading
- Manage Dashboards as Code — Define and manage dashboards using infrastructure as code.
- Manage Views as Code — Manage saved queries as infrastructure as code.
- Manage Check Rules as Code — Define and manage check rules using infrastructure as code.
- Manage Notification Channels as Code — Manage notification channels using infrastructure as code.