field "…" already exists in data and is not overwriteable
Grok refuses to write into a field that already exists. List the field in grok's overwrite option.
The error
pipeline failed: filter grok (2) failed: field "domain" already exists in data and is not overwriteableWhy it happens
Your grok captures into a field that already exists: you initialised it at the top (good practice), the JSON filter created it, or an earlier grok did.
Grok will not replace an existing field unless you say so.
How to fix it
- Add overwrite with every captured field name to the grok block.
- Add on_error to the grok so a non-matching line sets a flag instead of failing the pipeline.
Works:
grok {
match => { "message" => "%{IP:src_ip} %{HOSTNAME:domain} %{GREEDYDATA:msg}" }
overwrite => ["src_ip", "domain", "msg"]
on_error => "grok_failed"
}Still failing?
One error usually hides the next. Parsleaf writes the full parser from your sample logs and keeps fixing it from the errors your SecOps tenant returns, until it passes. Generate your parser: the first one is free.