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
You can also configure metric module to check queries runs on database server like 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.
Filebeat will send the logs to Logstash and this will save those logs in Elasticsearch then Elasticsearch will display the data in Kibana.
Step 1: Install Filebeat, filebeat configuration file
yum install filebeat-7.1.1-x86_64.rpm
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.
Step 3: Start and enable Service
systemctl start filebeat && systemctl enable filebeat
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
Restart the Filebeat service
systemctl restart filebeat
Step 6: Now check on Kibana Data received,
Click on MySQL logs dashboard,
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.