Curl操作es实践
2019獨角獸企業(yè)重金招聘Python工程師標準>>>
1、目前配置了兩臺,分別是*.*.*.245(node-1)和*.*.*.108(node-2)
2、curl 10.110.27.245:9200/hubble-portal/endpoint_counter_3/_search?pretty -d '{"query" : { "term": { "_endpoint_id":"292644"}}}'
命令詳解:_search 表示是查詢請求,query也是固定的,表示一個篩選查詢;term是篩選類型中的一種,表示按照指定項的值進行篩選;?
含義:查詢索引為hubble-portal,類型為endpoint_counter_3,字段_endpoint_id置為292644的所有數(shù)據(jù)。
?
2、elasticsearch刪除操作
刪除alarm_alarm表
curl -l -H "Content-type: application/json" -XDELETE -d '{"query": {"match_all": {}}}' 'http://10.110.27.245:9200/auto-test/alarm_alarm/_query'
刪除endpoint_counter表
curl -l -H "Content-type: application/json" -XDELETE -d '{"query": {"match_all": {}}}' 'http://10.110.27.245:9200/auto-test/endpoint_counter/_query'
刪除索引hubble-portal-alarm
curl -l -H "Content-type: application/json" -XDELETE -d '{"query": {"match_all": {}}}' 'http://hubble-elasticsearch-online001-jylt.qiyi.virtual:9200/hubble-portal-alarm/'
?
3、多個集群的時候,如5個,創(chuàng)建索引只需要在一個上創(chuàng)建即可;
curl -XPOST hubble…….qiyi.virtual:9200/hubble-portal
4、后臺啟動:
nohup bash $(pwd)//mc_alerts.sh &
?
5、創(chuàng)建索引
curl -XPOST http://hubble-elasticsearch-online001-jylt.qiyi.virtual:9200/hubble-portal-alarm?
?
?
轉載于:https://my.oschina.net/weiweiblog/blog/1568190
與50位技術專家面對面20年技術見證,附贈技術全景圖總結
以上是生活随笔為你收集整理的Curl操作es实践的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Java 异常(Java Excepti
- 下一篇: VLAN的配置模式