天天看點

kibana內建内部賬号_Kibana登入認證設定

Kibana從5.5開始不提供認證功能,想用官方的認證,X-Pack,收費滴 。

是以就自己動手吧,用nginx的代理功能了。

1、安裝Nginx:

[[email protected] /]# yum -y install nginx

2、安裝Apache密碼生産工具:

[[email protected] /]# yum install httpd-tools

3、生成密碼檔案:

[[email protected] /]# mkdir -p /etc/nginx/passwd

[[email protected] /]# htpasswd -c -b /etc/nginx/passwd/kibana.passwd user ******

4、配置Nginx:

[[email protected] /]# cp /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf.backup

[[email protected] /]# vim /etc/nginx/conf.d/default.conf

#/etc/nginx/conf.d/default

server {

listen 192.168.75.150:5601;

auth_basic "Kibana Auth";

auth_basic_user_file /etc/nginx/passwd/kibana.passwd;

location / {

proxy_pass http://127.0.0.1:5601;

proxy_redirect off;

}

}

5、修改Kibana配置檔案:

[[email protected] /]# vim /usr/local/elk/kibana/config/kibana.yml

# The host to bind the server to.

server.host: "localhost"

6、重新開機Kibana服務,配置檔案生效:

[[email protected] /]# su - elk --command="/usr/local/kibana/bin/kibana serve &"

7、重新開機Nginx服務:

[[email protected] /]# service nginx restart

8、登入界面:

kibana內建内部賬号_Kibana登入認證設定

[THE END]