目前,我正在进行一个获取自定义数据的项目,将其推送到Prometheus,并使用Grafana将其可视化。我发现Prometheus不存储数据,所以我决定使用VictoriaMetrics。我下载了vmutils并在cmd中运行vmagent:
vmagent-windows-amd64-prod.exe
-promscrape.config=C:\Users\UserName\prometheus\prometheus.yml
-promscrape.config.strictParse=false
-remoteWrite.url=https://localhost:8429/api/v1/write我在prometheus.yml上写道:
remote_write:
- url: http://localhost:8429/api/v1/write运行所有这些之后,vmagent开始用不同的字节推送这样的错误消息
warn VictoriaMetrics/app/vmagent/remotewrite.client.go:277
couldn't send a block with size 5508 bytes to "1:secret-url":
Post "http://localhost:8429/api/v1/write": http: server gave HTTP response to HTTPS client;
re-sending the block in 60.000 seconds另外,Garafana无法从8429端口获取数据。
我忘了配置一些文件了吗?还是我搞错了?谢谢。
发布于 2022-04-17 14:38:07
我发现普罗米修斯不储存数据
Prometheus确实存储数据并且做得很好) Prometheus的唯一限制是它不能“水平地”缩放。为了克服这个限制,有许多项目存在: VictoriaMetrics,Thanos,Cortex。也可以使用VictoriaMetrics代替普罗米修斯-请参阅更多详细信息( https://docs.victoriametrics.com/FAQ.html#can-i-use-victoriametrics-instead-of-prometheus )。
我忘了配置一些文件了吗?还是我搞错了?谢谢。
实际上,是的-你用错了。Vmagent是一种用于刮取和转发度量的无状态服务。它不存储度量。在这里可以看到更多关于https://docs.victoriametrics.com/vmagent.html#motivation的信息。
有两种方法可以解决这个问题:
https://stackoverflow.com/questions/71883123
复制相似问题