19 Dec 2024 02:20 PM
I want to create a dashboard that lists all the workloads running on a specific node. For example, if Node A has 5 pods running on it, the metric should display this information. Could someone please suggest if this is achievable?
I tried, but when I select the node metric, it doesn’t have dimensions for workload names or pod names. Similarly, when I select the pod (workload) metric, it doesn’t have dimensions for the node. As a result, I’m unable to achieve the desired outcome.
Solved! Go to Solution.
19 Dec 2024 03:49 PM
Hello.
Cannot think of a way to do this in a dashboard. You can only add the link to the Kubernetes node page in your dashboards.
A nice new idea would be to add the "Pin to dashboard" button for the pod list page. If it was present you could filter with Node and then pin the list to dashboard.
BR
19 Dec 2024 06:55 PM - edited 19 Dec 2024 06:55 PM
Hi @Gyanendra
You can refer to a similar case as attached below:
Hoping it adds value,
BR,
Peter
19 Dec 2024 07:00 PM
Hi @Gyanendra
PFA alternative solution :
Ref:
Support:
Hoping it helps.
BR,
Peter
20 Dec 2024 01:13 PM
try with
fetch dt.entity.kubernetes_node, from: -30m
| fields id, node.id = id, node.name = entity.name,cluster.id = clustered_by[dt.entity.kubernetes_cluster]
| filter in(id, classicEntitySelector("type(KUBERNETES_NODE),toRelationship.isClusterOfNode(type(KUBERNETES_CLUSTER),appEnabled(true))"))
| lookup [
fetch dt.entity.kubernetes_cluster, from: -30m | fields id, cluster.name = entity.name, cluster.cluster_id = kubernetesClusterId
], sourceField:cluster.id, lookupField:id, fields:{cluster.name,cluster.cluster_id}, executionOrder:leftFirst
| lookup [
timeseries values = sum(dt.kubernetes.pods), by:{dt.entity.kubernetes_node}, from: -2m
| fields pod.count = toLong(arrayFirst(values)), matchedId = dt.entity.kubernetes_node
], sourceField:id, lookupField:matchedId, fields:{pod.count}, executionOrder:leftFirst
20 Dec 2024 01:37 PM
can we run this query in old DT (classic)? If yes, then where? I guess in Data explorer we can't run this command.
26 Dec 2024 09:14 AM - edited 26 Dec 2024 09:14 AM
Hi @Gyanendra
As of now you have all possible alternatives either DQL 😀"code level" 😉 or UI 😊.
Keep up the good work.