# Help with "\_grokparsefailure" and "\_geoip\_lookup\_failure"

**URL:** <https://discuss.elastic.co/t/help-with-grokparsefailure-and-geoip-lookup-failure/308702>\
**Category:** Logstash\
**Created:** [July 2, 2022, 3:35am UTC](https://discuss.elastic.co/t/help-with-grokparsefailure-and-geoip-lookup-failure/308702 "2022-07-02T03:35:30Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![roman-tasi](https://avatars.discourse-cdn.com/v4/letter/r/7ea924/32.png) [@roman-tasi](https://discuss.elastic.co/u/roman-tasi)\
**Post date:** [July 2, 2022, 3:35am UTC](https://discuss.elastic.co/t/help-with-grokparsefailure-and-geoip-lookup-failure/308702/1 "2022-07-02T03:35:30Z")

</div>

I am getting those error tags. Here is my filter section from my logstash section (Note that I started to get the `_grokparsefailure` after adding the second grok with the `src` match, it was working fine with just the top grok):

```auto
filter {
  if [type]=="syslog" {
        grok {
                match => {
                "message" => "^<%{NUMBER:[syslog][priority]}>%{SPACE}++%{GREEDYDATA:[syslog][message]}$"
                }
                add_field => ["received_at", "%{@timestamp}"]
                add_field => ["received_from", "%{host}"]
                remove_field => "message"
        }
        grok {
                match => {
                "src" => "%{IP:[src][ip]}:%{NUMBER:[src][port]}:%{GREEDYDATA:[src][extradata]}$"
                }
        }
        kv {
                source => "[syslog][message]"
                remove_field => "[syslog][message]"
        }
        date {
                match => ["[time]", "yyyy-MM-dd HH:mm:ss" ]
                target => "@timestamp"
        }
        geoip {
                source => "[src][ip]"
        }
  }
  if ![ecs] {
                mutate {
                        rename => ["host", "[host][name]" ]
                        update => { "[ecs][version]" => "1.5.0" }
                        add_tag => ["ecs_converted"]
                }
  }
}

```

Also I want to note I am getting` _grokparsefailure` and `_geoip_lookup_failure` even with this `src` (just using this as an example): `141.239.213.245:60288:X1`

Thanks!!

---

<div class="post-metadata">

**Author:** ![sudhagar\_ramesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sudhagar_ramesh/32/105673_2.png) [@sudhagar\_ramesh](https://discuss.elastic.co/u/sudhagar_ramesh)\
**Post date:** [July 2, 2022, 6:12am UTC](https://discuss.elastic.co/t/help-with-grokparsefailure-and-geoip-lookup-failure/308702/2 "2022-07-02T06:12:23Z")

</div>

Hello @roman-tasi

I have tried with your grok failed block and i have changed it which is working for me. Could you this below block of code (just replaced src with message inside match block)

```auto
grok {
match => {
"message" => "%{IP:[src][ip]}:%{NUMBER:[src][port]}:%{GREEDYDATA:[src][extradata]}$"
}

```

Keep Posted!!! Thanks!!!

---

<div class="post-metadata">

**Author:** ![roman-tasi](https://avatars.discourse-cdn.com/v4/letter/r/7ea924/32.png) [@roman-tasi](https://discuss.elastic.co/u/roman-tasi)\
**Post date:** [July 2, 2022, 8:03am UTC](https://discuss.elastic.co/t/help-with-grokparsefailure-and-geoip-lookup-failure/308702/3 "2022-07-02T08:03:01Z")

</div>

Did not work for me. Same `_grokparsefailure` and `_geoip_lookup_failure` errors.

---

<div class="post-metadata">

**Author:** ![sudhagar\_ramesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sudhagar_ramesh/32/105673_2.png) [@sudhagar\_ramesh](https://discuss.elastic.co/u/sudhagar_ramesh)\
**Post date:** [July 2, 2022, 11:07am UTC](https://discuss.elastic.co/t/help-with-grokparsefailure-and-geoip-lookup-failure/308702/4 "2022-07-02T11:07:50Z")

</div>

Could you share some log lines to reproduce the issue

---

<div class="post-metadata">

**Author:** ![roman-tasi](https://avatars.discourse-cdn.com/v4/letter/r/7ea924/32.png) [@roman-tasi](https://discuss.elastic.co/u/roman-tasi)\
**Post date:** [July 3, 2022, 1:34am UTC](https://discuss.elastic.co/t/help-with-grokparsefailure-and-geoip-lookup-failure/308702/5 "2022-07-03T01:34:36Z")

</div>

My syslog logs are coming in with these tags:  
`_grokparsefailure, _geoip_lookup_failure, ecs_converted`

---

<div class="post-metadata">

**Author:** ![sudhagar\_ramesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sudhagar_ramesh/32/105673_2.png) [@sudhagar\_ramesh](https://discuss.elastic.co/u/sudhagar_ramesh)\
**Post date:** [July 4, 2022, 3:22am UTC](https://discuss.elastic.co/t/help-with-grokparsefailure-and-geoip-lookup-failure/308702/6 "2022-07-04T03:22:31Z")

</div>

yes, because the logs are not matched maybe which is the reason i have asked to share few lines.

Does your grok pattern works fine in [Grok Debugger (grokdebug.herokuapp.com)](https://grokdebug.herokuapp.com/)

---

<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 1, 2022, 3:23am UTC](https://discuss.elastic.co/t/help-with-grokparsefailure-and-geoip-lookup-failure/308702/7 "2022-08-01T03:23:20Z")

</div>

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