I have a key_value result but the fields portion have spaces that I need to convert to underscore to use the set_fields() function. I can use regex_replace -but- the regex I have matches on spaces in the key and value portion. So for instance:
{user name=b.oaks, config name=corp-epointsetting, private ip=10.42.7.207, client region=us, client ip=75.75.58.65, client version=5.0.0-87, device name=zz-777, client os version=microsoft windows 10 pro 64-bit, vpn type=device level vpn}
.
I could grok it (as I erroneously suggested on an earlier post by someone else with a similar quest) but then I would have to create one for each possible key_value that comes in… bleh.
Would make more sense to have special characters handled in set_fields() and set_field()? - that way it would also catch any other data coming through from grok (etc.) would be massaged appropriately.
key_value() still works with the spaces, it’s when you are creating the fields that it chokes.