Build elasticsearch + logstash + kibana version 7.2.0

Keywords: Java ElasticSearch JDK JSON

Preface

Recently I saw the 7.x version of elasticsearch. In addition, I used elasticsearch frequently in the project. I simply recorded the learning process. At the beginning, I was ready to build an ELK on this machine.

Building ELK - elastic search

First step

Select the appropriate version to download: https://www.elastic.co/cn/dow...

The second step

After downloading, unzip and enter the directory

➜  elasticsearch-7.2.0 ls
LICENSE.txt    NOTICE.txt     README.textile bin            config         data           jdk            lib            logs           modules        plugins

The third step

Start command:

bin/elasticsearch

The fourth step

Browser input address: http://localhost:9200
See the following interface for successful installation

{
    "name": "zhangpeileideMacBook-Pro.local",
    "cluster_name": "elasticsearch",
    "cluster_uuid": "s_wuhCF5Q_-pf7iZ5NNxYg",
    "version": {
        "number": "7.2.0",
        "build_flavor": "default",
        "build_type": "tar",
        "build_hash": "508c38a",
        "build_date": "2019-06-20T15:54:18.811730Z",
        "build_snapshot": false,
        "lucene_version": "8.0.0",
        "minimum_wire_compatibility_version": "6.8.0",
        "minimum_index_compatibility_version": "6.0.0-beta1"
    },
    "tagline": "You Know, for Search"
}

Building ELK logstash

Step one:

Select the appropriate version to download: https://www.elastic.co/cn/dow...

The second step:

Enter the directory after decompression:

➜  logstash-7.2.0 ls
CONTRIBUTORS             Gemfile.lock             NOTICE.TXT               config                   lib                      logstash-core            modules                  vendor
Gemfile                  LICENSE.txt              bin                      data                     logs                     logstash-core-plugin-api tools                    x-pack

The third step

After entering the config directory, modify the logstash.conf file as follows

# Sample Logstash configuration for creating a simple
# Beats -> Logstash -> Elasticsearch pipeline.

input {
    file{
        path => "/Users/zhangpeilei/test.txt"
    }
}
output {
  elasticsearch {
    hosts => ["http://localhost:9200"]
    index => "test-%{+YYYY.MM.dd}"
    #user => "elastic"
    #password => "changeme"
  }
}

Implementation effect: write the contents of / Users/zhangpeilei/test.txt file to ES

The fourth step

Execute start command

bin/logstash -f config/logstash.conf

Building ELK - Kibana

First step

Select the appropriate version to download: https://www.elastic.co/cn/dow...

The second step

Enter the directory after decompression

➜  kibana-7.2.0-darwin-x86_64 ls
LICENSE.txt  NOTICE.txt   README.txt   bin          built_assets config       data         node         node_modules optimize     package.json plugins      src          target       webpackShims x-pack

The third step

The configuration file config/kibana.yml modifies this line: elasticsearch.hosts: ["http://localhost:9200"]

The fourth step

Start up:

bin/kibana

Start ELK

Browser input: http://localhost:5601
After the index is configured, you can see the data.

More articles on Blogs: https://www.zplxjj.com Public address

Posted by refiking on Tue, 15 Oct 2019 10:50:30 -0700