# Multiple geoip target for source and destination

**URL:** <https://discuss.elastic.co/t/multiple-geoip-target-for-source-and-destination/225417>\
**Category:** Logstash\
**Created:** [March 27, 2020, 1:37pm UTC](https://discuss.elastic.co/t/multiple-geoip-target-for-source-and-destination/225417 "2020-03-27T13:37:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fadjar340](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fadjar340/32/43610_2.png) [@fadjar340](https://discuss.elastic.co/u/fadjar340)\
**Post date:** [March 27, 2020, 1:37pm UTC](https://discuss.elastic.co/t/multiple-geoip-target-for-source-and-destination/225417/1 "2020-03-27T13:37:43Z")

</div>

Hi,

I just create logstash filter and need multiple target of geoip, for source and destination.  
The source already have from the filter but for destination target not create the source.geoip.location and destination.geoip.location, only source.geoip.lat and source.geoip.lon.

I have create the template like below:

```auto
"source" : {
              "properties" : {
                "bytes" : {
                  "type" : "integer"
                },
                "geoip" : {
                  "properties" : {
                    "city_name" : {
                      "type" : "text",
                      "fields" : {
                        "keyword" : {
                          "type" : "keyword",
                          "ignore_above" : 256
                        }
                      }
                    },
                    "continent_code" : {
                      "type" : "text",
                      "fields" : {
                        "keyword" : {
                          "type" : "keyword",
                          "ignore_above" : 256
                        }
                      }
                    },
                    "country_code2" : {
                      "type" : "text",
                      "fields" : {
                        "keyword" : {
                          "type" : "keyword",
                          "ignore_above" : 256
                        }
                      }
                    },
                    "country_code3" : {
                      "type" : "text",
                      "fields" : {
                        "keyword" : {
                          "type" : "keyword",
                          "ignore_above" : 256
                        }
                      }
                    },
                    "country_name" : {
                      "type" : "text",
                      "fields" : {
                        "keyword" : {
                          "type" : "keyword",
                          "ignore_above" : 256
                        }
                      }
                    },
                    "dma_code" : {
                      "type" : "long"
                    },
                    "ip" : {
                      "type" : "ip"
                    },
                    "latitude" : {
                      "type" : "half_float"
                    },
                    "location" : { 
                      "type" : "geo_point" 
                    }, 
                    "longitude" : {
                      "type" : "half_float"
                    },
                    "postal_code" : {
                      "type" : "text",
                      "fields" : {
                        "keyword" : {
                          "type" : "keyword",
                          "ignore_above" : 256
                        }
                      }
                    },
                    "region_code" : {
                      "type" : "text",
                      "fields" : {
                        "keyword" : {
                          "type" : "keyword",
                          "ignore_above" : 256
                        }
                      }
                    },
                    "region_name" : {
                      "type" : "text",
                      "fields" : {
                        "keyword" : {
                          "type" : "keyword",
                          "ignore_above" : 256
                        }
                      }
                    },
                    "timezone" : {
                      "type" : "text",
                      "fields" : {
                        "keyword" : {
                          "type" : "keyword",
                          "ignore_above" : 256
                        }
                      }
                    }
                  }
                }

```

Is my template wrong?

Appreciate of some help...

Regards,  
Fadjar Tandabawana

---

<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 24, 2020, 1:37pm UTC](https://discuss.elastic.co/t/multiple-geoip-target-for-source-and-destination/225417/2 "2020-04-24T13:37:55Z")

</div>

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