28 Jun 2025 04:47 PM
I'm trying to find a way in Dynatrace to check which Kubernetes services either have no pods running or are returning 503 errors. I’ve looked through the available service metrics, but they don’t seem to show any pod-level details. Any ideas on how I can get this info
28 Jun 2025 09:05 PM
You can use DQL:
timeseries runningPods = sum(dt.kubernetes.pods),
filter: {pod_phase == "Running"},
by: {k8s.namespace.name, k8s.workload.name, pod_phase},
from: -5m
| filter arrayMax(runningPods) == 0
or
timeseries total503 = count(http.metric),
filter: {http.response.status == 503},
by: {dt.entity.service, k8s.namespace.name},
from: -5m
| sort arrayMax(total503) desc