Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pod 资源总览 -> Pod 资源明细有报错(Kubernetes for Prometheus Dashboard) #117

Open
blurh opened this issue Jan 18, 2022 · 0 comments

Comments

@blurh
Copy link

blurh commented Jan 18, 2022

Kubernetes for Prometheus Dashboard 的面板上(Pod 资源总览 -> Pod 资源明细有报错)报错内容如下:

"found duplicate series for the match group {pod="dind-0"} on the right hand-side of the operation: [{name="kube_pod_info", app_kubernetes_io_name="kube-state-metrics", app_kubernetes_io_version="v2.2.1", created_by_kind="StatefulSet", created_by_name="dind", host_ip="xxx", host_network="false", instance="xxx:8080", job="kube-state-metrics", k8s_namespace="ops-monit", k8s_sname="kube-state-metrics", namespace="zadig-local", node="xxx", pod="dind-0", pod_ip="xxx", uid="xxx"}, {name="kube_pod_info", app_kubernetes_io_name="kube-state-metrics", app_kubernetes_io_version="v2.2.1", created_by_kind="StatefulSet", created_by_name="dind", host_ip="xxx", host_network="false", instance="xxx:8080", job="kube-state-metrics", k8s_namespace="ops-monit", k8s_sname="kube-state-metrics", namespace="koderover-agent", node="xxx", pod="dind-0", pod_ip="xxx", uid="xxx"}];many-to-many matching not allowed: matching labels must be unique on one side"

修改 H 栏表达式可解决, 不知道是否应该这样修改

// 由
kube_pod_container_status_restarts_total{origin_prometheus=~"$origin_prometheus",pod=~"$Pod",container =~"$Container",container !="",container!="POD",namespace=~"$NameSpace"} * on (pod) group_left(node) kube_pod_info{origin_prometheus=~"$origin_prometheus",pod=~"$Pod",node=~"^$Node$",namespace=~"$NameSpace"}
// 改为
kube_pod_container_status_restarts_total{origin_prometheus=~"$origin_prometheus",pod=~"$Pod",container =~"$Container",container !="",container!="POD",namespace=~"$NameSpace"} * on (pod) group_left(node) (sum by (pod) (kube_pod_info{origin_prometheus=~"$origin_prometheus",pod=~"$Pod",node=~"^$Node$",namespace=~"$NameSpace"}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant