# Logstash - 1 event ends up 22 times in elasticsearch

**URL:** <https://discuss.elastic.co/t/logstash-1-event-ends-up-22-times-in-elasticsearch/125583>\
**Category:** Logstash\
**Created:** [March 26, 2018, 10:36am UTC](https://discuss.elastic.co/t/logstash-1-event-ends-up-22-times-in-elasticsearch/125583 "2018-03-26T10:36:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lueneburger](https://avatars.discourse-cdn.com/v4/letter/l/f475e1/32.png) [@lueneburger](https://discuss.elastic.co/u/lueneburger)\
**Post date:** [March 26, 2018, 10:36am UTC](https://discuss.elastic.co/t/logstash-1-event-ends-up-22-times-in-elasticsearch/125583/1 "2018-03-26T10:36:56Z")

</div>

Hi everyone,

got a real strange issue right now, haproxy is sending 1 event but logstash send it 22 times to elasticsearch.

i did only 1 change in the config (tested before in a test environment, without any problems)

normal config

```
if [logstash] == "haproxy_log" {
        grok { id => match_haproxy_pattern
                match => {"message" => "%{HAPROXYHTTP}"}
                match => {"message" => "%{HAPROXYTCP}"}
                }

```

changed config

```
if [logstash] == "haproxy_log" {
        grok { id => match_haproxy_pattern
               patterns_dir => ["/etc/logstash/patterns.d/"]
               match => {"message" => ["%{HAPROXYHTTP}", "%{HAPROXYTCP}", "%{HAPROXYHTTP2}", "%{HAPROXYTCP2}"]}
                }

```

the reason for the change was simple, i need to remove from some frontends the client\_ip:port in the logs.

so i just changed the patterns and put both in it.

The question would be now:

did i miss something with the grok filter?  
does the change put a big pressure on the performance? and that maybe could explain it?

also at the time when i did the restart, logs were going up to 70,000 instead of 2,000 per 5minute interval.

thanks in advance for any information

---

<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:** [April 23, 2018, 10:37am UTC](https://discuss.elastic.co/t/logstash-1-event-ends-up-22-times-in-elasticsearch/125583/2 "2018-04-23T10:37:07Z")

</div>

Closed on April 23, 2018, 10:37am UTC

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