您可以使用 LogCollector 的 drop_fields 插件丢弃不需要的字段。
说明
LogCollector V2.2.0 及后续版本支持该插件。如何查看LogCollector版本,请参考查看软件版本。
名称 | 类型 | 是否必选 | 说明 |
---|---|---|---|
field | String | 是 | 字段名称。 |
在采集过程中,删除日志中的 data、alignment 字段。
经过处理之后(例如:采集模式或者其他处理器插件)的键值对日志
"data": "Click Here" "size": "36" "style": "bold" "name": "text1" "hOffset": "250" "vOffset": "100" "alignment": "center" "onMouseUp": "sun1.opacity = (sun1.opacity / 100) * 90;" "time": "Today is 2023-06-08. Tomorrow is 2023-06-09."
Logcollector 插件处理器配置
{ "processors": [ { "drop_fields": { "fields": [ "data", "alignment" ] } } ] }
处理结果
"size": "36" "style": "bold" "name": "text1" "hOffset": "250" "vOffset": "100" "onMouseUp": "sun1.opacity = (sun1.opacity / 100) * 90;" "time": "Today is 2023-06-08. Tomorrow is 2023-06-09."