-
Notifications
You must be signed in to change notification settings - Fork 49
Description
ip2geo does not provide information from the database automatically
How can one reproduce the bug?
I used this instruction to set up:
https://opensearch.org/docs/2.16/ingest-pipelines/processors/ip2geo/
- I have created a data source and verified that it works
PUT /_plugins/geospatial/ip2geo/datasource/my-datasource
{
"endpoint" : "https://geoip.maps.opensearch.org/v1/geolite2-city/manifest.json",
"update_interval_in_days" : 1
}
{
"acknowledged": true
}
GET /_plugins/geospatial/ip2geo/datasource/my-datasource
{
"datasources": [
{
"name": "my-datasource",
"state": "AVAILABLE",
"endpoint": "https://geoip.maps.opensearch.org/v1/geolite2-city/manifest.json",
"update_interval_in_days": 1,
"next_update_at_in_epoch_millis": 1724839387155,
"database": {
"provider": "maxmind",
"sha256_hash": "t7FahuRg6Pjw+kcP0F29ZFAni4HEbX5WJC+1M38hzLU=",
"updated_at_in_epoch_millis": 1724427053000,
"valid_for_in_days": 30,
"fields": [
"country_iso_code",
"country_name",
"continent_name",
"region_iso_code",
"region_name",
"city_name",
"time_zone",
"location"
]
},
"update_stats": {
"last_succeeded_at_in_epoch_millis": 1724752680532,
"last_processing_time_in_millis": 217775
}
}
]
}
- I created a pipeline and checked that it works:
PUT /_ingest/pipeline/my-pipeline
{
"description":"convert ip to geo",
"processors":[
{
"ip2geo":{
"field":"clientip",
"datasource":"my-datasource"
}
}
]
}
{
"acknowledged": true
}
POST _ingest/pipeline/my-pipeline/_simulate
{
"docs": [
{
"_index": "testindex1",
"_id": "1",
"_source": {
"clientip": "185.35.83.97"
}
}
]
}
{
"docs": [
{
"doc": {
"_index": "testindex1",
"_id": "1",
"_source": {
"ip2geo": {
"continent_name": "Europe",
"country_name": "Norway",
"location": "59.9452,10.7559",
"country_iso_code": "NO",
"time_zone": "Europe/Oslo"
},
"clientip": "185.35.83.97"
},
"_ingest": {
"timestamp": "2024-08-28T08:55:16.048315377Z"
}
}
}
]
}
PUT /nginx-2024.08.28/_doc/my-id?pipeline=my-pipeline
{
"clientip": "185.35.83.97"
}
{
"_index": "nginx-2024.08.28",
"_id": "my-id",
"_version": 4,
"result": "updated",
"_shards": {
"total": 2,
"successful": 2,
"failed": 0
},
"_seq_no": 24950455,
"_primary_term": 1
}
GET /nginx-2024.08.28/_doc/my-id
{
"_index": "nginx-2024.08.28",
"_id": "my-id",
"_version": 4,
"_seq_no": 24950455,
"_primary_term": 1,
"found": true,
"_source": {
"ip2geo": {
"continent_name": "Europe",
"country_iso_code": "NO",
"country_name": "Norway",
"location": "59.9452,10.7559",
"time_zone": "Europe/Oslo"
},
"clientip": "185.35.83.97"
}
}
-
I recreated the index nginx-2024.08.28 and saw the fields ip2geo.continent_name, ip2geo.country_name and so on
-
I can't find them through Discover. And I don't see them on the map.


