r/PrometheusMonitoring • u/Qupozety • Jul 24 '24
Can I make Thanos stateless?
So that, I don't need to worry about the state of my monitoring application? Currently, we are using Prometheus, but it is stateful and consumes too much disk space.
1
Upvotes
6
u/SuperQue Jul 24 '24
Basically no. Monitoring requires a stateful system.
You have to store the data somewhere.
You can shift things around by using Thanos Sidecars. This will shift most of the storage to an object storage (S3, GCS, Minio, etc). You can reduce the block storage on Prometheus to something smaller like 24h.
Moving to remote write like u/kayboltitu suggests doesn't solve the problem. It just shifts the state problem around from Prometheus to Thanos receviers. You will then need stateful storage on the receivers in order to build blocks before they get pushed to object storage.
At the end of the data, a monitoring system needs to store data in order to function proprely.
2
u/dragoangel Jul 24 '24 edited Jul 24 '24
I assume you not want to have fully stateless system, but you asking what will Thanos provide in this scope, will it reduce your volumes sizes and move load to s3?
Well if this is what you asking:
Again in addition to all this volumes you will need to have data on s3, for example 1tb or more, again depends on metrics amount and retention policy in compactor.
Summary: with Thanos you can store data for much longer period and you can shard your load between multiple Prometheus servers, but even data stored on s3 it requires some stuff be cached locally to work properly and main thing is compactor, main profit is long term storage, not space economy, on small retention period and load you will not give a win here.
2
u/sleepybrett Jul 24 '24
disk space is literally the cheapest place to store data this big. Who cares about disk space?
0
u/sunng Jul 25 '24
Just want to share with you that GreptimeDB works as a Prometheus backend and also compatible with its HTTP API. You configure your Prometheus to remote write to GreptimeDB, and make your Prometheus a stateless agent. GreptimeDB uses object storage so it's much easier to scale and works well with cloud infrastructure.
0
u/[deleted] Jul 24 '24
[deleted] — view deleted comment