Kibana-服务器停机时的监视程序;如果服务器停机24小时,则采取后续措施?

问题描述 投票:0回答:1

我有许多服务器通过心跳来ping通。我想弄清楚该怎么做的是:

“” Watcher 1“每分钟运行-当服务器持续关闭一分钟(没有monitor.status =在过去60秒的文件中心跳中某个地址的任何文件都已启动),请发送电子邮件通知,然后触发“观察者”以每24小时再次进行评估。

  • “ Watcher 2”-在24小时标记处,如果服务器仍然一直关闭(没有monitor.status = up,则该服务器在为该服务器返回的任何心跳文档中ping该地址的任何文档过去24小时),则触发另一封电子邮件。

  • 在此“等待24小时”期间,暂停服务器上每分钟运行的“ Watcher 1”

这样的功能是否可以通过观察程序/警报功能(无需自定义)?我看过以前发布的工作流程简单的停机通知,但不确定是否可以执行其余的操作。

elasticsearch kibana filebeat heartbeat metricbeat
1个回答
0
投票

我认为您应该在观察者中查看Throttling选项。根据Elasticsearch documentation

在执行监视期间,一旦满足条件,便会做出决定根据已配置的操作来决定是否应进行限制。的限制动作的主要目的是防止执行过多同一只手表的动作相同。

"actions" : {
    "email_administrator" : {
      "throttle_period": "24h", 
      "email" : { 
        "to" : "[email protected]",
        "subject" : "Encountered {{ctx.payload.hits.total}} errors",
        "body" : "Too many error in the system, see attached data",
        "attachments" : {
          "attached_data" : {
            "data" : {
              "format" : "json"
            }
          }
        },
        "priority" : "high"
      }
    }
© www.soinside.com 2019 - 2024. All rights reserved.