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

metric_relabel_configs 配置后部分指标不显示了 #122

Open
mogody opened this issue Apr 14, 2022 · 4 comments
Open

metric_relabel_configs 配置后部分指标不显示了 #122

mogody opened this issue Apr 14, 2022 · 4 comments

Comments

@mogody
Copy link

mogody commented Apr 14, 2022

如题,根据文档配置了 metric_relabel_configs 为下面:

metric_relabel_configs:
    - source_labels: [instance]
      separator: ;
      regex: (.+)
      target_label: node
      replacement: $1
      action: replace

这样配置后导入仪表盘很多数据都显示成了 no data,如果不导入的话能显示的指标更多一些。

还有一个疑问,就是文档说明了只要配置 instance 到 node 的映射即可,但是我看提供的样例配置里面,却映射了三个:
image

@mogody
Copy link
Author

mogody commented Apr 14, 2022

image

配置之后,很多数据没了

@mogody
Copy link
Author

mogody commented Apr 14, 2022

这是我的配置:
image

@mogody
Copy link
Author

mogody commented Apr 14, 2022

这个是没有配置 metric_relable_configs 的:
image

@Leif160519
Copy link

Leif160519 commented May 15, 2023

我也遇到了这个问题,但是我去掉metric_relabel_configs 的配置之后依然没有这些数据,你可以对比一下发现,就是同一个指标,少了一些标签

正常的
beta_kubernetes_io_arch="amd64"
beta_kubernetes_io_os="linux"
container="POD"
id="/kubepods.slice/kubepods-besteffort.slice/kubepods-besteffort-pod00f0fb91_4aa8_4507_bb72_779b9a13a61d.slice/docker-ab2236d60053db6daf84cc8a9b184d1ecdfcec76de673b7fecff6db86a01c0d2.scope"
image="registry.aliyuncs.com/k8sxio/pause:3.5"
instance="k8s-master-01"
interface="eth0"
job="k8s-cadvisor"
kubernetes_io_arch="amd64"
kubernetes_io_hostname="k8s-master-01"
kubernetes_io_os="linux"
name="k8s_POD_csi-snapshotter-54d6466478-t5cgl_longhorn-system_00f0fb91-4aa8-4507-bb72-779b9a13a61d_0"
namespace="longhorn-system"
node="k8s-master-01"
node_longhorn_io_create_default_disk="true"
pod="csi-snapshotter-54d6466478-t5cgl"
storage="longhorn"
异常的
beta_kubernetes_io_arch="amd64"
beta_kubernetes_io_os="linux"
id="/"
instance="k8s-master-01"
interface="cali1231160e7fd"
job="kubernetes-cadvisor"
kubernetes_io_arch="amd64"
kubernetes_io_hostname="k8s-master-01"
kubernetes_io_os="linux"
node="k8s-master-01"

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

2 participants