elk常用命令
Posted wangmo
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了elk常用命令相关的知识,希望对你有一定的参考价值。
curl -XGET ‘192.168.1.102:9200/_cat/indices?v&pretty‘
curl -XDELETE ‘http://192.168.1.102:9200/log*‘
curl -XGET "http://192.168.1.102:9200/logstash-2018.09.06/_mapping?pretty"
curl -XPUT "http://192.168.1.102:9200/logstash-2018.09.06"
curl -XGET ‘http://192.168.1.102:9200/_template/logstash‘
curl -XGET "http://192.168.1.102:9200/cars/_search?pretty"
#修改mapping
curl -X PUT "192.168.1.102:9200/cars/_mapping/transactions" -H ‘Content-Type: application/json‘ -d‘
{
"properties": {
"make": {
"type": "text",
"fielddata": true
}}}‘
curl -X GET "192.168.1.102:9200/cars/transactions/_search?pretty" -H ‘Content-Type: application/json‘ -d‘
{
"size" : 0,
"aggs" : {
"popular_colors" : {
"terms" : {
"field" : "color"
}}}}‘
以上是关于elk常用命令的主要内容,如果未能解决你的问题,请参考以下文章