# What is the equivalent of grock parse failure for a ruby script

**URL:** <https://discuss.elastic.co/t/what-is-the-equivalent-of-grock-parse-failure-for-a-ruby-script/218178>\
**Category:** Logstash\
**Created:** [February 6, 2020, 1:04pm UTC](https://discuss.elastic.co/t/what-is-the-equivalent-of-grock-parse-failure-for-a-ruby-script/218178 "2020-02-06T13:04:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Incauto](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/incauto/32/60149_2.png) [@Incauto](https://discuss.elastic.co/u/Incauto)\
**Post date:** [February 6, 2020, 1:04pm UTC](https://discuss.elastic.co/t/what-is-the-equivalent-of-grock-parse-failure-for-a-ruby-script/218178/1 "2020-02-06T13:04:55Z")

</div>

Hi I want to make shure that what I send to logstash doesnt contain errors so I wan to add something similar to grokparse failure , but for ruby.

```auto
output {
            if "_grokparsefailure" not in [tags] {
                  if "_ruby ???????????" not in [tags]{}
        }
}

```

---

<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:** [February 6, 2020, 5:10pm UTC](https://discuss.elastic.co/t/what-is-the-equivalent-of-grock-parse-failure-for-a-ruby-script/218178/2 "2020-02-06T17:10:47Z")

</div>

Look at the documentation for [tag\_on\_exception](https://www.elastic.co/guide/en/logstash/current/plugins-filters-ruby.html#plugins-filters-ruby-tag_on_exception).

---

<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:** [March 5, 2020, 5:10pm UTC](https://discuss.elastic.co/t/what-is-the-equivalent-of-grock-parse-failure-for-a-ruby-script/218178/3 "2020-03-05T17:10:55Z")

</div>

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