# Throttle Filter Logstash

**URL:** <https://discuss.elastic.co/t/throttle-filter-logstash/304104>\
**Category:** Logstash\
**Created:** [May 6, 2022, 8:12am UTC](https://discuss.elastic.co/t/throttle-filter-logstash/304104 "2022-05-06T08:12:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bigboy0706](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@Bigboy0706](https://discuss.elastic.co/u/Bigboy0706)\
**Post date:** [May 6, 2022, 8:12am UTC](https://discuss.elastic.co/t/throttle-filter-logstash/304104/1 "2022-05-06T08:12:39Z")

</div>

Hi  
As there are some deduplicated log ingressing into logstash  
That's why I would like to use the Throttle Filter to filter out the log  
The config is listed as below

```auto
filter {
     if [name] == "pack_incident_response_process_events" {
        throttle {
          before_count => -1
          after_count => 1
          period => 10
          max_age => 20
          key => "%{hostIdentifier_s}%{columns_cmdline_s}%{columns_path_s}"
          add_tag => "throttledd"
        }
  }

```

 ![Screenshot 2022-05-06 at 4.13.58 PM](https://us1.discourse-cdn.com/elastic/original/3X/5/9/59b4c2d8969d14c142c8acb65db8d4011f8cb149.png)  
But for the result, only one event is able to shown-up without the throttledd tags which mean the other different log had been filtered-out if I drop the tags = throttledd, but i just want to filter out the same cmdline log.

Please advise.

Thanks

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [May 6, 2022, 4:47pm UTC](https://discuss.elastic.co/t/throttle-filter-logstash/304104/2 "2022-05-06T16:47:21Z")

</div>

The throttle filter adds a tag to indicate that events have the same [key] value. What to do with that information is left to you. For example, you can

```
if "throttled" in [tags] { drop {} }

```

to discard the duplicates _if that is what you want_.

---

<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:** [June 3, 2022, 4:47pm UTC](https://discuss.elastic.co/t/throttle-filter-logstash/304104/3 "2022-06-03T16:47:36Z")

</div>

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