Logstash 博桑&x2B;日志存储-如何配置警报?
尝试基于日志存储查询配置警报 这是我的简化配置:Logstash 博桑&x2B;日志存储-如何配置警报?,logstash,bosun,Logstash,Bosun,尝试基于日志存储查询配置警报 这是我的简化配置: logstashElasticHosts = http://<url>:9200 alert logstash.errorrate.exceeds1 { template = generic $notes = "The rate of errors in 5 sec exceeds 1." $lastday = lscount("prod", "level:ERROR", "level:ERROR", "5s
logstashElasticHosts = http://<url>:9200
alert logstash.errorrate.exceeds1 {
template = generic
$notes = "The rate of errors in 5 sec exceeds 1."
$lastday = lscount("prod", "level:ERROR", "level:ERROR", "5s", "10m", "")
$lastDayMax = max($lastday)
warn = $lastDayMax > 1
warnNotification = email
}
那么我做错了什么?
(弹性工作正常。我已经与Kibana UI进行了检查。)问题出现在
键串/filterString
案例中。奇怪的是,虽然级别记录为ERROR
(大写),但查询只在小写中起作用:“level:ERROR”
,而不是“level:ERROR”
,在表达式页面上以lscount(“prod”、“level:ERROR”、“5s”、“10m”开头,并确保有实际结果
criticals: 0, warnings: 0, normals: 0, errors: 0