我如何使用 metricbeat 检查我的服务器是否处于活动状态,这可能吗?

How can I check if my server is alive with metricbeat, Is it possible?

我一直在使用 elasticsearch、metricbeat 和 elastalert 来监视我的服务器。我在上面安装了 nginx,它被用作反向代理,如果 nginx 掉线或 return 出现一些错误,我需要向它发送一个消息,我已经配置了一些警报,但是我如何制定发送警报的规则当它下降或 return 一些错误时到 nginx。 非常感谢

Metricbeat 仅用于有关系统资源使用情况的数据。您需要的是安装 filebeat 并激活 nginx 模块。然后你可以使用 elastalert 的规则类型 any 并通过 fileset.module: nginxfileset.name: error:

过滤
name: your rule name
index: filebeat-*
type: any
filter:
- term:
    fileset.module: "nginx"
- term:
    fileset.name: "error"
alert:
- "slack"
... # your slack config stuff
realert:
  minutes: 1