How to rename a field with regex

I have a log like this:

{"A.amazon.aws.requestedParameters":{"testlabel1":"testvalue1"}}
{"B.amazon.aws.requestedParameters":{"testlabel1":"testvalue1"}}
...

and I want to change the field name to something like this: A-requestedParameters , B-requestedParameters, ...
I checked the mutate filter plugin but it doesn't work with regex.
How can I do it?

You have only rename to change fieldname1 to fieldname2.
If you want to use regex, then you need ruby. Check sample.

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