TICK Script summing

Hi Guys,

Seeking help to resolve a TICK script issue.

Scenario,

From multiple nodes infux is getting data. I have to find the sum-of-max-values in 24 hours from 4 Nodes and I am using batch script.

when I’m doing group by .groupBy(time(24h), ‘host’) - I am getting 8 rows instead of 4. - decided to use the first value from each node so used - |first(‘value’)

Then I try to add.

|eval(lambda: “first_value”)
.as(‘for_sum’)
|sum(‘for_sum’)
.as(‘sum_value’)

Issues is - I am not getting sum of all four max-values.

Could you please help me to find right way to resolve this issue ??

May be I am doing something wrong, please try to help a beginner.

Thanks

Hello @mebinthomas,
What time range are you querying for?
If you’re querying for more than 24 hours I would expect you to get 8 rows. 4 max values for each 24 hr window.