Kibana从5.5开始不提供认证功能,想用官方的认证X-Pack,收费滴
所以自己动手,使用Nginx的代理功能
安装Nginx
安装Apache密码生产工具
# yum install httpd-tools
生成密码文件
# mkdir -p /etc/nginx/passwd
# htpasswd -c -b /etc/nginx/passwd/kibana.passwd user ******
配置Nginx
# vim /usr/local/nginx/nginx.conf
server {
listen 192.168.10.10: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;
}
}
修改Kibana配置文件
# vim /usr/local/kibana/config/kibana.yml
# The host to bind the server to.
server.host: "localhost"
重启Kibana服务,配置文件生效
# ps -ef | grep node
# kill -9 xxxx
# nohup ./bin/kibana >/dev/null &
重载Nginx配置
# nginx -s reload



