fluent-plugin-record-modifier
fluent-plugin-record-modifier copied to clipboard
Is if record.dig exists else null exclude even possible?
Loving the modifier, I'm trying to work on filtering records which are null adding an if statement, I’ve seen a few examples, but none match my use case. Has anyone come across this or can confirm its even possible?
Human readable action
partOf =
if record.dig("kubernetes", "labels", "app.kubernetes.io/part-of").Value exists include record and value
else
remove_keys partOf
example dig
<filter **>
@type record_modifier
<record>
partOf ${record.dig("kubernetes", "labels", "app.kubernetes.io/part-of")}
</record>
</filter>