扩展 Prometheus 联邦

Scaling Prometheus federation

我正在尝试确定可以调整哪些内容以使我们的联合收集间隔更快地完成。我们的收集器对的联合超过了联合的 60 次抓取间隔,约 59 秒基于 scrape_duration_seconds{job="federation"}

我们在数据中心 A 中的设置 两个收集器各自指向所有服务器(~1,500)和一个从两个收集器之一收集的联合服务器。收集器的间隔为 30 秒,联合服务器为 60 秒。对于我们遇到问题的数据中心,大约有 800,000 个指标。联邦服务器是 运行 6proc,16GB 内存和版本 1.6.2。

-storage.local.target-堆大小=10737418240 -storage.local.num-指纹互斥锁=8192

我还缺少其他明显的定制吗?我总是可以部署更多的收集器对,但我担心联合层无法在 60 个间隔内从单个收集器收集。我们的设计假设每个数据中心(对于 1..N 环境)有一个联合服务器,它联合多个收集器对。有没有更好的设计可以考虑?

我查看了这些链接,但不确定如何继续。 https://prometheus.io/docs/operating/storage/#settings-for-high-numbers-of-time-series https://prometheus.io/docs/operating/storage/#helpful-metrics

联合用于汇总统计信息,而不是提取整个 Prometheus 服务器的内容。您应该将 Grafana 配置为能够与所有 Prometheus 服务器通信,我建议您删除堆栈中的 "Prom Federation" 层,因为它不会添加任何内容 - 请参阅 https://www.robustperception.io/federation-what-is-it-good-for/