如何在kibana v 6.2.3中将监视程序从一个群集导出到另一个群集

时间:2018-09-25 18:07:52

标签: elasticsearch kibana kibana-6

我正在尝试使用以下curl命令将kibana v 6.2.3中的观察者警报从一台服务器导出到另一台服务器。

curl -H 'Content-Type: application/json' -XGET localhost:9200/.kibana/_search?pretty -d '{"from":0,"size":10,"query":{"exists":{"field": "sentinl-watcher"}}}' > /tmp/my_watchers.json

能够从一台服务器成功导出json。但是在尝试使用

导入时
curl -H 'Content-Type: application/x-ndjson' -XPOST 'localhost:9200/bank/account/_bulk?pretty' --data-binary @/tmp/my_watchers.json

出现以下错误

{
  "error" : {
    "root_cause" : [
      {
        "type" : "json_e_o_f_exception",
        "reason" : "Unexpected end-of-input: expected close marker for Object (start marker at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@12c27a7b; line: 1, column: 1])\n at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@12c27a7b; line: 2, column: 3]"
      }
    ],
    "type" : "json_e_o_f_exception",
    "reason" : "Unexpected end-of-input: expected close marker for Object (start marker at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@12c27a7b; line: 1, column: 1])\n at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@12c27a7b; line: 2, column: 3]"
  },
  "status" : 500
}

我在线尝试了JSON格式器,它说我的json文件格式正确。知道如何成功导入它吗?

0 个答案:

没有答案