0

我一直在使用 elasticsearch、metricbeat 和 elastalert 来监视我的服务器。我在上面安装了 nginx,它被用作反向代理,如果 nginx 丢弃或返回一些错误,我需要向它发送一个,我已经配置了一些警报,但是如何制定规则以在它发生时向 nginx 发送警报删除或返回一些错误。非常感谢

4

1 回答 1

1

Metricbeat 仅用于有关系统资源使用情况的数据。您需要的是安装 filebeat 并激活 nginx 模块。然后您可以使用anyelastalert 的规则类型并通过 andfileset.module: nginx过滤fileset.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
于 2019-01-28T11:33:41.767 回答