Domanda

I failed in my attempts to use metrics in logstash, what I expect to see in debug output is logs with new tag and new field added. Nevertheless I get log unchanged, it looks like metrics is not working at all. My Logstash conf file is presented below. Can you please point me my mistake?

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 platform: Debian 3.2.46-1+deb7u1 x86_64

Best Regards

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top