I am sending below Json message on Fluentd input.
{"name":"my_counter","help":"A counter metric","type":0,"metric":\[{"label":\[{"name":"pod","value":"test"}\],"counter ":{"value ":6}}\]}
And I wanted to perform the aggregation on the above data.
<source>
@type dummy
dummy {"name":"my_counter","help":"A counter metric","type":0,"metric":[{"label":[{"name":"pod","value":"test"}],"counter ":{"value":6}}]}
tag test
rate 1
</source>
<filter test>
@type aggregate
intervals 5s
keep_interval 1s
group_fields counter
aggregate_fields value
aggregations sum
</filter>
<match test>
@type stdout
</match>
Aggregation of the sameple data coming at the rate of 1s for 5s interval should results into
{"name":"my_counter","help":"A counter metric","type":0,"metric":[{"label":[{"name":"pod","value":"test"}],"counter ":{"value":30}}]}
How can we perform aggregation in fluentd on nested data.