20 Dec 2023 06:57 AM
Hi All,
We have a use case in which we want to add the value of a specific k8s workload label to the log lines of the relevant pods. My questions is actually very simple: on which grail "table" is it stored?
Gil.
Solved! Go to Solution.
20 Dec 2023 11:46 AM
Hi @gilgi
The Workloads are within dt.entity.cloud_application, and pods are stored in dt.entity.cloud_application_instance
Reflecting part of the URL when you're in a workload and a pod.
This DQL I am looking for a specific label from the Workload "control-plane"
fetch dt.entity.cloud_application_instance
|fields entity.name,id,workloadName
| lookup sourceField:workloadName, lookupField:entity.name, [fetch dt.entity.cloud_application
| expand cloudApplicationLabels[`control-plane`], alias:controlPlane]
| filter isNotNull(lookup.controlPlane)
Thanks,
Lawrence