Synthetic Monitoring in Practice: Uptime Checks and Transaction Scripts
Whether a site is available can be asked in two entirely different ways. The first is "is our process still running", answered by internal metrics. The second is "can a user in a browser actually finish what they came to do", answered only from outside. Synthetic monitoring answers the second question, while most teams' dashboards answer only the first.
The difference is not precision but perspective. Internal metrics start from the system itself: process alive, port listening, endpoint responding, thread pool occupied. They assume the premise "the user can reach me". A substantial share of user failures happen precisely on that premise — DNS resolving to the wrong address, an expired certificate that the browser refuses outright, a CDN unable to reach its origin, an edge WAF treating legitimate requests as attacks.
Synthetic monitoring works simply: external probes send real requests on a fixed schedule from multiple locations and assert on the result. It depends on nothing inside your stack, so when internal monitoring fails entirely it can still tell you whether the site is alive. This article covers which layer it fills in, how to pick probe locations without manufacturing false positives, what an HTTP check should actually assert, how frequency and thresholds determine detection time, what transaction tests are for and what they cost, and finally the four sources of false positives and a rollout order. For the broader framework, see What to Monitor.
1. Which Layer It Fills In
1.1 Internal and external views: why neither replaces the other
Internal metrics excel at "why", external probes excel at "whether". Investigation usually alternates between them: the probe first confirms users really cannot get through, then internal metrics locate the segment that broke. With only the latter you get "everything is green while users are complaining"; with only the former you get "we know it is down but not where".
Failures an external view can see and an internal one structurally cannot fall into four groups. The first is resolution and trust: DNS records edited to the wrong address, resolving to a stale IP, an expired certificate or an incomplete chain, a misconfigured SNI. All of these happen before your application receives the request, so the application side looks fine. The second is edge and path: a bad CDN configuration, an unreachable origin, a regional network outage, an anomalous carrier route. The third is interception at the entry point: a WAF rule killing legitimate traffic, rate limits blocking real users, a datacentre-level block. The fourth is a response that succeeded technically and failed commercially: status 200 carrying an error page, a maintenance notice, or a CAPTCHA.
What these share is that they occur outside or in front of "your service". No internal metric, log, or trace can see them, because they never reach that layer.
1.2 How it divides work with metrics and RUM
Three observation methods answer three different questions, and mixing them up misplaces the conclusion. Synthetic monitoring answers availability: does the service respond as expected, from a given location, along a given path. Metrics answer internal health: are processes, dependencies, and resources fine. Real user monitoring answers real experience: loading and interaction under actual devices and networks.
Where two of them conflict, use RUM for experience and lab tooling for diagnosis. To ask "is this feature usable worldwide", use synthetic monitoring, because it chooses locations and paths and can replay them at will. To ask "does it feel fast to users", use frontend RUM and Core Web Vitals, since only real user data represents a distribution. To ask "which internal hop is slow", use distributed tracing.
One underrated relationship: synthetic data is stable, comparable, and free of privacy burden, which makes it the best observation source for an availability SLO, while RUM data reflects the real distribution and suits performance SLIs. When both feed one SLO, be explicit about which segment each owns, or the same SLO report will show two inconsistent availability numbers. For how to write that down, see the SLO and SLI Template.
2. Probe Locations: Where You Measure Decides What You Conclude
The conclusion depends on the location. The same site probed from the same datacentre is "fully healthy" and probed from a mobile network in another country may be "all timeouts". Choosing the wrong location does not give you wrong data; it gives you data nobody can interpret.
2.1 Cover where your users are, on the networks they use
The right basis for choosing locations is where your users are and what networks they use, not which servers you happen to own. If most users come from one region, that region needs a probe. If a large share is on mobile networks, probing only from cloud datacentre networks misses an entire class of path problems.
The second basis is which paths are most likely to fail. Cross-carrier, cross-border, and CDN-edge paths have entirely different failure probabilities from a same-city, same-carrier path. Probes should cover those different path shapes rather than stacking three machines in one datacentre — three machines in one rack test one path.
The third basis is business structure. If the site is deployed in multiple regions or uses geographic routing such as smart DNS or Anycast, every entry point a user group is routed to deserves a probe. Otherwise a configuration error that only affects one region can stay invisible for a long time.
2.2 Probe failures and majority voting
A probe is a system too, and it fails: exhausted node resources making checks time out, an egress failure in the probe's own datacentre, a middle link between probe and target going bad. In those cases the site is fine and the alert fires anyway.
Two countermeasures. First, multiple locations plus majority voting: run each check from at least three locations and only declare a failure when most of them fail. A single location failing becomes "this probe is suspect" and enters observation instead of waking anyone. This rule eliminates most probe-side false positives.
Second, monitor the probes themselves: record a failure-rate and latency baseline per location, and when one location deviates sharply from the others, suspect the probe first. This is cheap to implement — it is the same data viewed along another dimension — yet it is what makes synthetic monitoring trustworthy.
3. What an HTTP Check Should Assert
3.1 Asserting only status 200 is the most common waste
Almost every "we had monitoring and still heard it from users" story traces here: the check asserts a 200 and nothing else. But a 200 can mean many things — the normal page, a degraded page with an error banner, a maintenance notice, "the system is busy, try again later", a WAF challenge, stale content served from a CDN cache, or a blank page with only a skeleton rendered.
In all those cases the service is available at the HTTP layer and unavailable at the user layer. Your monitoring says all clear, so your detection time equals your complaint time.
The fix is small: add a content assertion. Check that the page contains text that is stable and uniquely belongs to it — part of the title, the label of the primary button, or an element identifier that only exists when the page renders correctly. Choose an anchor that is always present when business is normal, always absent when it is broken, and unaffected by minor copy edits.
3.2 Five things that must be asserted together
A complete HTTP check asserts five things. Miss any one and a whole class of failure stays invisible.
First, a content keyword, to catch "200 but it is an error page". Second, TLS certificate validity and chain integrity, to catch "expires in three days" and "an intermediate certificate is missing so some clients fail the handshake"; certificate checks must run at the layer where users actually handshake, and the certificate on a CDN or load balancer is often not the one on the origin. Third, DNS resolution results, to catch "resolving to a stale IP" and "one region resolving to the wrong record". Fourth, the redirect chain, to catch multiple hops, hops to the wrong hostname, hops down to plain HTTP, or a hop to a login page. Fifth, response time, to catch "reachable but too slow to use" — and look at the distribution across locations, not a single value.
All five are available from the same request at near-zero marginal cost, and each covers a class of failure internal monitoring cannot see. Doing only the first and fifth is the most common half-configuration.
3.3 Brittle assertions are the opposite extreme
The mirror-image mistake is over-tight assertions: matching a whole HTML block, asserting a specific build number, asserting the name of the first product in a list, asserting response time to the millisecond. All of these end the same way — red on every normal release, and two weeks later everyone has learned to ignore them.
The balance point is to assert business semantics, not implementation details. Ask of each assertion: would this text or element change when business is normal but copy is edited, styling is reworked, or an A/B test launches? If yes, do not assert it. Stable anchors are usually the page title, the primary action button, or the existence of a key section, never specific wording.
One practical technique: split the check into two levels. One or two core assertions prove "this is the right page"; everything else is collected as information — response time, certificate days remaining, redirect count — and recorded without alerting. That way copy edits cannot interrupt you, and diagnostic detail is not lost.
4. Frequency, Thresholds, and Detection Time
4.1 The arithmetic of detection time
From failure to notification there are four delays: failure to the next probe, probe failure to the alert condition being met, alert generation to delivery, and delivery to a human responding. Synthetic monitoring controls only the first two, and those are set by two parameters: probe frequency and consecutive-failure count.
The arithmetic is easy. Probing every minute with a two-failure threshold means the worst case is a failure right after a probe: wait one minute for the first failure, another for the second, and the alert fires in minute three — three minutes worst case. Three consecutive failures at the same frequency makes it four minutes. Probing every five minutes with two failures is a bit over ten minutes.
That arithmetic is worth writing down at design time, because it is the direct answer to the business question "how soon will we know". Many teams configure monitoring and never compute it, discovering during an incident that their promised "minute-level detection" is actually ten-minute-level.
4.2 Higher frequency raises a different quality problem
Raising frequency shortens detection, and the cost is not only probe quota. The higher the frequency, the larger the share of total traffic your probes represent, and the more noise they generate in access logs, WAF logs, and rate-limit counters. The higher the frequency, the more likely a probe lands on transient network jitter or an occasional slow backend query, which pushes you toward a consecutive-failure filter — and that filter pushes detection time back up.
So a triangle forms: frequency, false-positive rate, and detection time cannot all be optimal. A workable trade: high frequency for critical paths, such as once a minute with two consecutive failures, accepting three minutes worst case; low frequency for ordinary pages, such as every five to ten minutes with two or three consecutive failures, accepting slower but quieter. Do not use one set of parameters for every check — that is simultaneously too slow for critical paths and too noisy for peripheral pages.
A hard constraint is easy to miss: probe frequency must not approach the target's cache TTL, rate-limit window, or autoscaling reaction time, or the probing itself changes the system under test — punching through the cache every time, or triggering scale-out repeatedly.
4.3 Consecutive failures and tiered notification
"Consecutive failures" is not only a noise-reduction parameter; it defines the semantics of the alert: a single failure is "suspicious", consecutive failures are "confirmed". That semantics should show up in notification tiers — a single failed probe at one location goes to a team channel for observation, and only a multi-location consecutive failure escalates to phone or SMS.
Tiering should also bind to which check it is. A critical path being unusable (home page, login, payment entry) goes to the highest tier; a secondary page going down opens a ticket; a change in a non-critical content assertion is merely recorded. For the organisational method behind tiers, see Alerting Design Basics; for channels and on-call arrangements, see the Monitoring and Alerting Guide.
5. Transaction Tests versus Single-Page Checks
5.1 The page is there but the business is broken
A single-page check verifies that a URL returned the expected content. It catches a page being down, and it cannot catch "every page is up but the business is broken": the login button does nothing, the cart count does not update, checkout reports a stock validation failure, the payment callback never arrives.
A transaction test performs multiple steps along a complete path and asserts at each one, so it covers this class. Its assertion granularity is "did this step advance", which means it can report the step that broke rather than "the flow failed".
It also does something single-page checks cannot: validate cross-system chains. Login goes through the auth service, adding to cart through inventory, checkout through pricing and coupons, payment through a third-party gateway. If any link fails silently, no single-page check notices.
5.2 Maintenance cost and data cleanup
The costs of transaction tests must be stated plainly, or you will build a script nobody maintains after two weeks.
First, selector fragility. Locators based on CSS classes or DOM structure break on every redesign. Locate by accessibility semantics instead — role plus visible text, the way a user finds a button — which mirrors the real interaction path and survives redesigns better.
Second, test data. Transactions create real records: registered users, placed orders, sent emails, reserved stock. Those must be cleanable, otherwise after a month the database is full of test orders and business reports are polluted. Common practice: tag test accounts, use identifiable test products, stop before the final irreversible step (do not actually pay), and clean up on a schedule.
Third, environment isolation. Testing production finds real problems but carries risk; testing staging is safe but staging config often differs from production, so a passing run proves little. A practical split: run one read path and one critical write path against production, and everything else against staging.
5.3 The right scope is critical paths, not the whole site
Transaction tests should cover paths where failure directly costs revenue or data — usually three to five: login, search through to detail, add-to-cart through to order, payment, and core content reading. They share long chains, multiple systems, and clear consequences.
They should not cover the whole site. Every transaction script is code that needs maintenance; at twenty scripts the maintenance cost exceeds the value of what they find, and most of those paths would fail together with the critical ones anyway.
To decide whether a path deserves a script, ask three questions: how many systems does it cross, would users leave immediately if it broke, and can it be asserted in a handful of steps? Build it when all three answers point the right way.
6. The Four Sources of False Positives
6.1 Probes and networks
Probe-side failure is the first source, handled as described earlier: multiple locations, majority voting, and baselines per location. It has a subtler form too: one middle link between probe and target degrades temporarily, so only that location's latency inflates. This is especially common with latency alerts, which is why latency alerting should key off a median or quantile across locations rather than any single probe.
The second source is the target's own edge protection. A WAF treats probe IPs as automated traffic and blocks them, rate limiting counts high-frequency probes against a quota, a bot-management system returns a challenge because one IP hits the same URL with the same user agent too often. In all three cases the probe sees something completely different from what a user sees — typically a 403, a 429, or a CAPTCHA page, which your "200 only" check dutifully reports as a failure.
The fix is to separate probe traffic from real traffic explicitly: configure allow rules or dedicated rules for probe sources, use an identifiable user agent so logs and bot management can distinguish them, and if needed probe from fixed IP ranges that are allowed at the edge. Skip this and synthetic monitoring and your WAF will fight each other indefinitely.
6.2 Frequency-triggered protection and brittle assertions
The third source is probe frequency itself tripping protections: exceeding a third party's rate limit, triggering a CDN's anti-scraping rule, or making autoscaling thrash in a way that affects real users. The signature of this class is "it recovers when we stop probing", which is easy to misread as an intermittent fault.
The fourth source is brittle assertions, already covered: copy edits, A/B tests, and redesigns turn them red. Its signature is "appears only after a release and clusters on content assertions". The cure is to converge assertions on business semantics and demote volatile details to collected information.
All four share one handling principle: treat "is the probe itself trustworthy" as something to observe. Record a failure-rate and latency baseline per location, and tag every alert afterwards as a true failure or a false positive; after three months you can compute the signal-to-noise ratio of your own probe setup. That number says more about whether monitoring is trustworthy than any alert count. For the tooling trade-off between managed services and self-hosting, see Cloud Monitoring Service Comparison and Deploying Uptime Kuma.
7. Rollout Order and a Self-Check
7.1 From zero to a usable probe setup
Step one is a single thing: probe the home page and one core endpoint from two locations, every minute, alerting after two consecutive failures. The goal is to exercise the chain from failure to notification to someone acting, and to prove the channel actually delivers. That takes half a day and covers the most common incident shape — the site being entirely down.
Step two adds assertions: keyword, certificate days remaining, DNS resolution, and redirect chain, checked and recorded for those two probes. No frequency or alert changes, just an upgrade from "200 means fine" to "200, correct content, valid certificate".
Step three adds a path: build one transaction test for the single most critical journey, keep it running for a month, and only then consider a second. At the same time, tier everything: critical goes to phone, secondary opens a ticket, collected items stay on the dashboard.
Step four is a signal-to-noise review. Each month, count alerts per check and how many were real; downgrade or delete checks that are loud with zero real failures, and add coverage for failure types you missed. This is what turns synthetic monitoring from "a pile of checks" into "a layer you trust".
7.2 A self-check table
| Check | Criterion | What to do if it fails |
|---|---|---|
| External view covered | At least one probe independent of internal components | Add the outermost probe first |
| Locations match users | Major regions and carriers represented | Add probes by user distribution |
| Majority voting | Failure declared only when most locations fail | Add locations or a voting rule |
| Not status-code only | A content keyword assertion exists | Add one stable anchor |
| Certificate and DNS checked | Days remaining and resolution recorded | Fold into the same check |
| Detection time computed | A stated worst-case "how soon we know" number | Compute it from frequency and retries |
| Critical path covered | At least one transaction test running | Pick the most important one |
| False positives attributed | Every alert tagged real or false | Start tracking the ratio |
Maturity here is not measured in check count but in one capability: when a user says "the site is broken", can you answer within two minutes that you see it and which segment is at fault? If yes, twenty checks suffice; if no, two hundred are just manufacturing noise. For how availability SLIs and error budgets connect to probe data, see SLO and Error Budget Practice.
Source: Datadog documentation (Synthetic Monitoring overview, check types, and private locations). Compiled and interpreted by 16IDC.
Integration & Code Examples
Example 1: A multi-target probe with blackbox_exporter
# blackbox.yml: one probe module asserting status, body keyword, and certificate
modules:
http_2xx_keyword:
prober: http
timeout: 10s
http:
valid_status_codes: [200]
fail_if_body_not_matches_regexp:
- "Sign in"
# prometheus.yml: multi-target mode, the monitored address arrives as a URL param
scrape_configs:
- job_name: blackbox
metrics_path: /probe
params:
module: [http_2xx_keyword]
static_configs:
- targets:
- https://www.example.com/
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: blackbox-exporter:9115
The keyword assertion is what prevents false positives: with status codes alone, an error page served with 200 counts as healthy.
Example 2: A one-off probe from the command line
# All timing phases at once: resolution, TLS, first byte, total
probe() {
curl -sS -o /tmp/body.html -L --max-time 10 \
-w 'code=%{http_code} dns=%{time_namelookup} tls=%{time_appconnect} ttfb=%{time_starttransfer} total=%{time_total} url=%{url_effective}\n' \
"$1"
}
probe https://www.example.com/
# Content assertion: a missing keyword means an error page, not a healthy site
grep -q 'Sign in' /tmp/body.html || echo 'ALERT: keyword missing'
# Certificate expiry, folded into the same check
echo | openssl s_client -connect www.example.com:443 -servername www.example.com 2>/dev/null \
| openssl x509 -noout -enddate
Keep the TLS check in the same collection cycle as the HTTP check, or an expiring certificate becomes a separate incident discovered a day late.
Limitations
- It depends on nothing inside your stack, so when internal monitoring fails entirely it can still tell you whether the site is alive.
- Failures an external view can see and an internal one structurally cannot fall into four groups.
- Choosing the wrong location does not give you wrong data; it gives you data nobody can interpret.
- All five are available from the same request at near-zero marginal cost, and each covers a class of failure internal monitoring cannot see.
- That way copy edits cannot interrupt you, and diagnostic detail is not lost.
FAQ
What prerequisites does a first probe need?
Two things: probe locations and a notification path. Start with the homepage plus one core endpoint on two locations, every minute, alerting after two consecutive failures — half a day of work that wires failure to notification to owner. The same request should also return a content keyword, certificate days left, DNS result and redirect chain.
Why do alerts go red right after every deploy?
Usually brittle assertions, one of four sources. The rest are probe or transit-path degradation, WAF and rate limits treating probes as attack traffic, and probe frequency tripping bot protection or autoscaling. When red follows releases, swap full-HTML matching for a stable anchor such as the page title or the primary button.
Does synthetic monitoring replace RUM or sit alongside?
It sits alongside. Synthetic checks answer availability, internal metrics answer why, RUM answers real experience. Ask whether a function works worldwide and only external probes can pick locations and paths; ask how fast users feel it and you need RUM; ask which hop is slow and you need tracing. State each one's coverage inside a single SLO: availability from probes, the 95th-percentile performance SLI from RUM.
How long until an outage pages someone?
Do the arithmetic with frequency and consecutive failures. Probing every minute with two consecutive failures gives 3 minutes worst case: one minute for the first failure, another to confirm, assuming the outage starts just after a probe. Three failures makes it 4 minutes; every five minutes with two failures, just over 10.
Related Providers
- Uptime Kuma: when HTTP and keyword checks run on your own server with a public status page.
- Datadog: when synthetic checks must correlate with APM traces and browser tests on one platform.
Community & Resources
-
Monitoring & Alerting: other coverage in this category.
Official docs and communities -
Prometheus: multi-target exporter pattern — Why blackbox_exporter uses /probe with the target as a parameter.
-
blackbox_exporter configuration — Every assertion, timeout, protocol, and redirect option.
-
Prometheus configuration reference — Exact syntax for relabel_configs and scrape params.
-
Alertmanager — Grouping, inhibition, and silences decide your signal-to-noise ratio.
Learning resources and tools
- Prometheus overview — The overall model from scraping to querying.
- blackbox_exporter repository — Releases and example configurations.
- Uptime Kuma — Low-cost dashboards and notification channels to get started.
- Uptime Kuma wiki — Monitor types, push heartbeats, and status pages.
Original source: Datadog Docs ↗