Configure Filebeat For MySQL Database Server In Elasticsearch ELK
Configure File-beat For MySQL database for analysing the traffic, loads and read/write operation on the database. file-beat modules shows MySQL slow query and error data in kibana dashboard and also which user runs the queries on the database server. you can find 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 configuring 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
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.
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 enable 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.