build highly available ELK stack

Hi Techrunnr Readers, this document deals with how to build highly available ELK stack.
Here I will show you how to setup High availability for kibana with apache.

Kibana is an open source data visualization plugin for Elasticsearch. It provides visualization capabilities on top of the content indexed on an Elasticsearch cluster. Users can create bar, line and scatter plots, or pie charts and maps on top of large volumes of data.

Kibana 1: 192.168.10.9
kibana 2: 192.168.10.10
Apache 3: 192.168.10.11

1. Login to each Kibana server and download the kibana package

cd /opt/
wget https://artifacts.elastic.co/downloads/kibana/kibana-6.3.2-linux-x86_64.tar.gz

2. Extract

tar -xvzf kibana-6.3.2-linu.tar.gz

3. configure kibana to fetch indexes from Elastisearch

tar -xvzf kibana-6.3.2-linu.tar.gz

vi kibana.yml

 

server.host: "192.168.10.9"

where it’s your kibana machine IP.

change elasticsearch.url IP to elastic search HAproxy server IP address

 

elasticsearch.url: "http://192.168.10.8:9200"

4. Now start the kibana

cd /opt/kibana/bin
./kibana&

Now install apache for configuring reverse proxy.

1. Install apache

apt-get install apache2 apache2-utils

2. Create a htuser for kibana authentication

htpassword -c /etc/kiaban admin

3. Configure apache for failover

vi /etc/apache2/sites-available/000-default.conf

<Location />
AuthType Basic
AuthName "Restricted Content"
AuthUserFile /etc/kiabana_pass
Require valid-user
</Location>

ProxyPass / balancer://hotcluster/
<Proxy balancer://hotcluster>
BalancerMember http://192.168.10.9:5601 timeout=2 retry=300
BalancerMember http://192.168.10.10:5601 status=+H
</Proxy>

4. Restart the apache service.
Now you have completed HA for kibana and ELK stack.

© 2018, Techrunnr. All rights reserved.

#1
#2
#3
Questions Answered
Articles Written
Overall Points

Prabhin Prabharkaran

He is Technical professional. He is a person who loves to share tricks and tips on the Internet. He Posts what he does!!

0 Comments

Leave a Reply

Please wait...

Subscribe to our newsletter

Want to be notified when our article is published? Enter your email address and name below to be the first to know.