1. What is Synthetic Monitoring for? #
Testing your services continuously, from around the world.
The principle #
Available in: ✕ OSS ✕ Enterprise ✓ Cloud probe agent: open source
Synthetic Monitoring runs tests at regular intervals from probes located in different regions: it detects an outage or slowdown before users, including at night when nobody visits the site. Results are metrics and logs in your stack, usable like any others.
Synthetic or RUM? #
Synthetic tests a known journey, regularly and comparably; RUM (Frontend Observability) measures real user diversity. They complement each other: synthetic alerts, RUM measures impact.
2. Check types #
From a simple ping to a browser journey.
Overview #
| Check | Checks | Use |
|---|---|---|
| HTTP | status code, response time, TLS certificate, page content | availability of a site or API |
| Ping, TCP, DNS | reachability, open port, DNS resolution | infrastructure, DNS records |
| Traceroute | network path and hops | network diagnosis between regions |
| Multi-HTTP | several chained requests, with variables extracted from a response | authentication then API call |
| k6 script | a full k6 script (requests, logic, checks) | complex API journey |
| k6 browser | a real Chromium browser: clicks, forms, Web Vitals | critical user journey |
Browser check example #
// k6 browser check: login journey
import { browser } from 'k6/browser';
import { check } from 'k6';
export const options = { scenarios: { ui: { executor: 'shared-iterations', options: { browser: { type: 'chromium' } } } } };
export default async function () {
const page = await browser.newPage();
try {
await page.goto('https://shop.example.com/login');
await page.locator('#email').type('probe@example.com');
await page.locator('#password').type(__ENV.PROBE_PASSWORD); // probe secret
await Promise.all([page.waitForNavigation(), page.locator('button[type=submit]').click()]);
check(await page.locator('h1').textContent(), { 'dashboard shown': (t) => t.includes('My account') });
} finally {
await page.close();
}
}Good to know : Since June 2026, you choose the k6 major version running scripted and browser checks; the k6 v1 channel has been deprecated since July 1, 2026. Public probes support every non-deprecated channel; check the version installed on your private probes.
3. Public and private probes #
Where tests run from.
Both types #
- Public: managed by Grafana Labs in many regions; ideal for a public site.
- Private: an agent you install in your network (container or binary) to test internal services, an intranet or a non-exposed API.
# Private probe in your network (token created in Synthetic Monitoring › Probes)
docker run -d --name sm-probe --restart unless-stopped \
-e API_TOKEN=$SM_PROBE_TOKEN \
grafana/synthetic-monitoring-agent:latest-browser \
--api-server-address=synthetic-monitoring-grpc-<region>.grafana.net:443 --verbose=true
# Variant without “-browser”: every check type except k6 browser checksWatch out : By default, private probes block k6 targets in private ranges (10.0.0.0/8): adjust the --blocked-nets option knowingly to test an internal service.4. Alerts, metrics and automation #
Using the results.
Alerts #
Each check offers built-in alerts by sensitivity level, or custom rules on its metrics. Alert on failure from several probes (a single probe may have a local network issue).
# Fewer than half of probes succeeding for 5 minutes
avg by (job) (avg_over_time(probe_success{job="shop-home"}[5m])) < 0.5Terraform #
resource "grafana_synthetic_monitoring_check" "home" {
job = "shop-home"
target = "https://shop.example.com"
enabled = true
frequency = 60000 # in milliseconds: every minute
probes = [data.grafana_synthetic_monitoring_probes.main.probes.Paris, data.grafana_synthetic_monitoring_probes.main.probes.Frankfurt]
labels = { team = "web" }
settings {
http {
valid_status_codes = [200]
fail_if_ssl = false
fail_if_not_ssl = true
}
}
}Best practices #
- A dedicated test account for authenticated journeys, with a password stored in probe secrets, never in the script.
- Choose probes close to your users, at least three regions.
- Cost depends on the number of executions: a browser check every minute from five regions means more than 200,000 executions a month; keep high frequency for critical journeys.
- Reuse k6 scripts between load tests (Grafana Cloud k6) and synthetic checks.
Commands to know #
Commands to know
probe_success: check success metric (1 or 0)probe_all_duration_seconds: total check durationgrafana_synthetic_monitoring_check: Terraform check resourcegrafana/synthetic-monitoring-agent:latest-browser: private probe image with browserk6 run script.js: test a script locally before publishing
Your turn #
- Create an HTTP check on your site from three probes, with certificate validation.
- Add a k6 browser check on the login journey.
- Declare the HTTP check in Terraform and delete the hand-made version.
Sources #
Checked in November 2026: Grafana Cloud offerings change fast, check Grafana's “What's new” page before relying on a detail.
