https://prometheus.io/docs/prometheus/latest/storage/#operational-aspects
Following the following formula for storage capacity planning:
needed_disk_space = retention_time_seconds * ingested_samples_per_second * bytes_per_sample
Samples per second
... samples per second via rate(tsdb_samples_appended_total[5m]) prometheus-junkyard/tsdb#123 (comment)
rate(prometheus_tsdb_head_samples_appended_total[5m]))
Currently active series
... currently active series can be queried via sum(scrape_samples_scraped) prometheus-junkyard/tsdb#123 (comment)
sum(scrape_samples_scraped)
30 days of storage at the current rate of ingested samples per second.
On average, Prometheus uses only around 1-2 bytes per sample.
needed_disk_space = (24*60*60*30) * (sum(rate(prometheus_tsdb_head_samples_appended_total[5m])) * 2)