0

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

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

获取 _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 获取有关观察者的更多信息时,我得到以下结果:

获取 _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
}

如何解决观察者问题?有没有我可以检查的日志?

4

1 回答 1

0

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

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

于 2017-03-25T18:59:01.687 回答