04 Jun 2025
08:20 PM
- last edited on
05 Jun 2025
09:32 AM
by
MaciejNeumann
I'm trying to create a dashboard or a DQL query that gives me the AZ all of my pods are in. I see that in the EC2 Node metadata I can see what AZ those nodes are in, and of course I can see what AZ the pods running on that node are in, but I want the information in one single view with all of the pods (or filterable list).
Anyone know how I can achieve this with DQL or a dashboard query?
05 Jun 2025 05:43 AM
Hi @shakib ,
May be you can try this
fetch dt.entity.cloud_application_instance
| fieldsAdd nodeid=runs_on[dt.entity.kubernetes_node]
| lookup [fetch dt.entity.kubernetes_node| fields id, node.id = id, node.name = entity.name,cluster.id = belongs_to[dt.entity.host]], sourceField: nodeid, lookupField: node.id
| fieldsRemove nodeid, lookup.id, lookup.node.id
| fieldsRename host_id=lookup.cluster.id, hostname=lookup.node.name
| lookup [fetch dt.entity.host | fields id,Az_id = belongs_to[dt.entity.aws_availability_zone]], sourceField:host_id,lookupField:id
| fieldsRename az_id=lookup.Az_id, hostid=lookup.id
| lookup [fetch dt.entity.aws_availability_zone], sourceField:az_id, lookupField:id
| fieldsRename PodName=entity.name, availability_zone=lookup.entity.name
| fieldsKeep PodName, hostname, availability_zone
You might get a result like this.
BR