Hi,
I'm sending a json log file with filebeat to an Elasticsearch cluster. When I try to parse the ip field with geoip filter it shows the following error in the ingestError field:
field [client] not present as part of path [client.ip]
This is an example log line:
{"client.ip":"8.8.8.8","email.from":"user@email.com"}
This is the input defined on filebeat:
- type: log
paths:
- /var/log/myservice.log
encoding: plain
ignore_older: 24h
pipeline: mypipeline
index: myindex-write
json:
add_error_key: true
keys_under_root: true
And finally this is the processor on the pipeline:
{
"geoip": {
"field": "client.ip",
"properties": [
"country_iso_code"
],
"ignore_failure": true
}
}
It's strange because the same configuration it works with regular logs, but not with raw json logs. With a regular log If I grok the field "client.ip" in the same pipeline, then it worked fine. Maybe it's something related with the way that filebeat sends the json message?
Somebody knows a way to parse client.ip field on a ingest pipeline coming from a json event?