Prerequisites
- MariaDB 10.5+ (10.11 LTS or 11.x recommended)
- Network access from the HealOps environment to your MariaDB instance
- A database user with at least
SELECT+PROCESSprivileges (andSELECTonperformance_schemafor slow-query insights)
Setup
Option 1: Interactive CLI
Option 2: Environment variables
Add to your.env:
Option 3: Persistent store
Credentials are automatically persisted to~/.config/healops/integrations.json with 0o600 permissions:
Recommended user setup
Create a dedicated read-only user for HealOps so it cannot modify data:PROCESS privilege lets HealOps read information_schema.PROCESSLIST. REPLICATION CLIENT enables SHOW ALL SLAVES STATUS / SHOW SLAVE STATUS. SELECT on performance_schema is only needed if you want slow-query insights.
TLS configuration
SSL is enabled by default and uses the system CA bundle to verify the server certificate. SetMARIADB_SSL=false only in trusted local networks (development).
Investigation tools
When HealOps investigates a MariaDB-related alert, five diagnostic tools are available:Process list
Retrieves active threads frominformation_schema.PROCESSLIST, excluding sleeping connections. Results are sorted by duration so long-running queries appear first.
Global status
Returns a curated set of key metrics fromSHOW GLOBAL STATUS — thread counts, connection totals, slow query count, InnoDB buffer pool statistics, row lock waits, and uptime.
InnoDB status
RunsSHOW ENGINE INNODB STATUS and returns the engine status text, truncated to 4000 characters with a truncation marker appended when shortening occurs. Useful for investigating deadlocks, buffer pool pressure, and I/O patterns.
Slow queries
Readsperformance_schema.events_statements_summary_by_digest to list statements by average execution time. Requires performance_schema to be enabled.
If
performance_schema is disabled, the tool returns an informative note instead of failing. Enable it in my.cnf with performance_schema=ON.Replication status
RunsSHOW ALL REPLICAS STATUS (MariaDB multi-source replication; alias: SHOW ALL SLAVES STATUS on older builds) with a fallback to SHOW REPLICA STATUS. Returns all configured replication channels, each with I/O thread state, SQL thread state, seconds behind primary, last error, and log positions.
Verify
Troubleshooting
Security best practices
- Use a dedicated read-only user — never
rootor an admin account. - Always enable TLS in production (
MARIADB_SSL=true, which is the default). - Keep passwords out of source control — use
.envor the persistent store. - Rotate credentials periodically and scope them to specific hosts where possible.
Tracer