标签:比较 返回 connect detail conflict logstash ast scroll host
ES迁移方案:more /data/elasticsearch/config/elasticsearch.yml
reindex.remote.whitelist: ["10.10.141.251:9200","10.10.141.252:9200"]
说明:能够reindex的远程集群的白名单
跨集群迁移命令操作
#
curl -XPOST "10.10.48.41:9200/_reindex?wait_for_completion=false" -H ‘Content-Type: application/json‘ -d ‘ {"conflicts":"proceed","source":{"remote":{"host":"http://10.10.141.251:9200","socket_timeout":"8m","connect_timeout":"300s"},"index":"logs-ezr.omcr.productbasic.serverhost-1d200822","size":500},"dest":{"index":"logs-ezr.omcr.productbasic.serverhost-1d200822","op_type":"create"}}‘
#
请求10.10.48.41集群把10.10.141.251集群的索引logs-ezr.omcr.productbasic.serverhost-1d20082迁移至10.10.48.41集群新索引名称为logs-ezr.omcr.productbasic.serverhost-1d200822
参数解释
host:源es的ip与端口
socket_timeout:读取超时时间
connect_timeout:连接超时时间
index:源索引名字
size:批量抓取的size大小
query:查询指定条件下的字段
dest:index:当前索引名字
返回task信息
{"task":"-xr72vhcQUW9Z34bLNbChg:117944144"
查询所有task任务
curl "10.10.48.41:9200/_tasks?pretty&actions=reindex&detailed=true"
查询所有任务
curl "10.10.48.41:9200/_tasks?pretty&actions=&detailed=true"
查询单个task任务
curl "10.10.48.41:9200/_tasks/-xr72vhcQUW9Z34bLNbChg:117944144?pretty"
标签:比较 返回 connect detail conflict logstash ast scroll host
原文地址:https://blog.51cto.com/11676712/2533736