# Usage of logstash metrics to compute the number of my logs/events

**URL:** https://discuss.elastic.co/t/usage-of-logstash-metrics-to-compute-the-number-of-my-logs-events/24399
**Category:** Logstash
**Created:** [June 26, 2015, 5:27am UTC](https://discuss.elastic.co/t/usage-of-logstash-metrics-to-compute-the-number-of-my-logs-events/24399 "2015-06-26T05:27:06Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![shsantos](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@shsantos](https://discuss.elastic.co/u/shsantos)
#### Post date: [June 26, 2015, 5:27am UTC](https://discuss.elastic.co/t/usage-of-logstash-metrics-to-compute-the-number-of-my-logs-events/24399/1 "2015-06-26T05:27:06Z")

</div>

Hi,

We are using the generator plugin to get the events.rate\_1m/logs.rate\_1m metrics and trying to send it to statsd through the statsd plugin. The rate that we see is too high as show in the screenshot below and gives the rate of logs/events that is generated by the generator,

 ![](https://us1.discourse-cdn.com/elastic/original/2X/4/4eec93ba38a50903e959e86966c335d422229c04.png)

We have used the examples provided in the documentation to get to this logstash config.The config that we are using is as follows,  
input {  
generator {  
type =\> "generated"  
}  
}  
filter {  
if [type] == "generated" {  
metrics {  
meter =\> "events"  
add\_tag =\> "metric"  
}  
}  
}  
output {  
if "metric" in [tags] {  
stdout {  
codec =\> line {  
format =\> "rate: %{events.rate\_1m}"  
}  
}  
statsd {  
host =\> "127.0.0.1"  
port =\> 8125  
gauge =\> ["events.rate\_1m", "%{events.rate\_1m}"]  
sender =\> "eventbroker"  
}  
}  
}

As an end user of Logstash I do not want to know how the generator input plugin is implemented or how many times the generator is called. I want to count what matters to me, that is, the number of MY log/events that arrive at logstash input. So I think that the generator input plugin is not as intuitive as it should be. this is a bug fix / feature enhancement that should be looked at.

Thanks  
Shruthi

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 6, 2017, 5:36am UTC](https://discuss.elastic.co/t/usage-of-logstash-metrics-to-compute-the-number-of-my-logs-events/24399/2 "2017-07-06T05:36:06Z")

</div>


