# How to use custom ISP database in geoip?

**URL:** <https://discuss.elastic.co/t/how-to-use-custom-isp-database-in-geoip/51548>\
**Category:** Logstash\
**Created:** [June 1, 2016, 10:40am UTC](https://discuss.elastic.co/t/how-to-use-custom-isp-database-in-geoip/51548 "2016-06-01T10:40:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Morriaty](https://avatars.discourse-cdn.com/v4/letter/m/8e8cbc/32.png) [@Morriaty](https://discuss.elastic.co/u/Morriaty)\
**Post date:** [June 1, 2016, 10:40am UTC](https://discuss.elastic.co/t/how-to-use-custom-isp-database-in-geoip/51548/1 "2016-06-01T10:40:29Z")

</div>

The ISP database from MAXMIND is only suitable for USA ISP, and not correct out of USA

> The ISP name is about 95% accurate in the US. Outside the US, accuracy ranges from 50% to 80%, depending on the country. The data is generally more accurate for countries with more Internet users.

I got a csv formatted isp data suitable for my region.  
How can I use it?

Thank you for help!

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 2, 2016, 1:06am UTC](https://discuss.elastic.co/t/how-to-use-custom-isp-database-in-geoip/51548/2 "2016-06-02T01:06:12Z")

</div>

You would need to change it to the same format as the maxmind one.

---

<div class="post-metadata">

**Author:** ![Morriaty](https://avatars.discourse-cdn.com/v4/letter/m/8e8cbc/32.png) [@Morriaty](https://discuss.elastic.co/u/Morriaty)\
**Post date:** [June 2, 2016, 1:54am UTC](https://discuss.elastic.co/t/how-to-use-custom-isp-database-in-geoip/51548/3 "2016-06-02T01:54:05Z")

</div>

Thank you, @warkolm

But the filter seems not support csv. I saw that all the samples were `binary .dat`

```auto
geoip {
      database => "/etc/logstash/geoip/GeoIPASNum.dat"
      source => "src_ip"
    }

```

I've found some tool for transforming csv to maxmind dat. [mmutils](https://www.coolacid.net/ossim-logstash/275-generating-a-local-maxmind-geoip-db)

But my csv file contains characters out range of ascii, and then result in unreadable

```auto
"fields": {
          "isp.isp": [
            "ç§»å¨"
          ]
        }

```

---

<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:** [July 6, 2017, 4:54am UTC](https://discuss.elastic.co/t/how-to-use-custom-isp-database-in-geoip/51548/4 "2017-07-06T04:54:56Z")

</div>


