Configuration of Metricbeat For MySQL Server Monitoring
Configuration of Metricbeat For MySQL using Elasticsearch stack. This will provide you the information about system and services statistics.
This can provide you system level CPU usage, Memory usage, file system, disk I/O and network I/O statistics.
Check Out : Configuration of Filebeat For Elasticsearch
I have created a database testing and user ‘mariadb’ and assign permission on both localhost and IP address of MySQL Server.
Step 1 : create database testing;
Now Create the user
create user ‘mariadb’@’192.168.185.128’ identified by ‘mariadb’;
create user ‘mariadb’@’localhost’ identified by ‘mariadb’;
You need to Grant permission on database
grant all privileges on testing to ‘mariadb’@’localhost’ identified by ‘mariadb’;
grant all privileges on testing to ‘mariadb’@’192.168.185.129’ identified by ‘mariadb’;
select user,host from mysql.user;
Step 2 : Download the the Metricbeat on MySQL Server
Step 3 : Install Metricbeat
yum install metricbeat-7.0.1-x86_64.rpm -y
Configure for Kibana and elasticsearch here in this file vim metricbeat.yml
Step 4 : Now you have to enable the MySQL module
metricbeat modules enable mysql
Step 5 : Setup Metricbeat for MySQL
Enable and Start the Metricbeat Service
systemctl start metricbeat && systemctl enable metricbeat
As you can see metricbeat is connected to elasticsearch.
Step 6 : Now check the data received on kibana,
Click on Check data
Step 7 : Now Click on MySQL metrics Dashboard
Everything is perfect.