我已经在名称空间" Grafana-loki“中的Kubernetes集群上安装了grafana-loki堆栈。Kubernetes集群还有其他几个名称空间,用于应用程序。我已经公开了kube状态度量,我查看了这些度量,下面是它看起来的一个例子。
kube_deployment_status_replicas_updated{namespace="grafana-loki",deployment="loki-stack-prometheus-pushgateway"} 1
kube_deployment_status_replicas_updated{namespace="ns-app-dev",deployment="app-configuration-api"} 1
kube_deployment_status_replicas_updated{namespace="ns-app-dev",deployment="app-monitoring-api"} 1
kube_deployment_status_replicas_updated{namespace="grafana-loki",deployment="loki-stack-grafana"} 1
kube_deployment_status_replicas_updated{namespace="default",deployment="aws-load-balancer-controller"} 2
kube_deployment_status_replicas_updated{namespace="kube-system",deployment="ebs-csi-controller"} 2然后,我用下面的查询在Grafana中创建了一个stat面板:
sum(kube_deployment_status_replicas{namespace=~".*"})stat面板显示8,这是正确的数字。但是,当我将名称空间更改为"grafana-loki“时,stat面板仍然显示8,而当我将命名空间更改为"ns-app-dev”、"default“或”kube“时,stat面板显示”无数据“。
对于kube状态度量标准,问题是相同的,Grafana无法查看其他名称空间/节点的正确编号。
发布于 2022-09-19 09:22:53
prometheus服务器将用新标签重命名度量,原始标签“命名空间”被重新命名为"exported_namespace",原始标签“节点”被重新命名为"exported_node“。
https://stackoverflow.com/questions/73768091
复制相似问题