I am trying to understand default prometheus rules for kubernetes. And then I came across with this expression:
sum(namespace_cpu:kube_pod_container_resource_requests:sum{})
/
sum(kube_node_status_allocatable{resource="cpu"})
>
((count(kube_node_status_allocatable{resource="cpu"}) > 1) - 1) / count(kube_node_status_allocatable{resource="cpu"})
Specifically, i am curious at namespace_cpu:kube_pod_container_resource_requests:sum{}
. namespace_cpu does not appear to be an operation or reserved word in promql.
I can't seem to find it either in Prometheus documentation. https://prometheus.io/docs/prometheus/latest/querying/basics/
Any hints?
Nothing, it's not an operator :
is just a legal character in metric names. Some standard rulesets use it for grouping rollup rules together but it's just a naming scheme at most.