我是一名初学者,想要使用record_modifier来替换字符串,当特定的字符串出现在键值中时。
当输入键值为“how”时,我希望用“who”替换该字符串。
2)输入:
当输入的键值包含"bad"时,我希望用"good"替换该字符串。
示例
1)输入:
{"message":"how are you"}
输出:
{"message":"who are you"}
当输入键值为“how”时,我希望用“who”替换该字符串。
2)输入:
{"message":"he is a bad boy"}
输出:
{"message":"he is a good boy"}
当输入的键值包含"bad"时,我希望用"good"替换该字符串。
@type record_modifier #auto_typecast true
enter code here
键名 message 表达式 ????? 替换为 ?????
提前感谢。
replace "good"
</replace> </filter> - user1514423