我尝试在logstash中使用指标失败了,我期望在调试输出中看到的是添加了新标记和新字段的日志。尽管如此,我仍然保持日志不变,看起来指标根本不起作用。我的Logstash配置文件如下所示。你能指出我的错误吗?
input {
generator {
type => "generated"
count => 2
lines => ["line 1", "line 2", "line 3"]
}
}
filter {
metrics {
type => "generated"
meter => ["events"]
add_tag => "metric"
add_field => [ "status", "All is OK" ]
}
}
output {
stdout {
message => "rate: %{events.rate_1m}"
debug => true
}
}
logstash:logstash-1.2.1-flatjar.jar 平台:Debian 3.2.46-1 + deb7u1 x86_64
最好的问候
答案 0 :(得分:1)