Hello
I’m working on extending a JSON parser, and I want to insert the value of my variable Hostname into the field about.asset.hostname.
Right now, I can capture the value into a variable, but when I try to add it into the JSON with this code:
if [Hostname] != "" { mutate { replace => { "temp.asset.hostname" => "%{Hostname}" } } mutate { merge => { "event.idm.read_only_udm.about" => "temp" } } mutate { replace => { "temp" => "" } } }
the parser replaces the entire about structure, instead of just adding the hostname.
How can I modify this so that only my string is added to about.asset.hostname without overwriting the rest of the JSON structure?