Skip to content

Instantly share code, notes, and snippets.

@kpettijohn
Created December 5, 2018 17:36
Show Gist options
  • Save kpettijohn/115094097b27eddeca81ccc6af30d908 to your computer and use it in GitHub Desktop.
Save kpettijohn/115094097b27eddeca81ccc6af30d908 to your computer and use it in GitHub Desktop.
Prometheus Notes

Prometheus

Operations

Capacity Planning

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment