metrics
Meter 示例(速率阈值检测)
filter {
metrics {
meter => "error_%{status}"
add_tag => "metric"
ignore_older_than => 10
}
if "metric" in [tags] {
ruby {
code => "event.cancel if (event.get('[error_504][rate_1m]') * 60 > 100)"
}
}
}
output {
if "metric" in [tags] {
exec {
command => "echo \"Out of threshold: %{[error_504][rate_1m]}\""
}
}
}Timer 示例(box and whisker 异常检测)
Last updated