Changes between Version 5 and Version 6 of ELK


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

--

Legend:

Unmodified
Added
Removed
Modified
  • ELK

    v5 v6  
    2727== Query index/data/add/delete ==
    2828
    29 show index (DB) that use in ELK
     29Show index (DB) that use in ELK
    3030{{{
    3131curl -X GET localhost:9200/_cat/indices
     
    6969
    7070
    71 add data
     71Add data
    7272{{{
    7373curl -XPUT 'http://172.18.0.3:31311/twitter/tweet/1' -d 'abc,4.0,5.0,1.0'
    7474}}}
    7575
    76 search and show all data
     76Search and show all data
    7777{{{
    7878curl -X GET http://localhost:9200/logstash-2021.02.02-000001/_doc/_search?pretty=true
    7979}}}
    8080
     81Query by date
     82{{{
     83 curl -X POST -H "Content-Type: application/json" http://127.0.0.1:9200/mjson-2021-02-09/_doc/_search?pretty=true -d '{"query":{"range":{"@timestamp":{"from":"2021-02-08T00:00:00","to":"2021-02-09T23:59:59" }}}}'
     84}}}
     85
     86Delete data from date to date, TIME was GMT ex. in Kibana show 10:00 but in query should be 10-7 = 03:00
     87{{{
     88curl -X POST -H "Content-Type: application/json" http://127.0.0.1:9200/mjson-2021-02-09/_doc/_delete_by_query -d '{"query":{"range":{"@timestamp":{"from":"2021-02-08T00:00:00","to":"2021-02-09T23:59:59" }}}}'
     89}}}