Grouping hosts based on Utilization

Hi,
I am trying to group hosts by utilization…like servers with CPU Utilization >90% on one bucket, servers with CPU Utilization between 80% and 90% in on another bucket and the everything else on the last bucket…I tried filter command and bucket, but I couldn’t get what I am looking for…buckets are slicing data into same size…I need buckets with different size…

Thanks

Hello, @gjajka: You might take a look at FACET CASES.

Hi @philweber…thanks for quick response…
Here is what I am facing…the below query will return the average utilization of the ECS services for the past 4 weeks(1month)
SELECT average(provider.cpuUtilization.Average) from ComputeSample where provider=‘EcsService’ and providerAccountName =‘XXXX’ facet provider.serviceName since 4 weeks ago

When I try to modify the query to say give me all the services where utilization is more than 30% for example…I get an error…so
select provider.serviceName from ComputeSample where provider=‘EcsService’ and providerAccountName =‘XXXX’ where average(provider.cpuUtilization.Average) >30 since 4 weeks ago…
returns
Call{target=Id{name=‘average’, isQuoted=false}, arguments=CallArguments{positionalArgs=[CompoundId{type=Id{name=‘provider’, isQuoted=false}, field=Id{name=‘cpuUtilization.Average’, isQuoted=false}}], kwargs={}}} (at line 1 column 129)

similar error when I use the Facet cases

Another example…even when I try to use the nested aggregation query

SELECT provider.serviceName FROM (select average(provider.cpuUtilization.Average) from ComputeSample where provider=‘EcsService’ and providerAccountName =‘XXX’ facet provider.serviceName timeseries auto) where average(provider.cpuUtilization.Average) >20

returns this error
Something went wrong while executing your query.

thanks

If you just want services whose utilization is greater than 30%, you can do this:

SELECT average(provider.cpuUtilization.Average) 
FROM ComputeSample 
WHERE provider = 'EcsService' 
AND provider.cpuUtilization.Average > 30 
FACET provider.serviceName 
SINCE 4 weeks ago

@philweber thanks for your response…but I am looking to “grade” services…so I need to group them based on utilization…so I need at least 4 buckets based on utilization…
like …services with utilization <50%, services with utilization between 50%-60%, 60%-70%, 80%-100%

Also…the issue that I am facing is the fact that I am looking at average values over the period of time…so the values above are the average values(or the 90 percentile etc)…the query that you provided…will list services that had cpu Utilization average once above 30%…does not displays the average utilization over the period of 4 weeks

Any idea, why I get those errors with my requests?

I hope this could help

Sorry for the ugly picture…but I need to block the ac

counts…I would like to group those accounts based on the utilization…I will create a ticket with support…in case you would like to see the actual data/service names

thanks again

Here is the ticket… Request #431293

@gjajka Thanks for the update. It looks like this is being handled by support now. Please feel free to reach out and let us know if this was resolved or if you need any further help.