cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Build a Dashboard Displaying Workloads per Node in Kubernetes

Gyanendra
Visitor

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.                    

8 REPLIES 8

Theodore_x86
Helper

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

 

Peter_Youssef
Leader

Hi @Gyanendra 

You can refer to a similar case as attached below:

Peter_Youssef_0-1734634440152.png

Hoping it adds value,

BR,

Peter

Peter_Youssef
Leader

Hi @Gyanendra 

PFA alternative solution :

  • Ensure the K8s technology is supported.
  • The MZ configurations are accurate.
  • No issues with monitoring signal flow into Dynatrace.

Ref:

Support:

Hoping it helps.

BR,

Peter

Kubernetes, often referred to as the "platform for building platforms," has gained widespread adoption among enterprise organizations. It empowers them to efficiently run, manage, and orchestrate containerized environments at scale. However, understanding your Kubernetes (k8s) cluster can vary ...

PacoPorro
Dynatrace Leader
Dynatrace Leader

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

can we run this query in old DT (classic)? If yes, then where? I guess in Data explorer we can't run this command.

Hi @Gyanendra 

You can run the provided inputs in the latest Dynatrace.

BR,

Got it, thanks

Hi @Gyanendra 

As of now you have all possible alternatives either DQL 😀"code level" 😉 or UI 😊.

Keep up the good work.

 

Featured Posts