Skip to content
Nominal

Monitors / MySQL

MySQL

Log in with a connection URL, then run a version/status query or your SQL.

How it works

Target is a URL. The probe logs in and, with no request body, runs SELECT VERSION(). If a database is set, it also runs SHOW TABLES. A custom body is executed as SQL; the result is JSON in [BODY] (version, database, tables, or result for custom SQL).

Use mysqls:// or mariadbs:// for TLS. verify_tls controls certificate verification. Passwords are redacted on cards and status pages. MySQL does not use an HTTP/SOCKS proxy.

Target

Schemes: mysql, mysqls, mariadb, mariadbs. Default port 3306. Path is the database name.

mysql://user:pass@db.example.com:3306/app

Type fields

FieldWhat it does
request_bodyOptional SQL. Defaults to version, plus SHOW TABLES when a database is set.
verify_tlsWhen the URL uses TLS. Defaults to on.

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] < 50

Example conditions

[CONNECTED] == truehas([BODY].version) == truelen([BODY].tables) > 0

GraphQL

type is Mysql. Same fields as the admin, camelCase in the input (intervalSeconds, requestBody, probeIds).

mutation {
  createMonitor(input: {
    name: "Primary MySQL"
    type: Mysql
    target: "mysql://monitor:secret@db.example.com:3306/app"
    conditions: ["[CONNECTED] == true", "has([BODY].version) == true"]
  }) { id }
}

Terraform

Resource is nominal_monitor from returnearly/nominal. type is Mysql. 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_mysql" {
  name       = "Primary MySQL"
  type       = "Mysql"
  target     = "mysql://monitor:secret@db.example.com:3306/app"
  conditions = ["[CONNECTED] == true", "has([BODY].version) == true"]
}