RousselTMLEARNING

Observability

Synthetic Monitoring in Grafana Cloud

Synthetic Monitoring in Grafana Cloud: HTTP, DNS, TCP, Ping, Traceroute, multi-step, k6 script and browser checks, public and private probes, k6 versions, alerts, metrics, Terraform and best practices.

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 Monitoring

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 #

CheckChecksUse
HTTPstatus code, response time, TLS certificate, page contentavailability of a site or API
Ping, TCP, DNSreachability, open port, DNS resolutioninfrastructure, DNS records
Traceroutenetwork path and hopsnetwork diagnosis between regions
Multi-HTTPseveral chained requests, with variables extracted from a responseauthentication then API call
k6 scripta full k6 script (requests, logic, checks)complex API journey
k6 browsera real Chromium browser: clicks, forms, Web Vitalscritical 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 checks
Watch 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.5

Terraform #

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 duration
  • grafana_synthetic_monitoring_check : Terraform check resource
  • grafana/synthetic-monitoring-agent:latest-browser : private probe image with browser
  • k6 run script.js : test a script locally before publishing

Your turn #

  1. Create an HTTP check on your site from three probes, with certificate validation.
  2. Add a k6 browser check on the login journey.
  3. 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.

Related articles

Time-based vs event-based SLO: understanding, computing and choosing (with the Qonto example)

Differences between time-based SLOs (time slices, uptime) and event-based SLOs (good events over total): defi…

The observability trilemma: cost, completeness and performance, and how solutions resolve it

Understanding the observability trilemma (cost, data completeness, query performance), its three trade-offs, …

Grafana administration and security: organizations, teams, RBAC, service accounts and authentication

Running Grafana in a company: organizations, teams, folders, roles and RBAC, data source permissions, service…

Keep learning

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!