We're here to assist with any of your needs, don't hestitate to reach out.
ELK Stack is a popular open-source application stack used for log management and data analytics. It consists of three main components:
Elasticsearch is a powerful distributed search and analytics engine. It is built on top of Apache Lucene and allows you to store, search, and analyze massive volumes of data in real-time.
Logstash is a server-side data processing pipeline that ingests, transforms, and sends data to Elasticsearch or other outputs. It helps you collect, parse, and normalize log data from various sources and enrich it before storing it in Elasticsearch.
Kibana is an open-source data visualization and exploration tool. It provides a user-friendly interface for analyzing and visualizing data stored in Elasticsearch. You can create customizable dashboards, charts, and maps to gain insights from your log and metric data.
To install ELK Stack on CentOS 8, follow these steps:
sudo dnf update -y
sudo dnf install -y java-11-openjdk-devel
sudo rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
sudo vi /etc/yum.repos.d/elasticsearch.repo
Add the following content to the file:
[elasticsearch-7.x]
name=Elasticsearch repository for 7.x packages
baseurl=https://artifacts.elastic.co/packages/oss-7.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md
sudo dnf install -y elasticsearch-oss
sudo vi /etc/elasticsearch/elasticsearch.yml
Uncomment and modify the following settings:
network.host: localhost
discovery.type: single-node
sudo systemctl start elasticsearch
sudo systemctl enable elasticsearch
sudo dnf install -y logstash
sudo vi /etc/logstash/conf.d/logstash.conf
Add the following content to the file:
input {
file {
path => "/var/log/application.log"
start_position => "beginning"
}
}
filter {
grok {
match => { "message" => "%{COMBINEDAPACHELOG}" }
}
date {
match => [ "timestamp" , "dd/MMM/yyyy:HH:mm:ss Z" ]
}
}
output {
elasticsearch {
hosts => ["localhost:9200"]
}
}
sudo systemctl start logstash
sudo systemctl enable logstash
sudo dnf install -y kibana-oss
sudo vi /etc/kibana/kibana.yml
Uncomment and modify the following settings:
server.host: "localhost"
elasticsearch.hosts: ["http://localhost:9200"]
sudo systemctl start kibana
sudo systemctl enable kibana
After completing these steps, you should have ELK Stack installed and ready to use on your CentOS 8 server. You can access Kibana by opening your web browser and navigating to http://localhost:5601
.
From the Kibana interface, you can configure index patterns, create visualizations, and build dashboards to analyze and visualize your log data stored in Elasticsearch.
What our customers say about us
Create your free account today.