• EFK部署centos7.9(三)Kibana部署


    EFK部署centos7.9(一)ES单节点部署_争取不加班!的博客-CSDN博客

    EFK部署centos7.9(四)Filebeat 部署_争取不加班!的博客-CSDN博客

    系统类型:Centos7.9

    节点IP: 192.168.11.140

    软件版本:nginx-1.14.2、kibana-6.5.4-linux-x86_64.tar.gz

    上传或者下载安装包

    Wget https://artifacts.elastic.co/downloads/kibana/kibana-6.5.4-linux-x86_64.tar.gz

    tar zvxf kibana-6.5.4-linux-x86_64.tar.gz -C /usr/local/

    cd /usr/local/kibana-6.5.4-linux-x86_64/config/

    vim kibana.yml     添加或者删除注释都行

    server.port: 5601

    server.host: "192.168.11.140"     #kibana本机的地址

    elasticsearch.url: "http://192.168.11.139:9200" #ES主节点地址+端口

    kibana.index: ".kibana"

    server.port kibana 服务端口,默认5601

    server.host kibana 主机IP地址,默认localhost

    elasticsearch.url  用来做查询的ES节点的URL,默认http://localhost:9200

    kibana.index       kibana在Elasticsearch中使用索引来存储保存的searches, visualizations和dashboards,默认.kibana

    cd kibana-6.5.4-linux-x86_64

    nohup ./bin/kibana &   启动kibana

    安装配置Nginx反向代理

     配置yum源      rpm -ivh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm

    yum install -y nginx

    cd /etc/nginx/conf.d/

    cp default.conf nginx.conf

    vim nginx.conf

    dG   配置文件全删了

    然后复制以下配置即可

    server {

            listen       80;

            server_name  192.168.11.140;

            #charset koi8-r;

           # access_log  /var/log/nginx/host.access.log  main;

           # access_log off;

             location / {

                 proxy_pass http://192.168.11.140:5601;

                 proxy_set_header Host $host:5601;

                 proxy_set_header X-Real-IP $remote_addr;

                 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

                 proxy_set_header Via "nginx";

                         }

             location /status {

                 stub_status on; #开启网站监控状态

                 access_log /var/log/nginx/kibana_status.log; #监控日志

                 auth_basic "NginxStatus"; }

             location /head/{

                 proxy_pass http://192.168.11.140:9100;

                 proxy_set_header Host $host:9100;

                 proxy_set_header X-Real-IP $remote_addr;

                 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

                 proxy_set_header Via "nginx";

                             }

    }

    然后配置nginx日志的json格式

    vim /etc/nginx/nginx.conf

    log_format  json '{"@timestamp":"$time_iso8601",'

                               '"@version":"1",'

                               '"client":"$remote_addr",'

                               '"url":"$uri",'

                               '"status":"$status",'

                               '"domain":"$host",'

                               '"host":"$server_addr",'

                               '"size":$body_bytes_sent,'

                               '"responsetime":$request_time,'

                               '"referer": "$http_referer",'

                               '"ua": "$http_user_agent"'

                   '}';

    access_log  /var/log/nginx/access_json.log  json;

    systemctl start nginx  启动nginx

    访问192.168.11.140  本机ip或者192.168.11.140:5601

  • 相关阅读:
    springboot集成kafka消费手动启动停止
    elasticsearch配置
    Python匿名函数
    最频繁被问到的SQL面试题
    算法竞赛入门【码蹄集进阶塔335题】(MT2306-2310)
    面了个字节拿25k出来的测试,算是真正见识到了基础的天花板
    二十九、【人工智能】【机器学习】【监督学习】- AdaBoost算法模型
    深入理解线程安全
    ASEMI超快恢复二极管ES1J参数,ES1J封装,ES1J规格
    【Log4cpp】项目日志Log4cpp的简单使用
  • 原文地址:https://blog.csdn.net/W1124824402/article/details/127902047