Changes between Version 4 and Version 5 of ELK


Ignore:
Timestamp:
03/01/21 03:03:59 (4 years ago)
Author:
krit
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ELK

    v4 v5  
    2424docker run --rm --name kibana --net=mynetwork -p 5601:5601 kibana:7.6.2 
    2525}}}
     26
     27== Query index/data/add/delete ==
     28
     29show index (DB) that use in ELK
     30{{{
     31curl -X GET localhost:9200/_cat/indices
     32}}}
     33
     34When start logstash, we need to edit logstash.conf under pipeline/logstash.conf
     35{{{
     36#!sh
     37[krit@mini bitnami-docker-logstash]$ cat pipeline/logstash.conf
     38input {
     39  http {
     40    host => "0.0.0.0" # default: 0.0.0.0
     41    port => 31311 # default: 8080
     42  }
     43}
     44
     45filter {
     46  csv {
     47    separator => ","
     48    columns => ["ID", "Moisture", "Temperature", "Light"]
     49    convert => {
     50      "Moisture" => "float"
     51      "Temperature" => "float"
     52      "Light" => "float"
     53    }
     54  }
     55
     56  mutate {
     57    remove_field => ["host", "headers"]
     58  }
     59}
     60
     61output {
     62  elasticsearch {
     63    hosts => ["elasticsearch:9200"]
     64    index => "logstash-2021.02.02-000001"
     65  }
     66}
     67[krit@mini bitnami-docker-logstash]$
     68}}}
     69
     70
     71add data
     72{{{
     73curl -XPUT 'http://172.18.0.3:31311/twitter/tweet/1' -d 'abc,4.0,5.0,1.0'
     74}}}
     75
     76search and show all data
     77{{{
     78curl -X GET http://localhost:9200/logstash-2021.02.02-000001/_doc/_search?pretty=true
     79}}}
     80