zoukankan      html  css  js  c++  java
  • ELK windows 安装配置说明

    笔者的环境为:

    系统:windows10

    以下说明文档为该环境下的安装配置过程

     

    ELK的中文官方网址为:https://www.elastic.co/cn/

     

    1.ELK简单概述:

    ELK作用是:实时日志分析工具

    Elasticsearch:Elasticsearch 是一个分布式、RESTful 风格的搜索和数据分析引擎,能够解决不断涌现出的各种用例。

    Logstash:免费且开放的服务器端数据处理管道,能够从多个来源采集数据,转换数据,然后将数据发送到您最喜欢的“存储库”中。

    Kibana:是一个免费且开放的用户界面,能够让您对 Elasticsearch 数据进行可视化,跟踪查询负载,到理解请求如何流经您的整个应用。

    其他产品:Beats 是一个免费且开放的平台,集合了多种单一用途数据采集器。它们从成百上千或成千上万台机器和系统向 Logstash 或 Elasticsearch 发送数据。请自行了解。

    ELK关系为:

     

    2.ELK下载

    准备工作:若下载不包含JDK版本的,需要自行下载JDK8以上,JDK安装目录不可以包含空格、括号,并且设置好环境变量。

    ELK版本需要平行,如Elasticsearch为6.2.4,则Logstash和Kibana都应该为6.4.2 目前在超过6.4.2版本的会有30天试用期的提示如下:
    This package is free to use under the Elastic license. It contains open source and free commercial features and access to paid commercial features. Start a 30-day trial to try out all of the paid commercial features. See the Subscriptions page for information about Elastic license levels.

    所以此处仅进行下载6.4.2版本:

    所有产品的官方下载入口为:https://www.elastic.co/cn/downloads/past-releases

    以下为6.4.2 windows版本Zip下载地址:

    E:https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.4.2.zip

    L:https://artifacts.elastic.co/downloads/logstash/logstash-6.4.2.zip

    K:https://artifacts.elastic.co/downloads/kibana/kibana-6.4.2-windows-x86_64.zip

     

    3.配置及运行

    E:可以直接找到目录 elasticsearch-6.2.4inelasticsearch.bat 右击选择管理员运行

    L:在目录logstash-6.2.4config 新建logstash.conf,使用代码编辑器如Notepad++,插入如下代码,关于详细配置读者可自行搜索logstash.conf会有很多文章讲解,这里不再详细展开

     

     1 input{
     2     file{
     3         codec => json
     4         path => "F:/software/ELK/logstash-6.2.4/build/app-item.json"  #日志目录
     5     }
     6 }
     7 
     8 filter{ #过滤日志
     9     #grok{
    10     #    match => {"message" => "%{TIMESTAMP_ISO8601:timestamp}s+%{LOGLEVEL:
    11     #    severity}s+[%{DATA:service}, %{DATA:trace}, %{DATA:span}, %{DATA:
    12     #    exportable}]s + %[DATA:pid]---s+[%{DATA:thread}]s+%{DATA:class}s + :
    13     #    s + %{GREEDYDATA:rest}"}
    14     #}
    15 }
    16 
    17 output{
    18     elasticsearch{
    19         hosts => "127.0.0.1:9200" #elasticsearch地址
    20         #action => "index"
    21         #index => "springboot-logstash-%{+YYYY.MM.dd}"
    22     }
    23 }

     

    进入目录logstash-6.2.4inlogstash.bat 右击选择管理员运行

    L:可以直接找到目录 kibana-6.2.4-windows-x86_64inkibana.bat 右击选择管理员运行

     

    4.进入Kibana操作界面 http://localhost:5601,如果能看到以下界面则配置成功,如果未能检索到索引Index,也不能添加(Create Index Pattern),则是找不到日志文件,或者是logstash配置有问题,或者是写入的日志有问题,需要自行找出原因。

     

    在服务端程序正常运行下,实时访问,则会出现如下界面:这里设置5s刷新一次数据,底下红框显示为日志文件的信息

     

     

     

     

     
     
     
  • 相关阅读:
    IOS4.x下UIWebView的显示问题
    UIView的动画
    (转)iPhone实战:动态改变UITableView中的Cell高度
    (原) 定制使UITabBarController的tabbar选中tabbaritem时不高亮以及换背景色(支持iPad旋转)
    IOS开发问题汇总
    (转)公钥加密技术
    [Nikon D80]南门老家
    Realtime Ray Tracing RenderMan Point Cloud
    今天败入音特美ER6i
    Practice Realistic Human Skin Rendering In RenderMan Production Pipeline
  • 原文地址:https://www.cnblogs.com/linvan/p/14480061.html
Copyright © 2011-2022 走看看