I’m trying to create an alert based on this “Excessive container restarts (>25% of target pod count over 2m)” but I haven’t been able to calculate this value so I’m wondering if you can help me with this.
What kind of containers are you working with?
You could use a NRQL Alert condition to count container restarts and adjust the time period and threshold to match what you would consider excessive restarts.
Using Kubernetes as an example, you could do something like this:
FROM K8sContainerSample SELECT max(restartCount) - min(restartCount) AS 'Restarts'
Let us know if this helps.
Hi, I think I got what I want with this one
, 2 minute) / latest(k8s.deployment.podsDesired
) FROM Metric
@alejandro.garcia2 let us know how that works out for you!
so far it works, thanks