grafana变量仍然捕获旧的指标信息 [英] grafana variable still catch old metrics info

查看:244
本文介绍了grafana变量仍然捕获旧的指标信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用grafana + prometheus Monitor k8s pod,当我的pod被移除时,我清理所有指标都属于被移除的pod,但是仍然可以在grafana中看到 变量

i use grafana+prometheus monitor k8s pod,when my pod is removed ,i clean all metrics belongs to the removed pod,but still can see in grafana variable

例如,我定义了一个名为node的变量,查询表达为"{instance =〜"(.+),job =" node status}",它可以捕获所有度量,并且我使用正则表达式' /instance =([[^"] +):9100"/'来匹配每个监控器目标的ip,当我单击仪表板上的节点标签时,它会显示所有目标ip,并且当这些目标之一被删除时,我会使用普罗米修斯提供的http api清除了属于该目标的所有指标,但是当我单击节点标签时,它仍显示删除的目标ip,为什么?以及如何删除该ip?

for example ,i defined a variable named node ,the query express is " {instance=~"(.+)", job="node status"} ",it can catch all metrics ,and i use regex expression '/instance="([^"]+):9100"/' to match the ip of each monitor target ,when i click node label on dashboard,it display all target ip , and when one of these targets is removed ,i use http api provide by prometheus to clean all metrics belongs to this target,but when i click node label ,it still display the removed target ip ,why? and how i can delete this ip?

推荐答案

Prometheus目标似乎没有更新,即使某些吊舱被逐出也是如此.您可以在Prometheus http://yourprometheus/targets 页中进行检查.

It seems that Prometheus targets are not updated, even so that some of the pods are evicted. You can check it in Prometheus http://yourprometheus/targets page.

Prometheus是否在K8s集群中运行?

Does Prometheus run inside of the K8s cluster?

这篇关于grafana变量仍然捕获旧的指标信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