# Geoip lookup failure while parsing http json data

**URL:** <https://discuss.elastic.co/t/geoip-lookup-failure-while-parsing-http-json-data/259120>\
**Category:** Logstash\
**Created:** [December 18, 2020, 4:03pm UTC](https://discuss.elastic.co/t/geoip-lookup-failure-while-parsing-http-json-data/259120 "2020-12-18T16:03:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ankitdevnalkar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ankitdevnalkar/32/46158_2.png) [@ankitdevnalkar](https://discuss.elastic.co/u/ankitdevnalkar)\
**Post date:** [December 18, 2020, 4:03pm UTC](https://discuss.elastic.co/t/geoip-lookup-failure-while-parsing-http-json-data/259120/1 "2020-12-18T16:03:08Z")

</div>

I am trying to perform Geoip filter while parsing json logs data from clouflare API but it says `_geoip_lookup_failure`

here is my `conf` file configurations

```
    input {
      http_poller {
        urls => {
          test2 => {
            method => get
            url => "https://api.cloudflare.com/client/v4/user/audit_logs"
            headers => {
                "X-Auth-Email" => "my@email.com"
                "X-Auth-Key" => "API_key"
                "Content-Type" => "application/json"
            }
         }
        }
    	codec => "json"
      }
    }
    filter {
      geoip {
        source => "[actor][ip]"
      }
    }
    output {
            stdout { codec => rubydebug }
}

```

following is my output

 ![Selection_062](https://us1.discourse-cdn.com/elastic/original/3X/2/e/2e1db3d447673b8c01b84d533133e91ab31d29d8.png)

---

<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:** [December 18, 2020, 5:37pm UTC](https://discuss.elastic.co/t/geoip-lookup-failure-while-parsing-http-json-data/259120/2 "2020-12-18T17:37:58Z")

</div>

This looks similar to your other post. You have an array, which I guess is called result, but at this point you have not split it. If you split it then you will be able to do a geoip lookup on `%{[result][actor][ip]}`.

---

<div class="post-metadata">

**Author:** ![ankitdevnalkar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ankitdevnalkar/32/46158_2.png) [@ankitdevnalkar](https://discuss.elastic.co/u/ankitdevnalkar)\
**Post date:** [December 18, 2020, 5:49pm UTC](https://discuss.elastic.co/t/geoip-lookup-failure-while-parsing-http-json-data/259120/3 "2020-12-18T17:49:56Z")

</div>

Thanks a lot 🙂

---

<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:** [January 15, 2021, 5:50pm UTC](https://discuss.elastic.co/t/geoip-lookup-failure-while-parsing-http-json-data/259120/4 "2021-01-15T17:50:05Z")

</div>

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