logstash-plugins / logstash-filter-metrics

Apache License 2.0
15 stars 29 forks source link

Logstash metrics plugin in 1.4.2 #13

Open jordansissel opened 9 years ago

jordansissel commented 9 years ago

(This issue was originally filed by @AGirin at https://github.com/elastic/logstash/issues/2154)


Does metrics plugin actually work in 1.4.2? I cannot make it output any rates or count:

generator { type => "generated" } } filter { metrics { meter => "events" add_tag => "metric" } } output { stdout { codec => line { format => "Rate: %{events.count}" } }

stdout {

  codec => rubydebug

} }

All I get is:

Rate: %{events.count} { "message" => "Hello world!", "@version" => "1", "@timestamp" => "2014-12-01T21:35:11.195Z", "type" => "generated", "host" => "Servername", "sequence" => 10, "events" => {} }

I tried both on Windows and Linux with no success.

GaryRogers commented 9 years ago

Seeing the same problem.

filter {
    metrics {
      meter => "event"
      add_tag => [ "metric" ]
      add_field => {
        "metric" => "This is a metric"
      }
    }
}