ltxlouis / elasticsearch-ingest-regionip

Elasticseach ingest processor to add Chinese region info based on provided ip address

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Elasticsearch regionip Ingest Processor

supported Elasticsearch verison: 6.2.4

Uses the ip2region lib to add Chinese region info based on provided ip address

Installation

  1. download .zip file
  2. use Elasticsearch elasticsearch-plugin command to install locally [reference]

Usage

PUT _ingest/pipeline/custom-pipeline-name
{
  "description": "custom description",
  "processors": [
    {
      "regionip": {
        "field": "field_containing_ip_address",
        "target_field": "target_field_name",
        "properties": ["country_name", "region_name", "city_name"]
      }
    }
  ]
}
target_field result example

"regionip": {
  "country_name": "**",
  "city_name": "上海市",
  "region_name": "上海"
}
for more usage please refer to official doc

Configuration

conf required note
field yes Field name containing ip address
target_field no Field name to write region info to, defaults to regionip
ignore_missing no If set to true, doc missing specified field will not throw a exception, defaults to false.
ip2region_algorithm no BTREE/BINARY/MEMORY, defaults to MEMORY [link]
properties no ip, country_name, region_name, city_name, isp_name, defaults to all properties

Build

gradle clean assemble

About

Elasticseach ingest processor to add Chinese region info based on provided ip address

License:Apache License 2.0


Languages

Language:Java 100.0%