Need help with aggregation query

Hi All,

I am trying to write a query to get host and max cpu usage from metric beat data but i was not able to write exact query to get max cpu along with host name. for example below is the data



By using term aggregations i am able to get the unique host names but am looking unique host names along with max cpu usage like below



Could some one help me how we can use term and max aggregations together


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