I understand that if I make a request, the data comes in. But why doesn't it work automatically?
Data with the clientip field is constantly coming in
GET /nginx-2024.08.28/
{
"nginx-2024.08.28": {
"aliases": {},
"mappings": {
"properties": {
"@timestamp": {
"type": "date"
},
.....
"clientip": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
....
What is the expected behavior?
I am waiting for the data in these fields to be used in the map
What is your host/environment?
- OS: Ubuntu20
- Version
2.16.0 - Plugins
GET _cat/plugins
node-5 opensearch-alerting 2.16.0.0
node-5 opensearch-anomaly-detection 2.16.0.0
node-5 opensearch-asynchronous-search 2.16.0.0
node-5 opensearch-cross-cluster-replication 2.16.0.0
node-5 opensearch-custom-codecs 2.16.0.0
node-5 opensearch-flow-framework 2.16.0.0
node-5 opensearch-geospatial 2.16.0.0
node-5 opensearch-index-management 2.16.0.0
node-5 opensearch-job-scheduler 2.16.0.0
node-5 opensearch-knn 2.16.0.0
node-5 opensearch-ml 2.16.0.0
node-5 opensearch-neural-search 2.16.0.0
node-5 opensearch-notifications 2.16.0.0
node-5 opensearch-notifications-core 2.16.0.0
node-5 opensearch-observability 2.16.0.0
node-5 opensearch-performance-analyzer 2.16.0.0
node-5 opensearch-reports-scheduler 2.16.0.0
node-5 opensearch-security 2.16.0.0
node-5 opensearch-security-analytics 2.16.0.0
node-5 opensearch-skills 2.16.0.0
node-5 opensearch-sql 2.16.0.0
node-5 query-insights 2.16.0.0
node-2 opensearch-alerting 2.16.0.0
node-2 opensearch-anomaly-detection 2.16.0.0
node-2 opensearch-asynchronous-search 2.16.0.0
node-2 opensearch-cross-cluster-replication 2.16.0.0
node-2 opensearch-custom-codecs 2.16.0.0
node-2 opensearch-flow-framework 2.16.0.0
node-2 opensearch-geospatial 2.16.0.0
node-2 opensearch-index-management 2.16.0.0
node-2 opensearch-job-scheduler 2.16.0.0
node-2 opensearch-knn 2.16.0.0
node-2 opensearch-ml 2.16.0.0
node-2 opensearch-neural-search 2.16.0.0
node-2 opensearch-notifications 2.16.0.0
node-2 opensearch-notifications-core 2.16.0.0
node-2 opensearch-observability 2.16.0.0
node-2 opensearch-performance-analyzer 2.16.0.0
node-2 opensearch-reports-scheduler 2.16.0.0
node-2 opensearch-security 2.16.0.0
node-2 opensearch-security-analytics 2.16.0.0
node-2 opensearch-skills 2.16.0.0
node-2 opensearch-sql 2.16.0.0
node-2 query-insights 2.16.0.0
node-4 opensearch-alerting 2.16.0.0
node-4 opensearch-anomaly-detection 2.16.0.0
node-4 opensearch-asynchronous-search 2.16.0.0
node-4 opensearch-cross-cluster-replication 2.16.0.0
node-4 opensearch-custom-codecs 2.16.0.0
node-4 opensearch-flow-framework 2.16.0.0
node-4 opensearch-geospatial 2.16.0.0
node-4 opensearch-index-management 2.16.0.0
node-4 opensearch-job-scheduler 2.16.0.0
node-4 opensearch-knn 2.16.0.0
node-4 opensearch-ml 2.16.0.0
node-4 opensearch-neural-search 2.16.0.0
node-4 opensearch-notifications 2.16.0.0
node-4 opensearch-notifications-core 2.16.0.0
node-4 opensearch-observability 2.16.0.0
node-4 opensearch-performance-analyzer 2.16.0.0
node-4 opensearch-reports-scheduler 2.16.0.0
node-4 opensearch-security 2.16.0.0
node-4 opensearch-security-analytics 2.16.0.0
node-4 opensearch-skills 2.16.0.0
node-4 opensearch-sql 2.16.0.0
node-4 query-insights 2.16.0.0
node-1 opensearch-alerting 2.16.0.0
node-1 opensearch-anomaly-detection 2.16.0.0
node-1 opensearch-asynchronous-search 2.16.0.0
node-1 opensearch-cross-cluster-replication 2.16.0.0
node-1 opensearch-custom-codecs 2.16.0.0
node-1 opensearch-flow-framework 2.16.0.0
node-1 opensearch-geospatial 2.16.0.0
node-1 opensearch-index-management 2.16.0.0
node-1 opensearch-job-scheduler 2.16.0.0
node-1 opensearch-knn 2.16.0.0
node-1 opensearch-ml 2.16.0.0
node-1 opensearch-neural-search 2.16.0.0
node-1 opensearch-notifications 2.16.0.0
node-1 opensearch-notifications-core 2.16.0.0
node-1 opensearch-observability 2.16.0.0
node-1 opensearch-performance-analyzer 2.16.0.0
node-1 opensearch-reports-scheduler 2.16.0.0
node-1 opensearch-security 2.16.0.0
node-1 opensearch-security-analytics 2.16.0.0
node-1 opensearch-skills 2.16.0.0
node-1 opensearch-sql 2.16.0.0
node-1 query-insights 2.16.0.0
node-3 opensearch-alerting 2.16.0.0
node-3 opensearch-anomaly-detection 2.16.0.0
node-3 opensearch-asynchronous-search 2.16.0.0
node-3 opensearch-cross-cluster-replication 2.16.0.0
node-3 opensearch-custom-codecs 2.16.0.0
node-3 opensearch-flow-framework 2.16.0.0
node-3 opensearch-geospatial 2.16.0.0
node-3 opensearch-index-management 2.16.0.0
node-3 opensearch-job-scheduler 2.16.0.0
node-3 opensearch-knn 2.16.0.0
node-3 opensearch-ml 2.16.0.0
node-3 opensearch-neural-search 2.16.0.0
node-3 opensearch-notifications 2.16.0.0
node-3 opensearch-notifications-core 2.16.0.0
node-3 opensearch-observability 2.16.0.0
node-3 opensearch-performance-analyzer 2.16.0.0
node-3 opensearch-reports-scheduler 2.16.0.0
node-3 opensearch-security 2.16.0.0
node-3 opensearch-security-analytics 2.16.0.0
node-3 opensearch-skills 2.16.0.0
node-3 opensearch-sql 2.16.0.0
node-3 query-insights 2.16.0.0