Changes between Version 5 and Version 6 of ELK
- Timestamp:
- 03/01/21 03:07:19 (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ELK
v5 v6 27 27 == Query index/data/add/delete == 28 28 29 show index (DB) that use in ELK29 Show index (DB) that use in ELK 30 30 {{{ 31 31 curl -X GET localhost:9200/_cat/indices … … 69 69 70 70 71 add data71 Add data 72 72 {{{ 73 73 curl -XPUT 'http://172.18.0.3:31311/twitter/tweet/1' -d 'abc,4.0,5.0,1.0' 74 74 }}} 75 75 76 search and show all data76 Search and show all data 77 77 {{{ 78 78 curl -X GET http://localhost:9200/logstash-2021.02.02-000001/_doc/_search?pretty=true 79 79 }}} 80 80 81 Query 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 86 Delete data from date to date, TIME was GMT ex. in Kibana show 10:00 but in query should be 10-7 = 03:00 87 {{{ 88 curl -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 }}}