zoukankan      html  css  js  c++  java
  • ELK整合安装

    ELKStack简介
            对于日志来说,最常见的需求就是收集、存储、查询、展示,开源社区正好有相对应的开源项目:logstash(收集)、elasticsearch(存储+搜索)、kibana(展示),我们将这三个组合起来的技术称之为ELKStack,所以说ELKStack指的是Elasticsearch、Logstash、Kibana技术栈的结合,一个通用的架构如下图所示:

    系统环境:Centos 7.4  JDK 1.8

    安装JDK

    [root@es01-jypay ~]#  yum install -y java
    [root@es01-jypay ~]# java -version
    openjdk version "1.8.0_151"
    OpenJDK Runtime Environment (build 1.8.0_151-b12)
    OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)

    YUM安装ElasticSearch

    1.下载并安装GPG key

    [root@es01-jypay ~]# rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch

    2.添加yum仓库

    [root@es01-jypay ~]# vim /etc/yum.repos.d/elasticsearch.repo
    [elasticsearch-2.x]
    name=Elasticsearch repository for 2.x packages
    baseurl=http://packages.elastic.co/elasticsearch/2.x/centos
    gpgcheck=1
    gpgkey=http://packages.elastic.co/GPG-KEY-elasticsearch
    enabled=1

    3.安装elasticsearch(elasticsearch版本是2.xxx)

    [root@es01-jypay ~]# yum install -y elasticsearch
    [root@es01-jypay ~]# vim /etc/elasticsearch/elasticsearch.yml

      cluster.name: es-jyapy
      node.name: es01-jypay.com
      path.data: /es-data/
      path.logs: /var/log/elasticsearch/
      bootstrap.memory_lock: true
      network.host: 192.168.6.221
      http.port: 9200

     4、安装elasticsearch-head插件

    ElasticSearch-Head 是一个与Elastic集群(Cluster)相交互的Web前台。

    ES-Head的主要作用:

    • 它展现ES集群的拓扑结构,并且可以通过它来进行索引(Index)和节点(Node)级别的操作

    • 它提供一组针对集群的查询API,并将结果以json和表格形式返回

    • 它提供一些快捷菜单,用以展现集群的各种状态

    [root@es01-jypay ~]# /usr/share/elasticsearch/bin/plugin install  mobz/elasticsearch-head

     访问地址:http://Your_IP:9200//_plugin/head

    5、安装elasticsearch-kopf

    kopf是一个ElasticSearch的管理工具,它提供了对ES集群操作的API。

    [root@es01-jypay ~]# /usr/share/elasticsearch/bin/plugin install lmenezes/elasticsearch-kopf

     访问地址:http://Your_IP:9200//_plugin/kopf

    6、安装 ElasticSearch-Bigdesk

    bigdesk是elasticsearch的一个集群监控工具,可以通过它来查看es集群的各种状态,如:cpu、内存使用情况,索引数据、搜索情况,http连接数等。

    [root@es01-jypay ~]# cd /usr/local/src && wget https://github.com/lukas-vlcek/bigdesk/archive/master.zip && unzip master.zip
    [root@es01-jypay ~]# mkdir /usr/share/elasticsearch/plugins/bigdesk/_site/
    [root@es01-jypay ~]# cp -r /usr/local/src/bigdesk-master/* /usr/share/elasticsearch/plugins/bigdesk/_site/
    [root@es01-jypay ~]# vim /usr/share/elasticsearch/plugins/bigdesk/plugin-descriptor.properties
        description=head - A web front end for an elastic search cluster
        version=master
        site=true
        name=bigdesk
    
    [root@es01-jypay src]# vim /usr/share/elasticsearch/plugins/bigdesk/_site/js/store/BigdeskStore.js
            return (minor >= 0 && maintenance >= 0 && (build != 'Beta1' || build != 'Beta2'));  //删除major == 1 条件
            //return (major == 1 && minor >= 0 && maintenance >= 0 && (build != 'Beta1' || build != 'Beta2'));

     访问地址:http://Your_IP:9200//_plugin/bigdesk

  • 相关阅读:
    OC与Swift的区别二(常量、变量、运算符)
    OC与Swift的区别一(文件结构)
    OC对象的归档及解档浅析
    OC单例模式的实现
    oc文件基本读写及操作
    IOS之沙盒(Sandbox)机制
    IOS开发之KVC与KVO简述
    SpringMVC控制器配置文件
    spring常用的连接池属性文件配置
    Struts2文件上传方式与上传失败解决方式
  • 原文地址:https://www.cnblogs.com/kumarhua/p/7920366.html
Copyright © 2011-2022 走看看