Configure Filebeat For MySQL Database Server In Elasticsearch ELK

Configure File-beat For MySQL database for analyzing the traffic, loads, and read/write operation on the database. file-beat modules show MySQL slow query and error data in the Kibana dashboard and also which user runs the queries on the database server. you can find the Filebeat configuration file path at this location /etc/filebeat/ and Filebeat log file path at this location /var/log/filebeat/filebeat.log. configuring logstash with filebeat

Check OutHow To Delete File And Logs Older Than 30 Days In Linux

You can also configure the metric module to check queries runs on database server like the select, update, delete and read/write I/O but you have to configure Logstash with Filebeat to get the data and if you want you can configure more module within this configuration of file-beat, So, you just need to enable that module here in the file.

Configure Filebeat For MySQL Database Server In Elasticsearch ELK:

Filebeat will send the logs to Logstash and this will save those logs in Elasticsearch then Elasticsearch will display the data in Kibana.

Check Out: Error Can’t Run Elasticsearch As a Root User In Linux

Step 1: Install Filebeat, filebeat configuration file

yum install filebeat-7.1.1-x86_64.rpm

configuration file

Check Out: How To Configure Samba Server For File Sharing

Step 2: you have to define the logs file here which one you want to monitor using Filebeat agent. So, find the Configure filebeat.yml.

vim /etc/filebeat/filebeat.yml

filebeat mysql config

Check Out: How To Install MariaDB Database Server on Ubuntu 20.04

Step 3: Start and enable Service

systemctl start filebeat && systemctl enable filebeat

filebeat configuration file

Check Out: Step To Install Erlang Package

Step 5: Enable MySQL Module

filebeat modules enable mysql

After enabling the module, you need to create a dashboard for MySQL

filebeat setup

filebeat log file

Check Out: How to Enable QR Code Generator On Microsoft Edge Browser

Restart the Filebeat service

systemctl restart filebeat

Step 6: Now check on Kibana Data received,

configuring logstash with filebeat

Click on MySQL logs dashboard,

Check Out Create VPC Network Using AWS CLI From Windows CMD

There’s no much data in MySQL database because it’s the fresh server I created So, it’s showing nothing. Don’t worry this will show all the information in your database server.

logs for filebeat

You’re done

Share on:

I'm the founder of Curious Viral. I hope this blog will provide you complete information about Linux Technology & I would like to share my technical knowledge with you which I have learned during this period.

Other Posts You May Like...

Leave a comment