# How to count log entries based on a filter

**URL:** <https://discuss.elastic.co/t/how-to-count-log-entries-based-on-a-filter/92592>\
**Category:** Logstash\
**Created:** [July 11, 2017, 7:31am UTC](https://discuss.elastic.co/t/how-to-count-log-entries-based-on-a-filter/92592 "2017-07-11T07:31:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonathan\_Kosgei](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jonathan_kosgei/32/19950_2.png) [@Jonathan\_Kosgei](https://discuss.elastic.co/u/Jonathan_Kosgei)\
**Post date:** [July 11, 2017, 7:31am UTC](https://discuss.elastic.co/t/how-to-count-log-entries-based-on-a-filter/92592/1 "2017-07-11T07:31:17Z")

</div>

I need to be able to count how many requests each user makes to a particular api, each request is logged to logstash and contains the consumerID and the name of the api, I'd like to be able to get a count of how many logs/requests a particulat user makes from logstash.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [July 12, 2017, 7:54pm UTC](https://discuss.elastic.co/t/how-to-count-log-entries-based-on-a-filter/92592/2 "2017-07-12T19:54:51Z")

</div>

I just answered a very similar question here: [Finding most frequently accessed URI-paths / Transactions using Logstash](https://discuss.elastic.co/t/finding-most-frequently-accessed-uri-paths-transactions-using-logstash/92644)

---

<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:** [August 9, 2017, 7:54pm UTC](https://discuss.elastic.co/t/how-to-count-log-entries-based-on-a-filter/92592/3 "2017-08-09T19:54:56Z")

</div>

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