1、Kibana汉化方法此项目,适用于Kibana 5.x-6.x的任意版本,汉化过程不可逆

1)Github仓库下载kibana中文汉化包,下载指令如下:

git clone https://github.com/anbai-inc/Kibana_Hanization.git

#wget http://bbs.jfedu.net/download/Kibana_Hanization_2018.tar.gz

2)切换至Kibana_Hanization目录,并且执行汉化过程;

cd  Kibana_Hanization/

python main.py /usr/local/kibana/(此处为系统kibana安装路径)

重启kibana服务即可

2、Kibana WEB安全认证

利用Apache的密码认证进行安全配置 通过访问Nginx转发只ES和kibana服务器,Kibana服务器安装Nginx:

 

yum install pcre-devel pcre -y
wget -c http://nginx.org/download/nginx-1.12.2.tar.gz
tar -xzf nginx-1.12.2.tar.gz
useradd www ;./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module
make
make install

修改Nginx.conf配置文件代码如下:

worker_processes  1;
events {
    worker_connections  1024;
}
http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;
    upstream  jvm_web1 {
    server    127.0.0.1:5601  weight=1  max_fails=2  fail_timeout=30s;
}
    server {
        listen  80;
        server_name  localhost;
        location / {
         proxy_set_header  Host  $host;
         proxy_set_header  X-Real-IP  $remote_addr;
         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
         proxy_pass http://jvm_web1;
        }
    }
}

修改kibana配置文件监听IP为127.0.0.1:

 

重启kibana和Nginx服务,通过Nginx 80端口访问如下:

 

添加Nginx权限认证:

Nginx.conf配置文件location /中加入如下代码:

auth_basic "ELK Kibana Monitor Center"; 
auth_basic_user_file /usr/local/nginx/html/.htpasswd;

通过Apache加密工具htpasswd生成用户名和密码:

htpasswd -c /usr/local/nginx/html/.htpasswd admin

重启Nginx web服务,访问如下: