cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

crabbylou
Helper

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

2 REPLIES 2

Hi @crabbylou ,

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

MichalOlszewski_1-1712580674903.png

 

 

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

crabbylou
Helper

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!

Featured Posts