31 May 2023 03:03 PM - edited 31 May 2023 03:03 PM
fetch dt.entity.host_group | filter in(id,[fetch dt.entity.host |filter matchesValue(tags,"MyTag")|fields id])
Do I need a FilterIn, a Lookup, etc?
Solved! Go to Solution.
01 Jun 2023 08:01 AM - last edited on 19 Jun 2023 10:27 AM by sinisa_zubic
lookup
and then do a filter. Please try following DQL:fetch dt.entity.host_group
| lookup [fetch dt.entity.host
| filter matchesPhrase(tags,"MyTag")
| fieldsAdd hostGroupReference = instance_of[dt.entity.host_group]], sourceField:id, lookupField:hostGroupReference
| filter isNotNull(lookup.id)
| fieldsRemove "lookup*"
instance_of[dt.entity.host_group]
lookup.id
. Basically filter only those host groups which have match from the lookup04 Sep 2024 08:44 PM
How would one go about this using timeseries data? Same thing?
i.e. I have a query for disk space by a single host filter that works, but i want to leverage Host Group rather than dt.entity.host for my filter value.
05 Sep 2024 07:43 PM
Even simpler then it was possible 1 year ago. E.g. to get disk usage for all disks of hosts in specific host group:
timeseries disk_used=max(dt.host.disk.used),
by:{dt.entity.host, dt.entity.disk},
filter: {entityName(dt.entity.host_group)=="vmware"}