Spring Boot Tutorial (12) Integration Elk (1)

Source: Internet
Author: User
Tags kibana logstash spring boot tutorial

Elk Introduction
  • Elasticsearch is an open source distributed search engine, it features: distributed, 0 configuration, automatic discovery, Index auto-shard, index copy mechanism, RESTful style interface, multi-data source, automatic search load, etc.

  • Logstash is a fully open source tool that collects, filters, and stores your logs for later use (for example, search).

  • Kibana is also an open source and free tool that Kibana a friendly Web interface for log analysis that Logstash and ElasticSearch can provide to help you summarize, analyze, and search for important data logs.

    Elk Download and install

    elk:https://www.elastic.co/downloads/

    It is recommended to run on Linux, Elk support is not good on Windows, and need jdk1.8 support, need to install the JDK in advance.

    After download: Install to Logstash for chestnuts:

    Cd/usr/local/mkdir LOGSTASHTAR-ZXVF LOGSTASH-5.3.2.TAR.GZMV Logstash-5.3.2/usr/local/logstash

      

    Configuring, starting Elasticsearch

    To open the Elasticsearch configuration file:

    Vim Config/elasticsearch.yml

      

    To modify the configuration:

    network.host=localhostnetwork.port=9200

      

    It is this configuration by default, no special requirements, no modifications are required locally.

    Start Elasticsearch

    ./bin/elasticsearch

      

    Launch success, access to localhost:9200, Web page display:

    {  "name": "56IrTCM",  "cluster_name": "Elasticsearch",  "Cluster_uuid": "E4ja7vs2tiki1bsggeaa6q",  " Version ": {    " number ":" 5.2.2 ",    " Build_hash ":" F9d9b74 ",    " build_date ":" 2017-02-24t17:26:45.835z ",    "Build_snapshot": false,    "lucene_version": "6.4.1"  },  "tagline": "You Know, for Search"}

      

    Configuring, starting Logstash

    Under Logstash's home directory:

      

    Modify the log4j_to_es.conf as follows:

    Input {  log4j {    mode = "Server"    host = "localhost"    port = 4560  }}filter {  #Only Matched data is send to output.} Output {    Elasticsearch {    action = "index"          #The operation on ES    hosts  = "localhost:9200" c11/> #ElasticSearch host, can be array.    Index  = "Applog"         #The Index to write data to.  }}

      

    Start after modifying configuration:

      

    The terminal is displayed as follows:

  • Visit localhost:9600

  • {"Host": "Pc-20130412.local", "Version": "5.3.2", "http_address": "127.0.0.1:9600", "id": " e6bb985c-c688-49a4-a55b-4d362bb4136f "," name ":" Pc-20130412.local "," build_date ":" 2017-04-24t16:32:22z "," build_ Sha ":" 242159a5eea55fe213fe5c852d36455e24252c82 "," Build_snapshot ": false}

      

    Prove that Logstash started successfully.

  • Source Source

Spring Boot Tutorial (12) Integration Elk (1)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.