MySQL Metrics with InstrumentalD
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
- Configuring InstrumentalD
- MySQL Metrics Collected
- How many metrics can I expect from InstrumentalD?
- Dashboard
Quick Start
Check out our Installation Instructions for more details. Otherwise, here's the bare minimum to get up and running.
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 'project_token = "PROJECT_TOKEN"' | sudo tee /etc/instrumentald.toml echo 'mysql = ["root@tcp(localhost:3306)/"]' | sudo tee -a /etc/instrumentald.toml sudo systemctl restart instrumentald
curl https://packagecloud.io/install/repositories/expectedbehavior/instrumental/script.rpm.sh | sudo bash sudo yum install instrumentald echo 'project_token = "PROJECT_TOKEN"' | sudo tee /etc/instrumentald.toml echo 'mysql = ["root@tcp(localhost:3306)/"]' | sudo tee -a /etc/instrumentald.toml sudo service instrumentald restart
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>
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.
Dashboard
Here are the graphs included in our MySQL Dashboard. It's a great way to get started visualizing these metrics.