Creating Single URL for multiple Kibana URL

Hi,
I have a ELK stack with 2 Logstash server, 3 node Elasticsearch cluster and 2 Kibana server (considering High Availability). Due to two Kibana instance we have two Kibana URL. Both the Kibana URL is working. Can I have a single URL by which I can access both the Kibana? If any time one of the Kibana is down then also we will be able to access the other one.

Thanks.

Yes, you need a load balancer in front and you must have sticky sessions enabled
as well as having in both kibana configs the same encryption keys and stuff
You might want to look into haproxy, ngingx reverse proxy or apache reverse proxy if you don't have any dedicated load balancing hardware

Thanks @gborg for your quick reply.

I tried with nginx but I could not implement this. Can you please refer some resource so that I can follow? And do I need DNS in this case? The Kibana URLs are http://x.x.x.x:5601, http://x.x.x.x:5601.

Thanks.

You should be (in my opinion) be using DNS names yeah

and then on one of the servers or a 3rd server have an nginx config similar to this


http {
    upstream myapp1 {
        x.x.x.x:5601;
        x.x.x.x:5601;
        # 127.0.0.1:5601; # if you are running it on one of the 2 servers  .

  
    }

    server {
        listen 80;

        location / {
            proxy_pass http://nameOfServerWithNginx;
        }
    }
}

However, I just learned nginx doesn't really support sticky sessions and if you don't use those, you wont be happy

You might wanna try apache

basic tutorial: https://linuxtechlab.com/use-apache-reverse-proxy-as-load-balancer/#:~:text=–%20It%20can%20hide%20the%20origin,off%20from%20the%20backend%20servers.

How to enable sticky sessions: https://cwiki.apache.org/confluence/display/OFBIZ/Sticky+session+load+balancing+with+Apache+and+mod_balancer

Thanks a lot @gborg for your reply. I will go through the links you shared and try with apache.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.