首页 > 其他 > 详细

centOS安装ELK

时间:2020-06-17 10:26:34      阅读:74      评论:0      收藏:0      [点我收藏+]

安装 filebeat:

  rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch

  vim /etc/yum.repos.d/elk.repo

    [elastic-6.x]
    name=Elastic repository for 6.x packages
    baseurl=https://artifacts.elastic.co/packages/6.x/yum
    gpgcheck=1
    gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
    enabled=1
    autorefresh=1
    type=rpm-md

  yum -y install filebeat

  cd /etc/filebeat/

  cp ./filebeat.yml ./filebeat.yml.bak

  vim ./filebeat.yml 

    #input设置

    filebeat.inputs:
    - type: log
    enabled: true
    paths:
    - /project/www/vautestcom/logs/backup/VAU_Nontrader_error_sys*.log
    #multiline.pattern: ^\d{4}-\d{2}-\d{2}
    #multiline.negate: true
    #multiline.match: after

    output设置
    setup.template.name: "service"
    setup.template.pattern: "service-*"
    output.elasticsearch:
    # Array of hosts to connect to.
    hosts: ["127.0.0.1:9200"]
    index: "service-111"

  service filebeat restart

 

安装ES:

  yum -y install elasticsearch

  service elasticsearch start

  查看索引:

    curl 127.0.0.1:9200/_cat/indices

 

安装kibana

  yum install -y kibana

  #修改配置文件

    server.port
    server.host
    es.url   

 

centOS安装ELK

原文:https://www.cnblogs.com/-xuzhankun/p/13150386.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!