# Count of Log messages on logstash

**URL:** <https://discuss.elastic.co/t/count-of-log-messages-on-logstash/237827>\
**Category:** Logstash\
**Created:** [June 19, 2020, 3:22pm UTC](https://discuss.elastic.co/t/count-of-log-messages-on-logstash/237827 "2020-06-19T15:22:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dublin\_2020](https://avatars.discourse-cdn.com/v4/letter/d/a4c791/32.png) [@Dublin\_2020](https://discuss.elastic.co/u/Dublin_2020)\
**Post date:** [June 19, 2020, 3:22pm UTC](https://discuss.elastic.co/t/count-of-log-messages-on-logstash/237827/1 "2020-06-19T15:22:22Z")

</div>

Hi Guys i am new to elastic search , need an insight on how can we get the count of Log messages received in Logstash from rsyslog server. Any idea , this is to check the differnce in logs forwarded from rsyslog and recieved at Logstash end .

---

<div class="post-metadata">

**Author:** ![mgotechlock](https://avatars.discourse-cdn.com/v4/letter/m/dc4da7/32.png) [@mgotechlock](https://discuss.elastic.co/u/mgotechlock)\
**Post date:** [June 21, 2020, 1:29pm UTC](https://discuss.elastic.co/t/count-of-log-messages-on-logstash/237827/2 "2020-06-21T13:29:02Z")

</div>

I don't know how you would count that at the logstash end, but if the data is making it to Elasticsearch, this should be doable. Is it?

---

<div class="post-metadata">

**Author:** ![wangqinghuan](https://avatars.discourse-cdn.com/v4/letter/w/d26b3c/32.png) [@wangqinghuan](https://discuss.elastic.co/u/wangqinghuan)\
**Post date:** [June 21, 2020, 1:51pm UTC](https://discuss.elastic.co/t/count-of-log-messages-on-logstash/237827/3 "2020-06-21T13:51:58Z")

</div>

Is this helpful : [https://www.elastic.co/guide/en/logstash/current/plugins-filters-metrics.html](https://www.elastic.co/guide/en/logstash/current/plugins-filters-metrics.html)

---

<div class="post-metadata">

**Author:** ![NerdSec](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nerdsec/32/22056_2.png) [@NerdSec](https://discuss.elastic.co/u/NerdSec)\
**Post date:** [June 21, 2020, 2:20pm UTC](https://discuss.elastic.co/t/count-of-log-messages-on-logstash/237827/4 "2020-06-21T14:20:41Z")

</div>

Hi Dublin,

Yes it is definitely possible. @steffens had helped me on an [issue](https://discuss.elastic.co/t/filebeat-slow-improve-performance/144717/3) a couple of years back

The relevant part is as follows:  
simple logstash config for testing:

```auto
input {
  beat { ... }
}

output {
  stdout { codec => dots }
}

```

This config prints one dot per event. Using pv we can measure throughput:

```auto
./bin/logstash test.cfg | pv -War > /dev/null

```

This will give you the event rate in terms of bytes/sec. To get an idea about the actual event rate, you will have to use the [metric filter](https://www.elastic.co/guide/en/logstash/current/plugins-filters-metrics.html). Hope this helps! 🙂

---

<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 19, 2020, 2:31pm UTC](https://discuss.elastic.co/t/count-of-log-messages-on-logstash/237827/5 "2020-07-19T14:31:38Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
