logstash-plugins / logstash-filter-metrics

Apache License 2.0
15 stars 29 forks source link

output of logstash metrics filter does not add up #29

Open biswajit86 opened 8 years ago

biswajit86 commented 8 years ago

I am trying to understand the output of the logstash metrics filter . I have provided my config below

input {
  beats {    port => 5044  }
}

filter {
   metrics {
       meter => "documents"
       add_tag => "metric"
        flush_interval => 60
   }
}

output {
        if "metric" in [tags] {
                stdout {
                        codec => line { format => "1m rate| %{@timestamp} | %{[documents][rate_1m]} 5m rate: %{[documents][rate_5m]} ( %{[documents][count]} ) "}
                }
        }
        else
        {
                kafka {
                        topic_id => "topbeat-stage"
                        acks => "all"
                }
        }
}

I am generating a meter event every minute. The output from this config looks like this

1m rate| 2016-01-30T03:04:27.086Z | 94.13383390520174 5m rate: 155.7545545326618 ( 17940 )
1m rate| 2016-01-30T03:05:27.087Z | 88.24968300053821 5m rate: 144.52723651339105 ( 22269 )
1m rate| 2016-01-30T03:06:27.086Z | 92.38037875508913 5m rate: 136.8826665572322 ( 26665 )
1m rate| 2016-01-30T03:07:27.086Z | 92.34605776997418 5m rate: 129.6463381559306 ( 31230 )

If I take the last row (1m rate| 2016-01-30T03:07:27.086Z | 92.34605776997418 5m rate: 129.6463381559306 ( 31230 ) ), what does it signify.

This issue was originally posted in elastic discuss channel

andrewvc commented 8 years ago

Thanks for posting this, and apologies for the delay @biswajit86 . I actually didn't see this myself in one test, but I'll be taking a second look at it soon.

smalenfant commented 8 years ago

@biswajit86 I'm just starting to look at this plugin for a few things. Glad I came across this as my metrics might be wrong.

My notes from your post