MySQL agent
Prerequisites
- For prerequisite checks for agent installation, see Prerequisite checks for agent installation.
- URL/IP of the SixthSense collector (your tenant URL, which will be provided by Customer Support).
- Access token from the SixthSense portal. For accessing the token, see Accessing your Access Token under Getting started with the Observability Portal.
- mysql agent version "latest".
- database details (host name, port, database name, database user credentials).
- Package token to download the agent (which will be provided by Customer Support).
- For information about supported agent versions and framework, see Supported agents.
Downloading the Agent version 4.4.5 (latest)
For Windows and Linux based servers, use the following link.
note
The agent depends on the Operating System and architecture.
Database User Permissions
To capture database metrics from the MySQL server, you must first create a MySQL user with replication and select permissions.
Perform the following steps to create user and grant permissions.
From the MySQL command line, create a user sixthsense@<your_host_name> with a specific password by running:
Create user
Grant replication privileges to sixthsense@<your_host_name> by running:
Grant replication permission
Grant privileges to sixthsense@<your_host_name>, by running:
Grant select permission
note
Replace <your_host_name> and <your_strong_password> with your values.
Enable deadlock permission
Configuring the MySQL agent
Create a config.yaml file in the same directory as the agent.
note
Use either the sql port or socket.
Running the agent
For Linux:
Run MySQL agent in the terminal using the following commnad.
For Windows:
- Register DBM agent as a Service in Windows. Type in the following command in cmd:
Example:
Confirm whether the service is registered by opening Services and search for the Service Name with which you've registered.
Run the service by opening the Services again and look for Service name > Start or sc start <service_name>.
Example: sc start MeterAgent_mysql
Editing the configuration in the yaml file
In yaml file, add the following configuration details:
- service_name: Servive name will display on UI
- authentication: Get access token from dashboard under setting
- sixthsense_backend: Backend collector URL
- hostname: hostname
- port: port
- user: db_user
- password: db_user_password
note
It supports instance name also with hostname
Example:
hostname: Hostname/SQLExpress