Install Releem for MariaDB on Docker
Run the Releem Agent in a Docker container for MariaDB.
Prerequisites
Create the monitoring account from MariaDB permissions, including query visibility if you use the example below. Install Docker, and make sure the Agent container can reach MariaDB. Install Docker Compose only if you want to use the Compose method below. The Agent uses MySQL-compatible DB_* setting names for MariaDB connections. Choose a memory limit in MB for MariaDB; use 0 only when MariaDB can use the host's full memory budget.
Manual installation
Choose Docker or Docker Compose. Replace every bracketed value before starting the Agent.
Docker
Run the container with persistent configuration directories:
docker run -d --name releem-agent \
-e RELEEM_API_KEY="[RELEEM_API_KEY]" \
-e RELEEM_HOSTNAME="[SERVER_NAME]" \
-e DB_HOST="[MARIADB_HOST]" \
-e DB_PORT="3306" \
-e DB_USER="releem" \
-e DB_PASSWORD="[MONITORING_PASSWORD]" \
-e MEMORY_LIMIT="[MARIADB_MEMORY_LIMIT_MB]" \
-e RELEEM_QUERY_OPTIMIZATION="true" \
--restart unless-stopped \
-v /etc/mysql/releem.conf.d/:/etc/mysql/releem.conf.d/ \
releem/releem-agent:[VERSION_FROM_DOCKER_HUB]
Check the startup log:
docker logs --tail=100 releem-agent
Docker Compose
Create compose.yaml:
services:
releem-agent:
image: "releem/releem-agent:[VERSION_FROM_DOCKER_HUB]"
container_name: releem-agent
environment:
RELEEM_API_KEY: "[RELEEM_API_KEY]"
RELEEM_HOSTNAME: "[SERVER_NAME]"
DB_HOST: "[MARIADB_HOST]"
DB_PORT: "3306"
DB_USER: "releem"
DB_PASSWORD: "[MONITORING_PASSWORD]"
MEMORY_LIMIT: "[MARIADB_MEMORY_LIMIT_MB]"
RELEEM_QUERY_OPTIMIZATION: "true"
restart: unless-stopped
volumes:
- /etc/mysql/releem.conf.d/:/etc/mysql/releem.conf.d/
Start the Agent:
docker compose up -d
docker compose logs --tail=100 releem-agent
Use a version shown on Releem Agent tags on Docker Hub. Keep a Compose file containing credentials out of version control.
Connect the generated configuration to MariaDB
Complete this section if you want the MariaDB container to load configuration files generated by the Releem Agent. The Agent and MariaDB containers must use the same host directory.
- Mount the host directory in the MariaDB service or container:
services:
mariadb:
volumes:
- /etc/mysql/releem.conf.d/:/etc/mysql/releem.conf.d/:ro
- Add this line to the active MariaDB configuration file inside the database container:
!includedir /etc/mysql/releem.conf.d
- Review the generated configuration, then restart the MariaDB container during your approved maintenance window.
If you do not connect the generated configuration directory, add the following settings to the active MariaDB configuration so Releem can collect statement and slow-query data:
performance_schema=ON
performance-schema-consumer-events-statements-current=ON
performance-schema-consumer-events-statements-history=ON
slow_query_log=ON
Restart the MariaDB container after changing its configuration. Confirm that the settings are effective before relying on the related metrics or Query Optimization data.
Installer parameters
DB_HOST,DB_PORT,DB_USER, andDB_PASSWORDconfigure the MariaDB connection.RELEEM_API_KEYconnects the Agent to your Releem account.RELEEM_HOSTNAMEsets the server name displayed in the Dashboard.MEMORY_LIMITlimits the memory considered for MariaDB recommendations;0uses the host total.RELEEM_QUERY_OPTIMIZATION=trueenables query collection. Remove the line for baseline monitoring only; review the query permissions before enabling it.
Expected result
After you start the Agent, the Dashboard should show Agent Status: Connected and current metrics or a current data timestamp.
Verify the installation
Confirm both the Agent connection and current metrics in the Dashboard. If either is missing, check the Agent logs.
Troubleshooting
Use Troubleshoot the Releem Agent. Correct the reported permission, network, or configuration issue before you re-run or restart the supported procedure.