【发布时间】:2021-08-01 17:03:08
【问题描述】:
我正在使用 ElasticCloud,版本 v7.12.1,我已经设置了一个观察者来检查集群的健康状况,如下所示:
PUT _watcher/watch/cluster_health_watch
{
"trigger" : {
"schedule" : { "cron" : "0 0/5 * * * ?" }
},
"input" : {
"http" : {
"request" : {
"host" : "localhost",
"port" : 9200,
"path" : "/_cluster/health",
"auth": {
"basic": {
"username": "Myuser",
"password": "mypassword"
}
}
}
}
},
"condition" : {
"compare" : {
"ctx.payload.status" : { "not_eq" : "green" }
}
},
"actions" : {
"slackmonitoring" : {
"throttle_period" : "5m",
"slack" : {
"message" : {
"to" : [ "test-webhook" ],
"text" : "Cluster is Unhealthy!"
}
}
}}
}
失败并出现此错误:
"input": {
"type": "http",
"status": "failure",
"error": {
"root_cause": [
{
"type": "http_host_connect_exception",
"reason": "Connect to localhost:9200 [localhost/127.0.0.1] failed: Connection refused"
}
],
经过一番搜索,有人提到要补充: network.host: 127.0.0.1 到 elasticsearch.yml 但是,当我添加它并尝试保存它时,我得到了这个错误:
Elasticsearch - 'network.host':不允许
我找不到有关此问题的任何文档及其解决方案,如果有人可以提供帮助,我将不胜感激。
【问题讨论】:
标签: elastic-cloud elasticsearch-watcher