我已经使用Prometheus,Grafana和cAdvisor设置了码头监控堆栈。使用此查询来获得运行容器时:Prometheus cAdvisor码头监控
count_scalar(container_last_seen{name=~container1|container2})
它拿起容器好吗,只要我启动一个新的容器,它立即被拾起。问题是当一个容器被停止或移除时,它并没有拿起它,它仍然显示它是一个正在运行的容器。
从cAdvisor /指标端点作为容器停止它被立即删除。
有什么错查询?
(这是我使用的堆栈:https://github.com/vegasbrianc/prometheus)