Using the ingest GeoIP processor
Another interesting processor is the GeoIP plugin, which allows us to map an IP address to a geopoint and other location data. It's provided in every Elasticsearch installation by default from version 7.x.
Getting ready
You need an up-and-running Elasticsearch installation, as we described in the Downloading and installing Elasticsearch recipe in Chapter 1, Getting Started.
To execute the commands, any HTTP client can be used, such as curl (https://curl.haxx.se/), Postman (https://www.getpostman.com/), or similar. Use the Kibana console, as it provides code completion and better character escaping for Elasticsearch.
How to do it...
To be able to use the ingest GeoIP processor, perform the following steps:
- We can create a
pipeline
ingest with the attachment processor, using the following command:PUT /_ingest/pipeline/geoip { "description": "Extract geopoint from an IP", Â Â "processors"...