在所有index索引中过滤 mk-campaign 索引
curl -s "http://10.107.36.25:9200/_cat/indices?v" | grep "mk-campaign"
关闭index , 打卡index用_open
curl -XPOST 'http://10.107.36.25:9200/mk-campaign.crland-prod.application-2021-06/_close'
查询 6-28 到 6-29 时间段 的日志, 关键字 logtime
curl -XGET 'http://10.107.36.25:9200/mk-campaign.crland-prod.application-2021-06/_search?pretty' -H "Content-Type: application/json" -d '
{
"query":{
"bool": {
"must": [
{"range" : {
"logtime" : {
"gte" : "2021-06-28 00:00:00.000",
"lt" : "2021-06-29 00:00:00.000"
}
}}
]
}
},
"size": 9999
}' >>/tmp/2021-06-28.log