netobserv / flowlogs-pipeline

Transform flow logs into metrics
Apache License 2.0
69 stars 21 forks source link

support JSON input with nested objects fields #480

Open aslom opened 10 months ago

aslom commented 10 months ago

I have input JSON with topic fields inside child customData:

{"id":"fb1a463c-8a27-4cc2-9f0c-bd991c3802d6",
"eventTime":"2023-08-27T13:38:13.373726754Z",
"customData":{"valid":"0","offset":"0","topic":"topic1"}
}

How would I do addIf for customData.topic?

          - type: add_if
            input: customData.topic
            parameters: '== "topic1"'
            output: classification
            assignee: high

@ronensc @eranra

ronensc commented 10 months ago

Unfortunately, we don't support this feature. The flowlogs are assumed to have a flat structure.