[英]Logstash Metrics Output
I'm using metrics filter in two fields (backend_name) (http_request) but my output is not working, I'm trying to write this to a csv. 我在两个字段(backend_name)(http_request)中使用了指标筛选器,但是我的输出不起作用,我正在尝试将其写入csv。 someone have a idea what is going on?
有人知道发生了什么事吗?
grok {
match => {"message" =>'%{HAPROXYHTTP}'}
}
metrics {
meter => [ "%{backend_name} %{http_request}" ]
add_tag => "metric"
}
output {
file {
path => "/home/netcool/Desktop/teste.csv"
codec => line { format => "rate: %{[%{backend_name} %{http_request}] %[rate_1m]}" }
}
}
stdout {
codec => rubydebug
}
The filter ( metrics
& grok
) plugins should be in the brackets of a filter {}
and the output plugin stdout
should be in output{}
. 过滤器(
metrics
& grok
)插件应放在filter {}
的括号中,输出插件stdout
应在output{}
。
For your configuration, it would look like this: 对于您的配置,它看起来像这样:
filter {
grok {
match => {"message" =>'%{HAPROXYHTTP}'}
}
metrics {
meter => [ "%{backend_name} %{http_request}" ]
add_tag => "metric"
}
}
output {
file {
path => "/home/netcool/Desktop/teste.csv"
codec => line { format => "rate: %{[%{backend_name} %{http_request}] %[rate_1m]}" }
}
stdout {
codec => rubydebug
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.