Monitors / PostgreSQL
PostgreSQL
Log in with a connection URL, then list public tables or run your SQL.
How it works
Target is a Postgres URL. With no request body the probe runs SELECT version(). If a database is set, it also lists public tables. Custom SQL is stored under [BODY].result. TLS comes from postgresqls:// or sslmode / ssl-mode query params (require, verify-ca, verify-full). verify_tls maps to verify-full vs require when you do not set sslmode.
Schemes: postgres, postgresql, pgsql, postgresqls. Default port 5432. Default database when omitted is postgres. No HTTP/SOCKS proxy.
Target
Connection URL. Add ?sslmode=require (or verify-full) when the server expects TLS.
postgres://user:pass@db.example.com:5432/appType fields
| Field | What it does |
|---|---|
request_body | Optional SQL. Defaults to version, plus public tables when a database is set. |
verify_tls | Used when the URL enables TLS and you did not set sslmode. |
Placeholders
Available on this type. See conditions for operators and pat() / has() / len() / any().
[CONNECTED] [RESPONSE_TIME] [IP] [BODY] [DOMAIN_EXPIRATION]
Defaults
New monitors of this type start with:
[CONNECTED] == true[RESPONSE_TIME] < 50Example conditions
[CONNECTED] == truehas([BODY].version) == truelen([BODY].tables) > 0GraphQL
type is Postgres. Same fields as the admin, camelCase in the input (intervalSeconds, requestBody, probeIds).
mutation {
createMonitor(input: {
name: "Primary Postgres"
type: Postgres
target: "postgres://monitor:secret@db.example.com:5432/app"
conditions: ["[CONNECTED] == true", "has([BODY].version) == true"]
}) { id }
}Terraform
Resource is nominal_monitor from returnearly/nominal. type is Postgres. Shared arguments match the shared fields in snake_case (name, target, interval_seconds, probe_ids, channel_ids). Omitted conditions use the type defaults.
Type arguments: request_body, verify_tls.
resource "nominal_monitor" "primary_postgres" {
name = "Primary Postgres"
type = "Postgres"
target = "postgres://monitor:secret@db.example.com:5432/app"
conditions = ["[CONNECTED] == true", "has([BODY].version) == true"]
}