ElasticSearch疑难解答观察者:illegal_argument_exception

时间:2017-03-24 07:40:59

标签: elasticsearch xpack

Watcher正在工作并成功警告Slack频道,但现在我遇到了麻烦。

我所做的唯一改变是更新其刷新间隔。当我运行以下GET时,它将观察者操作的状态返回为“awaits_successful_execution”。

GET _watcher / watch / my_watcher

{
"found": true,
  "_id": "etl_incr_morp_to_hermes",
  "_status": {
    "version": 432497,
    "state": {
      "active": true,
      "timestamp": "2017-03-24T07:14:41.301Z"
    },
    "actions": {
      "notify-slack": {
        "ack": {
          "timestamp": "2017-03-24T07:14:41.301Z",
          "state": "awaits_successful_execution"
        }
      }
    }
  }
...

我查看了Elastic的文档。当我尝试通过调用以下API来获取有关观察者的更多信息时,我得到了以下结果:

GET _watcher

{
  "error": {
    "root_cause": [
      {
        "type": "illegal_argument_exception",
        "reason": "No endpoint or operation is available at [_watcher]"
      }
    ],
    "type": "illegal_argument_exception",
    "reason": "No endpoint or operation is available at [_watcher]"
  },
  "status": 400
}

我怎么能麻烦观察者?有没有我可以检查的日志?

1 个答案:

答案 0 :(得分:0)

我找到了答案! 以下请求返回指定观察者的执行历史记录。



GET .watcher-history*/_search
{
  "query": {
    "query_string": {
      "query": "watch_id: my_watcher"
    }
  },
  "size": 1,
  "sort": [
    {
      "result.execution_time": { "order": "desc"}
    }
  ]
}