简体   繁体   中英

Kubernetes Prometheus: Add alert when container memory usage is greater than total kube node memory capacity

I am monitoring several kubernetes clusters with Prometheus.

I want an alert rule that fires, when the total container memory usage exceeds or is equal to the total kube node memory capacity.

What I constructed is the following:

sum(container_memory_usage_bytes{instance=~"sa.*.domain"}) >= sum(kube_node_status_capacity_memory_bytes{node=~"sa.*.domain"})

but in the expression evaluator in the Prometheus GUI I get a numerical value back when I test this expression.

Can someone help me with the right expression?

Thanks in advance.

Best regards, rforberger

I have rebuild the query, and have a question regarding it. I will open another question.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM