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 available for x86_64 Linux and Windows platforms.
mysql plugin is included with the SolarWinds Snap Agent by default, please follow the directions below to enable it for a 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 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/SolarWinds/Snap/etc/plugins.d/mysql.yaml.example, renaming it to
$ sudo cp /opt/SolarWinds/Snap/etc/plugins.d/mysql.yaml.example /opt/SolarWinds/Snap/etc/plugins.d/mysql.yaml
- Update the
/opt/SolarWinds/Snap/etc/plugins.d/mysql.yamlconfiguration file with settings specific to your database instance, for example:
collector: mysql: all: mysql_connection_string: "user:passwd@tcp(localhost:3306)/" # multiple connection strings # mysql_connection_string: | # user:passwd@tcp(localhost:3306)/ # user:passwd@tcp(localhost:3307)/ mysql_use_innodb: false 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. It accepts single line or multiline (embedded yaml) connection strings. The credentials should be entered in the following format:[username[:password]@][protocol[(address)]]/dbname[?param1=value1&...¶mN=valueN]
rootuser for monitoring can cause compatibility issues. We recommend creating a new user with full read rights for use with this plugin.
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. If set to
false, InnoDB metrics will not be collected, and corresponding metrics needs to be commented out in task file.
- Restart the agent:
$ sudo service swisnapd 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.