LEK Integration

Logstash + ElasticSearch + Kibana => Log Analysization Platform

1. Log File

  1. We can download log tutorial from here: https://download.elastic.co/demos/logstash/gettingstarted/logstash-tutorial.log.gz
  2. Put logstash-tutorial file to destination directory
    stevelee@SteveLee ~/Downloads cp ./logstash-tutorial.log /tmp

2. Configuring Logstash Service

  1. Create configuration file

    stevelee@SteveLee ~/Develop/logstash-2.2.2 vi logstash-demo.conf

    # The # character at the beginning of a line indicates a comment. Use

    # comments to describe your configuration.

    input {

    file {

    path => "/tmp/logstash-tutorial.log"

    }

    }

    # The filter part of this file is commented out to indicate that it is

    # optional.

    # filter {

    #

    # }

    output {

    elasticsearch {

    action => "index"                                #The operation on ES

    index  => "logstash-tutorial-es"               #The index to write data to, can be any string.

    }

    }

3. Run Elasticsearch Service

stevelee@SteveLee ~/Develop/elasticsearch-2.2.0 ./bin/elasticsearch &

4. Run Logstash Service

stevelee@SteveLee ~/Develop/logstash-2.2.2 ./bin/logstash -f logstash-demo.conf

5. Check index created successfully or not

a.Check Elasticsearch console. If it shows information like below, created successfully.

_images/elasticconsolelog.png

6. Run Kibana Service

stevelee@SteveLee ~/Develop/kibana-4.4.1-darwin-x64 ./bin/kibana &

7. Kibana Dashboard

a. Visit http://127.0.0.1:5601.

_images/kibanafirstpage.png

b. Select Setting, and key in index name (logstash-tutorial-es), then click create button.

_images/kibanasetting.png

c. Select Discover, If shows “no results found”, need to follow below opeartion:

_images/kibanadiscover.png

d. Filter, and save the result, name Result1

_images/kibanasearch1.png
_images/kibanasearch2.png
_images/kibanasearch3.png

d. Select Visualize, and choose “Tile Map”, and choose “From a saved search(Result1), and Next:”

_images/kibanavisualize.png

e. Saved visualzation result.

f. Select Dashboard.