Hi, new try.
I try to format it as possible to show the geoip struct and location which should be the issue.
Just to relight the situation : Logstash index does not allow to be mapped as there's no geo_point field. GeoIP information are perfectly filled per the pipeline filter from the VarX vaiable which is the IP detected. It works fine except the map.
here is the GET /logstash-2018.05/_mapping
"logstash-2018.05":
{ "mappings": {
"syslog": { "properties":
{ "@timestamp": { "type": "date" }, "@version": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "CPU": { "type": "long" }, "Disk": { "type": "long" }, "Port": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "RAM": { "type": "long" }, "Temp": { "type": "long" },
"Varx": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } },
"geoip": { "properties": {
"city_name": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } },
"continent_name": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } },
"country_iso_code": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } },
"location": { "properties": { "lat": { "type": "float" }, "lon": { "type": "float" } } },
"region_name": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } } }
},
"host": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "message": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "received_at": { "type": "date" }, "received_from": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "syslog_facility": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "syslog_facility_code": { "type": "long" }, "syslog_hostname": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "syslog_message": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "syslog_pid": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "syslog_program": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "syslog_severity": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "syslog_severity_code": { "type": "long" }, "syslog_timestamp": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "tags": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "type": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } } } } } } }` />
I try to
`PUT _template/logstash
{
"template": "logstash-*",
"settings": {
"number_of_replicas": 1,
"number_of_shards": 1
},
"mappings": {
"syslog": {
"dynamic": "true",
"properties": {
"geoip": {
"dynamic": true,
"properties": {
"location": {
"type": "geo_point"
}
}
}
}
}
}`
Then delete the index and recreate it.