Dashboards - filter by a host property

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?

Hi, @estrella86 , yes you can.

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

If you do not see the property you need in the list, you can create a tag for it, using it as placeholder: Define and apply tags — Dynatrace Docs, 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.

How to extract the properties on each host using DQL?