- Enable Performance Schema and it’s configuration
- Setup Database Access for the Agent
- Install Atatus Infrastructure Agent
Before You Begin
Configure MySQL Performance Schema Settings
To gather query metrics, samples, and execution plans, you need to activate the MySQL Performance Schema and set up the requiredPerformance Schema Options. This can be done through the command line or by adjusting the configuration files (e.g., mysql.conf):
Setup Database Access for the Agent
Create theatatus user and grant basic permissions:
EXPLAIN_STATEMENT procedure to enable the agent to collect explain plans.
YOUR_SCHEMA with the appropriate schema name.
Configure Atatus Infrastructure Agent
- To enable Database Monitoring for your databases, You should install the Atatus Infrastructure agent in your host machine.
-
Copy the mysql example configuration file.
- Update mysql Configuration File:
/etc/atatus-infra-agent/conf.d/mysql.d/mysql.yml:
-
Restart the atatus infrastructure agent and MySQL service.
Collecting Schemas (Optional)
Starting from Agent v3.4.0, the Atatus Infra Agent supports collecting schema information from MySQL databases.To enable this, configure the
schemas_collection option in your agent settings.
Collecting Custom Metrics (Optional)
To collect custom metrics, use thecustom_queries option in your configuration. Refer to the sample atatus-mysql.conf file for guidance.