Hi everyone,
I'm trying to play with geoip data and I have a trouble with the field geoip.location
.
According to the documentation
A
[geoip][location]
field is created if the GeoIP lookup returns a latitude and longitude.
ref: Geoip filter plugin | Logstash Reference [8.11] | Elastic
But if I try to check the existance of this field:
GET /_all/_search
{
"query": {
"exists": {
"field": "geoip.location"
}
}
}
------
{
"took" : 4,
"timed_out" : false,
"_shards" : {
"total" : 25,
"successful" : 25,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : 0,
"max_score" : null,
"hits" : [ ]
}
}
But if I search for latitude of longitude fields, I have them
GET /_all/_search
{
"query": {
"exists": {
"field": "geoip.latitude"
}
}
}
------
{
"hits" : {
"total" : 3494,
"max_score" : 1.0,
"hits" : [
{
"_index" : "test-2019.02",
"_type" : "doc",
"_id" : "ZJFNqGgB8uxQXBeikvih",
"_score" : 1.0,
"_source" : {
"geoip" : {
"country_code2" : "FR",
"longitude" : 6.3387000000000002,
"country_code3" : "FR",
"latitude" : 49.8582,
"country_name" : "France"
},
"tags" : [ ....
I have this basic logstash configuration
geoip {
fields => [
"country_code2",
"country_code3",
"country_name",
"latitude",
"longitude"
]
source => "host"
}
In my index pattern, it seems to be present ..... (the IP also, I haven in reality)
So do you know where I did a mistake ?
Thanks in advance for your help