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

Custom dashboard based on Kubernetes

Florin-Marian
Newcomer

So, I need to create a Dashboard in Dynatrace where I can see the SLA.

Now, let me explain the deployment architecture:

  • A deployment represents a component of the application (~ 25 existing at this moment)
  • A deployment is present on all/several environments (~ 50 existing at this moment)
  • It is considered that the SLA is below 100% when for a certain period of time a deployment remained with 0 active pods on one of the environments.

My dashboard must provide me with information such as: SLA at the application level, SLA at the component level and I can easily see which environment caused the SLA to drop below 100%, seeing exactly which component failed.

I think it is useful to mention the fact that on some deployments we have multiple replicaSets and a formula like the one below sometimes gives erroneous results, having SLA ~ 200% and on some environments only 100%.

 

 

 

(
builtin:kubernetes.pods
:filter(
  in("dt.entity.cloud_application", 
    entitySelector("
      type(cloud_application), 
      entityName.equals(******-api-portal)"
    )
  ),
  and(eq("pod_status","Running")))
:splitBy("dt.entity.cloud_application","dt.entity.cloud_application_namespace")
:sort(value(auto,descending))
)

 

 

 

I mention that I have just started using Dynatrace and I would also appreciate an advanced course on Udemy if you know of any (I only found one for beginners using the "Search" function).

Thank you!

2 REPLIES 2

florian_g
Dynatrace Mentor
Dynatrace Mentor

Hi,

you already came up with a nice expression. I tried to simplify it a little:

builtin:kubernetes.pods
:filter(
and(
eq("k8s.workload.name", "frontend"),
eq("pod_status", "Running")
)
)
:splitBy("dt.entity.cloud_application","dt.entity.cloud_application_namespace")
:sort(value(auto,descending))

Does this work better for you? I'm not sure I understand why Replicasets are important here. What I understood: You want to measure if there is at least 1 pod running per workload (deployment, statefulset, ...), no matter which underlying replicaset is controlling it. Please help me understanding 🙂
Out of curiosity: What's the reason you're filtering for "Status=Running" instead of "Phase=Ready"?
best,

Florian

One does not simply run a container...

Ana_Kuzmenchuk
Community Team
Community Team

Hi @Florin-Marian, did the comment above help you with your issue? if not, please share more details of your use case so the Community could assist 😊

The only constant is change. Finding ways for great things to happen!

Featured Posts