最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

prometheus - Grafana shows graph of '1' instead of actual values - Stack Overflow

programmeradmin3浏览0评论

I have a cAdvisor running and I'd like to display overview of all our microservices' containers to see whether they all are running.

With help of this answer:

I created this query

time() - max by (name) (container_last_seen{name=~"my-project.*"})

"max by(name)" is there because cAdvisor labels change after deployment so I want to group the same microservices together

This works as expected in Prometheus

However when I use the very same query in Grafana, the graph just shows '1' instead of actual values which are down there in the table and look correct in fact

Because of that I can't use it in any visualization because they always show '1'.

What am I doing wrong? I'm out of ideas

PS. when I remove time(), the graph looks actually correct for what it is. Is there some rounding going on on Grafana side because of big numbers for timestamp?

发布评论

评论列表(0)

  1. 暂无评论