Skip to content

Instantly share code, notes, and snippets.

@quoeamaster
Created September 10, 2022 06:32
Show Gist options
  • Save quoeamaster/8e93ba3f2c9988adfd45ba9e723d4e70 to your computer and use it in GitHub Desktop.
Save quoeamaster/8e93ba3f2c9988adfd45ba9e723d4e70 to your computer and use it in GitHub Desktop.
PUT _cluster/settings
{
"persistent": {
"ingest": {
"geoip": {
"downloader": {
"enabled": "true"
}
}
}
}
}
# wait for a minute before running the following pipeline simulation
POST _ingest/pipeline/_simulate
{
"pipeline": {
"processors": [
{
"geoip": {
"field": "location"
}
}
]
},
"docs": [
{
"_source": {
"location": "8.8.8.8"
}
}
]
}
# results on running the geoip_processor
{
"docs" : [
{
"doc" : {
"_index" : "_index",
"_id" : "_id",
"_source" : {
"location" : "8.8.8.8",
"geoip" : {
"continent_name" : "North America",
"country_name" : "United States",
"location" : {
"lon" : -97.822,
"lat" : 37.751
},
"country_iso_code" : "US"
}
},
"_ingest" : {
"timestamp" : "2022-09-10T06:30:50.797633552Z"
}
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment