metricbeat configure for mysql in linux

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;

database creation for mysql

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’;

flush privileges;

database created on mariadb

Check Out : How To Install Elasticsearch Using Source Code In Linux

Check Permission 

select user,host from mysql.user;

mysql user command

Step 2 : Download the the Metricbeat on MySQL Server

curl -L -O https://artifacts.elastic.co/downloads/beats/metricbeat/metricbeat-7.0.1-x86_64.rpm

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

Check Out : Install Open Source Kibana For Data Visualisation In Linux

Step 4 : Now you have to enable the MySQL module

metricbeat modules enable mysql

Step 5 : Setup Metricbeat for MySQL

metricbeat setup

Enable and Start the Metricbeat Service

systemctl start metricbeat && systemctl enable metricbeat

Check Out : Error Elastisearch Bootstrap Check Failed In Linux

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.

That’s it

Sponsored

LEAVE A REPLY

Please enter your comment!
Please enter your name here

13 + twenty =