# Grok: tag\_on\_failure is not working and has no effect

**URL:** <https://discuss.elastic.co/t/grok-tag-on-failure-is-not-working-and-has-no-effect/271320>\
**Category:** Logstash\
**Created:** [April 27, 2021, 6:40am UTC](https://discuss.elastic.co/t/grok-tag-on-failure-is-not-working-and-has-no-effect/271320 "2021-04-27T06:40:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![meerlicht](https://avatars.discourse-cdn.com/v4/letter/m/a88e4f/32.png) [@meerlicht](https://discuss.elastic.co/u/meerlicht)\
**Post date:** [April 27, 2021, 6:40am UTC](https://discuss.elastic.co/t/grok-tag-on-failure-is-not-working-and-has-no-effect/271320/1 "2021-04-27T06:40:34Z")

</div>

Hi there,

I can't get my head around why this snippet **successfully** groks the message, but neither sets nor removes the tags. I've tried to set a custom tag and also removing all tags (as in the current snippet)

```auto
grok { 
  #tag_on_failure => ["grok_https"]
  tag_on_failure => []
  match => { "action" => "\"%{DATA:http_method} %{DATA:http_req} %{DATA:http_version}\"$"}
}

```

I'm still getting the tag `_grokparsefailure` if the pattern fails.  
Logstash 7.12.0 with Elasticsearch 7.12.0

Thanks for any indications...

---

<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:** [May 25, 2021, 6:40am UTC](https://discuss.elastic.co/t/grok-tag-on-failure-is-not-working-and-has-no-effect/271320/2 "2021-05-25T06:40:53Z")

</div>

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