MySQL Metrics with InstrumentalD

MySQL logo

The best way to get MySQL metrics into Instrumental is with InstrumentalD, the fast and reliable server agent created by the Instrumental team. By using InstrumentalD to collect MySQL metrics, you'll get premade MySQL graphs and unlock the full power of our Query Language.

Quick Start

Check out our Getting Started Guide for all the details. Otherwise, here's the bare minimum to get up and running. (You'll need a project token.)

brew install instrumental/instrumentald/instrumentald
echo 'mysql = ["root@tcp(localhost:3306)/"]' > instrumentald.toml
instrumentald -c instrumentald.toml -k PROJECT_TOKEN
curl https://packagecloud.io/install/repositories/expectedbehavior/instrumental/script.deb.sh | sudo bash
sudo apt-get install instrumentald
echo 'mysql = ["root@tcp(localhost:3306)/"]' > instrumentald.toml
instrumentald -c instrumentald.toml -k PROJECT_TOKEN
curl https://packagecloud.io/install/repositories/expectedbehavior/instrumental/script.rpm.sh | sudo bash
sudo yum install instrumentald
echo 'mysql = ["root@tcp(localhost:3306)/"]' > instrumentald.toml
instrumentald -c instrumentald.toml -k PROJECT_TOKEN

Configuring InstrumentalD

InstrumentalD will collect the metrics below from as many MySQL servers as configured. Here's a basic example of the MySQL config:

mysql = ["root@tcp(localhost:3306)/"]

Everything you need to know about configuring InstrumentalD, including more information about MySQL config, can be found in the InstrumentalD Configuration docs.

Metrics Collected

All MySQL metrics collected by InstrumentalD follow this pattern:

mysql.<hostname>.<metric>
The following metrics are collected:
bytes_sent Count of bytes sent since server start
bytes_received Count of bytes received since server start
connections Count of the number of open connections since server started
slow_queries Count of slow queries since server start
queries Count of queries since server start

Note: You can use growth_rate to get the difference in count between units of resolution. For example, the following query will give you the the number of queries from minute to minute.

growth_rate(mysql.db-001.queries)

How many metrics can I expect from InstrumentalD?

InstrumentalD will collect 5 metrics per MySQL database configured.

Suggested Graphs

The following graphs are based on the metrics collected by InstrumentalD, and provide great starting point for monitoring MySQL.

Log in or sign up to add them to your project.