# Synthetic Monitoring From Your Own Regions and Networks — Including Your Databases

> A vendor’s cloud can tell you the public site is up; it can’t tell you it’s slow from Europe, that the internal API behind the VPN responds, or that the app can still read the orders database. Synthetic monitoring agents run checks where your customers and data are, with read-only database checks and per-region state.

Source: https://www.ticketresolve.ai/blog/regional-and-database-synthetic-monitoring-agents · Published 2026-11-14 · TicketResolve AI

**Most synthetic checks run from the monitoring vendor's cloud. That answers one question well: is the public site up from there? It can't answer the questions behind many support tickets: is it slow from Europe, is the internal API behind the VPN responding, can the app still read from the orders database?**

Here's how that gap shows up at a company that sells a food-delivery ordering system to restaurants in Europe and North America:

- **Tuesday 12:10.** Restaurants in Germany report that new orders aren't appearing. The cloud synthetic check (running from Virginia) is green.
- **12:30.** Support suspects the app. Engineering checks the public API: fine from the US.
- **12:50.** Someone finally tests from a Frankfurt VM: the public site is slow, and the internal order-routing API, only reachable inside the VPC, is timing out. The orders database is fine, but nobody knew that either.
- **13:15.** A second cloud check, which flaps between pass and fail, opens and closes an incident four times in an hour.

The checks existed. They just ran from the wrong place, couldn't reach what mattered, and didn't understand regions.

## First, the basics

- **A synthetic check** is an automated test that runs on a schedule, like "load the login page" or "call the health endpoint".
- **An agent** is a small program you run where a check should come from.
- **A region** is a location a check runs from, like Frankfurt or Virginia.
- **An internal address** like `10.0.0.5` is only reachable inside your network.
- **A database check** runs one read-only `SELECT` and checks the result.
- **A connection string** tells a program how to reach a database, including credentials.
- **A read-only transaction** is a database session that can't change anything; **rolling back** discards it.
- **A threshold** here is how many failures in a row open an incident.

**Why does this matter?** Customers experience your product from where they are, through systems you may not expose publicly. Running checks from those places, against those systems, catches the problems that cloud checks miss, and treating each region separately turns flapping alerts into clear regional answers.

## The problem, in plain terms

1. **Cloud checks** see only the public site from one place.
2. **Internal APIs** behind a VPN can't be checked from outside.
3. **Database health** needs a password nobody wants to share.
4. **Multi-region checks** flap when one region fails and another passes.
5. **Agent credentials** are easy to forget about.

## Run the check where the customer is

**An agent is a small program you run where a check should come from: a VM in another region, a container inside your VPC, a host next to the database. It asks for its checks every minute, runs them and reports the results. Because your agent makes the request, a check can target an internal address (`http://10.0.0.5:8080/health`) that a vendor's cloud could never reach, and that the vendor never calls.**

## Database checks without sharing the password

**A database check is one read-only `SELECT` (`SELECT count(*) FROM orders WHERE created_at > now() - interval '15 minutes'`) with an optional minimum row count and time limit. The connection string lives in the agent's environment (`TR_DB_ORDERS=…`). TR-AI only learns the name `ORDERS` and each result.**

**Read-only is enforced twice. When you save the check, anything that isn't a single `SELECT` or `WITH … SELECT` is refused: no writes, no `INTO`, no locks, no sleeps, no `;`. The agent checks again, then runs the query inside a read-only transaction and rolls it back. Use a read-only database user anyway.**

## Regions need their own state

**With checks from three regions, "failed twice in a row" has to mean something per region. Keep the failure count per check and region:**

- **One region reaching the threshold opens the incident, and the investigation, naming where it failed.**
- **A passing run from another region doesn't close it. Recovery waits until every region passes.**
- **Each run records its region, so the history shows "Frankfurt failing, Virginia fine" at a glance.**

**That's the difference between a regional outage and a flapping alert.**

## Tokens like any other credential

**Each agent gets its own token, shown once and stored only as a hash. Agent tokens appear in the Trust Center next to API keys and integrations, with a last-seen time and a one-click revoke; a revoked agent stops at its next request.**

## What stays in the cloud

**Browser journeys (signing in, clicking through a report) still run from TR-AI's cloud for now. Running them on agents is planned.**

## A worked example, start to finish

Here's the ordering company, with synthetic monitoring agents. The details are illustrative.

**Setup.** The SRE, Annika, opens **TR Investigate → Synthetic monitoring → Agents** and creates three agents: **Frankfurt** (a small VM), **Virginia** (a VM), and **VPC-EU** (a container inside the European VPC, next to the database). Each gets its own token, shown once.

**Checks.**

- **Public API health** from Frankfurt and Virginia.
- **Internal order-routing API**: `http://10.0.0.5:8080/health`, from VPC-EU only.
- **Orders database**: `SELECT count(*) FROM orders WHERE created_at > now() - interval '15 minutes'`, minimum 1 row, time limit 5 seconds. On VPC-EU's host, she sets `TR_DB_ORDERS=…` with a read-only user. TR-AI only learns `ORDERS`.

When she saves the database check, a colleague's suggestion to add `; DELETE …` for cleanup is **refused**: only a single `SELECT` is allowed.

**The next Tuesday, 12:05.**

