This plugin collects runtime metrics from MySQL or MariaDB instances. It gathers information about resource usage and performance characteristics, including information for queries, on your database instance(s).
This plugin is currently only available for x86_64 Linux.
mysql plugin is included with the AppOptics host agent by default, please follow the directions below to enable it for a host agent instance.
This plugin requires the connection credential to the MySQL or MariaDB instance to monitor, please refer to your database manual on setting up the credential.
The host agent provides an example configuration file to help you get started quickly. It defines the plugin and task file to be loaded by the agent, but requires you to provide the correct settings for your database. To enable the plugin:
- Make a copy of the mysql example configuration file
/opt/appoptics/etc/plugins.d/mysql.yaml.example, renaming it to
$ sudo cp /opt/appoptics/etc/plugins.d/mysql.yaml.example /opt/appoptics/etc/plugins.d/mysql.yaml
- Update the
/opt/appoptics/etc/plugins.d/mysql.yamlconfiguration file with settings specific to your database instance, for example:
collector: mysql: all: mysql_connection_string: "root:admin@tcp(mysql:3306)/" mysql_use_innodb: true load: plugin: snap-plugin-collector-aomysql task: task-aomysql.yaml
mysql_connection_stringis a required setting that should set the connection information to the database instance. This plugin is tested to run against both versions of the database software, so enabling the TCP connection on your SQL instance/cluster will be sufficient.
mysql_use_innodbis an optional setting that defaults to
false. If set to
true, the plugin will collect extended metrics from the InnoDB storage engine for your instance/cluster. You can get more information about InnoDB from the MySQL documentation.
- Restart the host agent:
$ sudo service appoptics-snapteld restart
- Enable the MySQL plugin in the AppOptics UI
Select the MySQL plugin to open the configuration menu in the UI, and enable the plugin.
You should soon see the
mysqlmetrics reported to your dashboard.