Aggregation with max field value

I'm trying to create a metric in Kibana for a dashboard with some information from servers. The main idea is to have the total amount of objects by location. The challenge is, in each location, I have a certain number of servers, and each server registers its objects amount multiple times by hour, so I need only the last size recorded by each server in a location and make the aggregation of it.
I would appreciate it if you could help me with any idea on how to make this.

hi @Mauricio_Castrillon welcome to our community.

Maybe you could run a transform to keep on a separate index just the latest document and then work with that.

Hi @jsanz , Thank you for your answer! I'll take a look at the article you shared with me.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.