我不太了解elastalert。我只想知道,当集群状态为红色时,是否可以使用elastalert获得通知。
谢谢
发布于 2017-05-10 14:41:16
这是可能的。但是您需要通过集群健康查询来访问它。示例:
input{
exec {
curl -u <username>:<password> <elasticsearch-ip:port>/_cluster/health
codec => rubydebug
type => cluster-health
}
}
output {
if "health" in [type] {
elasticsearch{
index => "cluster-health-%{+YYYY.MM.dd}"
hosts => ["elasticsearch-host:port"]
}
}
}如果您有不能解析它的过滤器,那么添加一个带有if [type] == "cluster-health"的过滤器部分来过滤并将其解析为json。这将为您提供基本的详细信息。尽管您可能需要更新status的字段映射..至少我正面临着问题,而你有现成的时间。现在你可以像平常一样在elastalert下使用它了。
发布于 2017-11-07 13:54:36
看起来他们还没有这个开箱即用的功能。但有一些老生常谈的方法来实现它,他们建议使用https://github.com/Yelp/elastalert/issues/903取而代之。
发布于 2016-11-19 05:08:18
据我所知没有。
当前Elastalert documentation声明索引字段在规则.yaml文件中是必填字段。
目前elasticsearch集群提供健康状态的方式是通过healthapi,因此没有索引可供查询。
https://stackoverflow.com/questions/40128821
复制相似问题