← All features

Probe type · Business

Database probe

A real authenticated connection — not a TCP ping — that runs your own SELECT and asserts the result so you catch replication lag, queue backlogs, and silent data drift.

Why you need it

A Database probe opens an authenticated connection to your database on a schedule, runs either the engine's default ping or a custom SELECT you supply, and asserts the result. The gap between a TCP probe (only confirms the port is listening) and a full application probe (can't tell you about replica lag): a database-aware check that proves the engine is up, auth still works, the schema is reachable, and the data underneath looks right.

Day-one engines: PostgreSQL, MySQL / MariaDB, SQL Server, Redis. Most managed DBaaS products (Supabase, Neon, PlanetScale, Aurora, Cloud SQL, RDS, Upstash) re-expose one of these four on the standard port — they all work without a separate driver.

Two depth levels:

  • Level 2 — Auth + ping. Connect with the configured credentials, run the engine's hello query (SELECT 1 for relational engines, PING for Redis), capture the version string for drift detection. Two latencies measured separately — connect time and total query time.
  • Level 3 — Custom SELECT with assertion. Supply your own statement plus one of four assertion modes: RowCountAtLeast, RowCountExact, ColumnEquals, ColumnInRange. Server-side parser rejects non-SELECT statements and multi-statement chains.

The connection string is never persisted — it's assembled in-memory at check time from the individual fields. Password is AES-GCM encrypted at rest with Azure Key Vault as the master key.

Where it pays off

The right probe whenever the answer to "is the database healthy?" needs more than "the port is open":

  • Primary-replica lag — Level 3 SELECT against pg_stat_replication.replay_lag or SHOW REPLICA STATUS, assert with ColumnInRange "0..5" seconds.
  • Queue depthSELECT COUNT(*) FROM jobs WHERE status='pending', assert RowCountExact 0.
  • Redis cache reachability — Level 2 ping. If the cache disappears your app starts hammering the primary; catch it on the cache itself.
  • Connection-pool saturationSELECT count(*) FROM pg_stat_activity WHERE state='active' with ColumnInRange "0..80".

Not the right choice when: the database lives on a private network with no public ingress — StatusPulse probes run from public cloud regions. For private-network databases, use a Heartbeat probe driven by an in-cluster sidecar.

Configuration parameters

Field Type Required Default Description
Name string Required Human-readable label for the probe.
Engine PostgreSql | MySql | SqlServer | Redis Required PostgreSql Which database driver and default ping query the probe uses. Locked in at create time.
Host string Required Hostname or IP. Internal hostnames rejected at save time (SSRF guard).
Port integer Optional engine default Override default port (5432 / 3306 / 1433 / 6379).
Database name string Required (relational engines) Catalog / database name. Ignored for Redis.
Username string Required (when engine requires auth) Auth username.
Password string (encrypted at rest) Required (when username set) Auth password. AES-GCM encrypted.
Use TLS boolean Optional true Whether the connection negotiates TLS.
Trust server certificate boolean Optional false When on, accepts self-signed or untrusted server certs.
Connect timeout (ms) integer Optional 5000 Hard ceiling on the auth handshake.
Custom query string (SELECT only) Optional Custom SELECT (or Redis command) to run instead of the engine's default ping. Server-side parser rejects non-SELECT statements.
Assertion mode None | RowCountAtLeast | RowCountExact | ColumnEquals | ColumnInRange Optional None How to evaluate the custom query's result.
Expected value string Required if Assertion mode != None Parameter for the assertion. Integer for row-count modes; string for ColumnEquals; "min..max" for ColumnInRange.
Latency Degraded (ms) integer Optional 500 Total query latency above which the probe reports Degraded.
SLA target decimal (99.0-99.999) Optional Optional uptime SLO.
Paused boolean Optional false Master kill-switch.

Available on Business. Already on StatusPulse? See the full config in Help →

Related

Try Database probe in StatusPulse

5 probes, 1 status page, forever. No credit card. US or EU host — you choose.