How to get a topN CPU utilization chart for only servers with 2 CPUs?

I am fairly good at using the V2 API for extracting statistics, but here is one question that I need help on.

How can I enhance a normal topN query for servers to only include server entities with 2 CPUs?

Here us my simple base query:

builtin:host.cpu.usage:splitBy(“dt.entity.host”):sort(value(auto,descending)):limit(20)

Any advice appreciated.

Thanks,

Lou

Hi @crabbylou ,

Properties aren’t directly accessible via EntitySelectors, but You can workaround it using TAGS.

You can create autotagging rule to use CoreCount (logical AIX or any You Like) to create such tags, and then use those tags in EntitySelector.

Bests
Michal

I think I got it. It was a bit cryptic in API query land. This seemed to work:

builtin:host.cpu.usage:filter(in(“dt.entity.host”, entitySelector(“type(~“HOST~”),virtualCpus(2)”))):sort(value(auto,descending)):limit(20)

Thanks Michal and All!