如题,小弟想咨询一下大规模的 prometheus 的方案
规模主要体现在:
但目前 prometheus 主要是单机的方式,想问问分布式的扩展方法
![]() |
1
duanzhanling 2024-05-23 07:23:17 +08:00
可以使用 vm 平滑替换 prometheus
|
![]() |
2
seers 2024-05-23 07:44:47 +08:00 via Android
k8s operator 直接放集群里面
|
![]() |
3
chankay 2024-05-23 08:43:29 +08:00
vm 集群版
|
4
F7TsdQL45E0jmoiG 2024-05-23 09:03:52 +08:00 ![]() 联邦,分层聚合
|
![]() |
5
DAPTX4869 2024-05-23 09:13:24 +08:00
@duanzhanling #1 vm 的全称是?
|
7
nicholasxuu 2024-05-23 09:27:53 +08:00
thanos
|
![]() |
8
qW7bo2FbzbC0 2024-05-23 09:28:34 +08:00
VictoriaMetrics
|
![]() |
9
coyove 2024-05-23 09:34:24 +08:00
关于数据量和 qps ,可以在 prometheus 或 influxdb 前做一层代理,在那里聚合 metrics 每 30s 上报一次
|
![]() |
11
ounxnpz 2024-05-23 10:00:16 +08:00
thanos ,长期数据存对象存储
|
![]() |
12
realpg PRO prometheus
没必要搞很大规模的集群 拆解开就完事 拆解成多个 prometheus 也不集群化 各自独立采集 每个 exporter 采集至少两份就好 在可视化层, 比如 grafana 进行数据展现时带逻辑 |
![]() |
13
tramm 2024-05-23 10:12:46 +08:00
数据量多大?
说不定根本用不到集群... |
14
chesha1 2024-05-23 11:53:24 +08:00
首先对于 Prometheus 的前后,最好有一个 mq (比如 kafka )和持久化组件(比如 mimir )
对于 Prometheus 本身,比较简单的方法就是在不同的机器(集群)上手动多建几个 Prometheus 实例,反正都是放到同一个远程的存储里 如果单个集群就已经大到超过单 Prometheus 实例的抓取能力了,Prometheus 支持联邦: https://prometheus.io/docs/prometheus/latest/federation/,相当于有多个 Prometheus ,后面的 Prometheus 从前面的 Prometheus 抓取数据 |
![]() |
15
liuliancao 2024-05-23 13:37:57 +08:00
目前我们是这样
prometheus 1 抓取 federate1 federate2 prometheus 2 抓取 federate1 federate2 proemtheus 用负载均衡去读 alertmanager 配置成 cluster 的方式 你也可以使用 remote_write 功能 这样你的 remote write 配置成 influxdb 两个 prometheus 用同一个数据源就可以了 |
16
sampeng 2024-05-23 18:06:40 +08:00
唯一解 thanos
prometheus 自带的联邦集群就是个玩具。。。。运维成本其实极其高。thanos 反正一个集群扔一个。反正都是汇总在 s3 的。查询就看你要求了。随便横向扩容。 我以前线上 2000 多个 pod 。查 1 年随便查 |
![]() |
17
annoygaga OP @duanzhanling VM 本地存储,是不是很折腾?
|
![]() |
19
annoygaga OP @nicholasxuu thanos 看上去不错,性能如何?多租户好做么?
|
![]() |
20
annoygaga OP @qW7bo2FbzbC0 VM 多租户如何?
|
![]() |
21
annoygaga OP @bluicezhen thanos 性能如何?多租户好做么?
|
![]() |
25
duanzhanling 2024-05-24 07:32:51 +08:00
@DAPTX4869 VictoriaMetrics
|
![]() |
26
duanzhanling 2024-05-24 07:33:41 +08:00
@annoygaga 没有吧,现在单节点 vm ,运行非常 OK
|
28
xueling 2024-05-28 09:51:59 +08:00
了解一下我的开源项目,https://github.com/xl-xueling/xl-lighthouse ,定位不是纯粹的监控系统,统计计算方面的功能远超过 prometheus ,远算性能更强和支持的数据量级也更大。
|