gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-03 02:29:57 32 4
gpt4 key购买 nike

我有许多服务器被心跳ping通。我正在尝试找出方法是:

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

  • “Watcher 2”-在24小时标记,如果服务器仍然一直关闭(没有monitor.status =在过去24小时内为该服务器返回的任何心跳文档中,该地址ping的任何文档都已打开),则触发另一封电子邮件。
  • 在此“等待24小时”期间,暂停在服务器上每分钟运行的“Watcher 1”

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

    最佳答案

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

    During the watch execution, once the condition is met, a decision is made per configured action as to whether it should be throttled. The main purpose of action throttling is to prevent too many executions of the same action for the same watch.


    "actions" : {
    "email_administrator" : {
    "throttle_period": "24h",
    "email" : {
    "to" : "sys.admino@host.domain",
    "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"
    }
    }

    关于elasticsearch - Kibana-服务器停机时的监视程序;如果服务器停机24小时,则采取后续措施?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60214622/

    32 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com