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

Dashboards - can I filter by a host property?

estrella86
Newcomer

Hello,

I am new to Dynatrace and am just learning about dashboards. I've tried to find this info but having no luck. If I add a graph from a host to a new dashboard and look at it in Data Explorer, I can see queries like this:

builtin:host.mem.total:filter(eq("dt.entity.host",hostname))

Can I instead of using a specific hostname, look at hosts that contain a specific property? For example if I click on the host and go to properties and tags I see all the discovered properties like IP addresses, OS version, instance type, security groups, a bunch of stuff. Can all of these properties be used in the query so that I can grab info on multiple hosts that for example have the same property? 

1 REPLY 1

dannemca
DynaMight Guru
DynaMight Guru

Hi, @estrella86 , yes you can.

You should get these filters automatically when searching in UI (not advanced mode).

image (16).png

If you do not see the property you need in the list, you can create a tag for it, using it as placeholder: https://docs.dynatrace.com/docs/manage/tags-and-metadata/setup/how-to-define-tags#service-and-proces..., and then, use the tag as filter.

 

And assuming you wants to use the DQL version, you could try something like this:

timeseries cpu=avg(dt.host.cpu.usage), by:{dt.entity.host}
| sort arrayAvg(cpu), direction:"descending"
| lookup [fetch dt.entity.host], fields:{entity.name, osType, tags}, sourceField:dt.entity.host, lookupField: id
//| expand tags
| filter contains(osType,"LINUX")
| fields entity.name, cpu, interval, timeframe, osType

Just replace the osType by the property you need.

Site Reliability Engineer @ Kyndryl

Featured Posts