Skip to main content
Databases & applications

MySQL / MariaDB Health

Check the reachability, connect time, threads and uptime of a MySQL or MariaDB server.

The MySQL / MariaDB Health check connects to a MySQL or MariaDB server as an ordinary client and reports whether the connection works, how long connecting takes, how many threads are connected, and how long the server has been running. The check runs on the agent device you assign it to and connects from there over TCP to the host you enter. It runs on Windows, Linux and macOS (each in x64 and Arm64), every 5 minutes by default. The database server itself does not need to be an agent device; any agent device that can reach it over the network is enough.

Prerequisites

  • An account on the database server that may sign in from the agent device's address. To create the monitoring account on the database server, see Set up the database monitoring account.
  • For a meaningful thread count, the account needs the global PROCESS privilege. Without it, the account sees only its own connection and the check reports one thread on every run.

Steps

  1. Go to Devices and open the device.
  2. Click the Checks tab → Add Check → MySQL / MariaDB Health.

Settings

FieldTypeRequiredDefaultDescription
HostTextYes—Hostname or IP address of the database server, as seen from the agent device
PortIntegerNo3306TCP port of the server. The check replaces values outside 1–65535 with 3306
Database (optional)TextNo—Database the check connects to. Leave empty to connect without a default database
UsernameTextYes—Account the check signs in with
PasswordTextNo—Password of the account
SSL modeSelectNoPreferredPreferred encrypts when the server offers it; Required insists on an encrypted connection; None connects unencrypted
Warning connect time (ms)IntegerNo1000Connection setup time at or above which a warning is reported
Error connect time (ms)IntegerNo3000Connection setup time at or above which a critical result is reported

The two connect-time fields sit under Connect-time thresholds in the check form.

Results

SituationResult
Connected, connect time below Warning connect time (ms)OK
Connect time at or above Warning connect time (ms)Warning
Connect time at or above Error connect time (ms)Critical
Sign-in rejected (Authentication failed)Critical
Server unreachable, connection error or timeoutCritical
No host enteredWarning
Unexpected error in the checkFailure

Thresholds also trigger on equality. If Warning connect time (ms) is greater than Error connect time (ms), the check swaps the two values before evaluation. Connection setup has a fixed 10-second timeout.

Metrics collected

  • Connected (yes/no)
  • Connect time in milliseconds
  • Number of threads, counted via information_schema.PROCESSLIST
  • Server uptime in seconds (status value Uptime)

Notes

  • The check opens a new connection on every run and closes it afterwards.
  • The host is part of the check configuration. If you assign the check to many devices through a config package, each of them connects to the same server. Assign it to a single device instead, ideally the database server itself.