Elasticsearch: How to install and set up FileBeat on Ubuntu 20.04.

Photo by Andrea Piacquadio from Pexels

1- Install Filebeat on your system

sudo apt-get update && sudo apt-get upgrade
sudo apt-get install filebeat

2- Configure Filebeat to send data to Elasticsearch

cd /etc/filebeat
sudo nano filebeat.yml
output.elasticsearch:
hosts: ["ELASTICSEARCH-HOST-ADDRESS:9200"]
username: "YOUR_ELASTICSEARCH_USERNAME"
password: "YOUR_PASSWORD"

3- Configure Filebeat to send data to Kibana

setup.kibana:
host: "KIBANA-HOST-ADDRESS:5601"
username: "YOUR_KIBANA_USERNAME"
password: "YOUR_PASSWORD"

4- Set the path to your logs

cd /etc/filebeat/modules.d
ls -l
cp apache.yml.disabled apache.yml
sudo nano apache.yml
- module: apache
# Access logs
access:
enabled: true
# Set custom paths for the log files. If left empty,
# Filebeat will choose the paths depending on your OS.
var.paths: /var/log/apache2/access.log
# Error logs
error:
enabled: true
# Set custom paths for the log files. If left empty,
# Filebeat will choose the paths depending on your OS.
var.paths: /var/log/apache2/error.log
sudo systemctl start filebeat

5- Set up Kibana dashboard for Filebeat

cd /usr/share/filebeat/bin
sudo filebeat setup --dashboards

6- Visualize the output on Kibana

--

--

--

Certified AWS Solution Architect, Fullstack Software Engineer & DevOps. I like Solving Challenging Software Engineering Problems & Building Amazing Solutions.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Getting started with KCC Testnet: Create a simple presale contract

Continuous Delivery on AWS cloud(Java Application) Project

Meet an Organizer: Luis of PickHacks

Regular Expression Made Easy Part- 1

User Story Card Clarified

BitBoxApp for Android: who needs a computer anyway?

Deploy Subgraphs to Any EVM

Optimize Selenium WebDriver Automated Test Scripts: Readability

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Akintola L. F. ADJIBAO

Akintola L. F. ADJIBAO

Certified AWS Solution Architect, Fullstack Software Engineer & DevOps. I like Solving Challenging Software Engineering Problems & Building Amazing Solutions.

More from Medium

Getting Started with ELK Stack

DevOps, Deployment, and Containers

Understanding Dockerfile

Learning Prometheus, Grafana, and Loki with Docker