Filebeat with JSON, set root key


(Atze De Vries) #1

Hi,

If you parse a JSON with filebeat and send it in elasticsearch, all root keys from the original json document will have the prefix json.<fieldname>. For example

{"status":400}  -> {"json" : { "status" : 400}}

Right?

So can we change this json name to something of our own liking or should we rewrite everything using logstash/ingest. (for example {"webservername":{"status":400}})


(Jaime Soriano) #2

Hi,

Currently there is no way to do it, you can only choose to write it under the json key or directly under root with json.keys_under_root: true.

In the upcoming 6.3 release we add a new rename processor that can be used to rename fields in any way.


(Atze De Vries) #3

Ok thnx!


(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.