- **Frankfurt:** public API slow; fails twice in a row. **Threshold reached for Frankfurt.**
- **Virginia:** public API passes.
- **VPC-EU:** internal order-routing API times out twice. **Threshold reached.**
- **Orders database:** passes; recent orders exist.

**12:06, the incident.** An incident opens, **naming where it failed**: Frankfurt (public API) and VPC-EU (order-routing). An investigation starts. Virginia's passes **don't close it**.

**12:08, support.** When German restaurants write in at 12:10, the incident is already open: *"Order routing in Europe is failing; database fine; US unaffected."* Support sends a regional holding message.

**12:40.** Engineering restarts the EU order-routing service. Frankfurt and VPC-EU pass. **Only when every region passes** does the incident recover.

**The history** shows "Frankfurt failing, Virginia fine" at a glance. No flapping.

**A month later.** Annika decommissions the Virginia VM and **revokes** its token in the **Trust Center**. The agent stops at its next request.

## Five more real-world scenarios

### 1. A write in a database check

**Situation.** Someone saves a check with `UPDATE`.

**How TR handles it.** Refused: only a single `SELECT` or `WITH … SELECT`.

### 2. A slow query

**Situation.** A database check could take a long time.

**How TR handles it.** Set a time limit; no sleeps are allowed.

### 3. One region flapping

**Situation.** Virginia passes and fails alternately while Frankfurt is down.

**How TR handles it.** Recovery waits until every region passes.

### 4. A browser journey

**Situation.** You want to test sign-in from Frankfurt.

**How TR handles it.** Browser journeys still run from TR-AI's cloud for now; agent-run journeys are planned.

### 5. A lost token

**Situation.** An agent's token may have leaked.

**How TR handles it.** Revoke it in the Trust Center; the agent stops at its next request.

## Before and after

**Before.** A green check from Virginia while Germany was down, an hour to find the internal API problem, and an incident flapping four times.

**After.** Checks from Frankfurt and inside the VPC, a regional incident opened before the first ticket, the database confirmed healthy, and recovery only when every region passed.

## How to tell it's working

- **Regional problems** are caught before tickets.
- **Internal APIs and databases** are checked continuously.
- **Incidents stop flapping.**

## Who it's for

- **SRE and platform teams** with internal services.
- **Support teams** serving several regions.
- **Security teams** who want agent credentials managed like keys.

## How it fits with the rest of TicketResolve

Agents extend **synthetic monitoring**. Failures open **incidents** and **investigations**, feed **predictive alerts** (synthetic check failures are one of the nine signals) and **Alerts explained**. Agent tokens sit in the **Trust Center** with your other credentials.

## Why the password stays on your agent

A database check needs a connection string, which includes credentials. Sending it to a cloud service means one more place it could leak. Keeping it in the agent's environment, and telling TR-AI only the name, means the password never leaves your network. Enforcing read-only twice (when you save, and on the agent) and running inside a rolled-back read-only transaction means even a mistake can't change data.

## Choosing where to run agents

Put an agent where a customer's experience starts: one per major region your customers use. Put another inside each private network that hosts services customers depend on. Put one next to each database whose health explains tickets. Start with the region that generates the most tickets and the service that most often fails quietly; add others as you learn where problems hide.

## Mistakes to avoid

- **Using a database user** that can write. Use a read-only user anyway.
- **Running every check** from one region.
- **Forgetting old agents.** Revoke tokens you no longer need.

## Do it in TicketResolve, step by step

**Where:** TR Investigate → **Synthetic monitoring** → **Agents** (`/dashboard/synthetic`). **You'll need:** somewhere to run each agent (a VM, a container, a host); a read-only database user for database checks. **Full guides:** [Synthetic checks: catch a break before customers do](https://www.ticketresolve.ai/docs/guide/synthetic-checks) and [TR Investigate reliability](https://www.ticketresolve.ai/docs/guide/tr-investigate-reliability).

1. **Create an agent** and copy its token (shown once).
2. **Run the agent** where the check should come from.
3. **Add HTTP checks**, including internal addresses the agent can reach.
4. **For database checks**, set `TR_DB_<NAME>` in the agent's environment with a read-only user.
5. **Write one read-only SELECT**, with an optional minimum row count and time limit.
6. **Assign checks to regions** and set the threshold.
7. **Manage tokens** in the Trust Center: last seen, and revoke.

**How to check it worked:** each run shows its region, and an incident names the regions that failed.

## Frequently asked questions

**What is an agent?**
A small program you run where a check should come from.

**Can it check internal addresses?**
Yes. Your agent makes the request, so it can reach what it can reach.

**Does TR-AI see the database password?**
No. The connection string stays in the agent's environment; TR-AI only learns the name.

**What database queries are allowed?**
A single read-only SELECT or WITH … SELECT; no writes, INTO, locks, sleeps or semicolons.

**How are regions handled?**
Failure counts are kept per check and region; one region can open an incident, and recovery waits for every region.

**How are agent tokens stored?**
Shown once, stored only as a hash, listed in the Trust Center.

**Can I revoke an agent?**
Yes, in one click; it stops at its next request.

**Can agents run browser journeys?**
Not yet. They still run from TR-AI's cloud; agent-run journeys are planned.

**How often do agents ask for checks?**
Every minute; they run their checks and report the results.
