-
Problem report
-
Resolution: Unresolved
-
Trivial
-
None
-
None
-
None
Steps to reproduce:
- Configure Kubernetes monitoring.
- Wait for collects;
- Create a pod with same name in different namespaces.
Result:
The Kubernetes cluster state by HTTP template, in the "Pod discovery" LLD rule, all preprocessing rules of the Prometheus Pattern type filter only by POD name. If there is a pod with the same name in different namespaces, the filter does not work correctly.
Expected:
Change preprocessing rules, include namespace filters.
kube_pod_container_resource_limits{pod="{#NAME}", resource="cpu"} kube_pod_container_status_restarts_total{namespace="{#NAMESPACE}",pod="{#NAME}"} kube_pod_container_resource_limits{namespace="{#NAMESPACE}", pod="{#NAME}", resource="memory"} kube_pod_container_resource_limits{namespace="{#NAMESPACE}", pod="{#NAME}", resource="cpu"} kube_pod_container_resource_requests{namespace="{#NAMESPACE}", pod="{#NAME}", resource="cpu"} kube_pod_container_resource_limits{namespace="{#NAMESPACE}", pod="{#NAME}", resource="memory"} kube_pod_container_resource_requests{namespace="{#NAMESPACE}", pod="{#NAME}", resource="memory"} kube_pod_container_status_restarts_total{namespace="{#NAMESPACE}", pod="{#NAME}"} kube_pod_status_phase{namespace="{#NAMESPACE}", pod="{#NAME}", phase="Failed"} kube_pod_status_phase{namespace="{#NAMESPACE}", pod="{#NAME}", phase="Pending"} kube_pod_status_phase{namespace="{#NAMESPACE}", pod="{#NAME}", phase="Unknown"}