Install Filebeat on CentOS

Usually, when deploying applications to a production environment, we will deploy to many different servers. Managing logs on many servers will cause a lot of difficulties, time, and inefficiencies. It would be better if we used a solution to centralize all of the logging files. This means that we will install so that the servers that are deploying the application can send all the application log messages to a primary server, on the primary server we will use the tools to make the log messages possible.

In the world of ELK (Elasticsearch-Logstash-Kibana), to realize the above idea, you can use Beats tools to do this. Beats are tools whose main task is data shipper, including Filebeat, Metricbeat, Packetbeat, Winlogbeat, Auditbeat, Heartbeat, Functionbeat. In this tutorial, I will guide you all to install Filebeat tools!

First, similar to when installing Elasticsearch or Kibana, if your server has not installed Elasticsearch or Kibana repository, then you need to add the Filebeat public signing key first by running the following command:

My results are as follows:

Install Filebeat on CentOS

Next, you need to create a new file to add a Filebeat repository:

then add the following content to this file:

Now, you can run the following command to install Filebeat:

Install Filebeat on CentOS

Enter “Y” to continue!

Installation results:

Install Filebeat on CentOS

After the installation is complete, you can start configuring so that Filebeat can fulfill our needs. The configuration file of Filebeat is named filebeat.yaml is located in the /etc/filebeat directory of CentOS!

In the next tutorial, I will show you how to configure Filebeat.

Add Comment