Prometheus, a CNCF open-source project, is a service monitoring system founded in 2012 at CloudSound. It consists of monitoring, alerting, and a time-series database.
- Website
- https://prometheus.io[01]
- Source Code
- https://github.com/prometheus/prometheus[02]
- Developer
- Country of Origin
- DE
- Start Year
- 2012
- Project Type
- Open Source
- Written in
- Go
- Supported Languages
- Go
- License
- Apache v2
Prometheus' main features are:
- a user-defined multi-dimensional data model
- a powerful query language on multi-dimensional data (PromQL)
- time-series data are fetched through HTTP pull
- service discovery as well as static configuration
- visualization of metrics and dashboarding
Prometheus, a CNCF open-source project, is a service monitoring system founded in 2012 at CloudSound. It consists of monitoring, alerting, and a time-series database.
Prometheus' main features are:
- a user-defined multi-dimensional data model
- a powerful query language on multi-dimensional data (PromQL)
- time-series data are fetched through HTTP pull
- service discovery as well as static configuration
- visualization of metrics and dashboarding
History
- Nov 24, 2012: Prometheus was started at SoundCloud
- Jan 26, 2015: Public release as an open source project
- May 9, 2016: Joined Cloud Native Computing Foundation
- Jul 18, 2016: Prometheus released 1.0.0
- Aug 25, 2016: First Prometheus Conference at Berlin
- Nov 7, 2017: Prometheus released 2.0.0
Checkpoints[04]
Prometheus supports periodic checkpointing, which is done every two hours by default. Checkpointing in Prometheus is done by compacting segments in a given WAL. Therefore when Prometheus recovers from failure, it can replay the WAL to restore its status before crash.
Compression[05]
Prometheus has an efficient data compression format due to the fact that data samples in the same series often change very little. One of the compression algorithms that Prometheus uses is similar to that of Facebook's Gorilla time-series database, called delta-of-delta compression algorithm. Prometheus also has other customized compression algorithms.
With regard to integration with remote storage engines, Prometheus uses a snappy-compressed protocol buffer encoding over HTTP for both read and write protocols.
Concurrency Control[06]
Similar to many time-series databases, Prometheus is log-structured and is not designed for ACID transactions.
Data Model[07]
Prometheus stores data as time series. A time series is defined by a metric and a set of key-value labels. A data sample is a data point at a given timestamp, including a float64 value and a unix timestamp. Therefore a time series can be formally defined as <metric>{<label_1>=<value1>, <label_2>=<value2>...}.
Prometheus supports the following metric types:
- Counter: monotonically increasing/decreasing data
- Gauge: numeric data point that has no correlation with timestamp
- Histogram: samples in a given time range
- Summery: similar to histogram, but only stores quantile data
Indexes[08]
Prometheus does not have complex data structures for maintaining indexes. Indexes are simply symbol tables that maps metrics/labels to offsets in Prometheus trunk files.
Logging[09]
Prometheus ensures data durability by write ahead logging (WAL). The format of how logs are stored on disk in Prometheus is largely borrowed from LevelDB/RocksDB.
A typical data point record in Prometheus's WAL is a triple (series_id, timestamp, value).
Query Execution[10]
Since the query in Prometheus is quite similar to that in key-value databases, thus the query execution model is tuple-at-a-time model.
Query Interface[11]
Prometheus has a custom query language called PromQL, which is specially designed to query time-series data. Prometheus query interface also implements math/datetime related functions as well as aggregation. Prometheus also provides a RESTful interface over HTTP.
Storage Architecture[06]
Prometheus has two storage architectures:
- local disk storage: write ahead logs are compressed and stored on local disk
- remote storage: Prometheus supports third-party storage (e.g. Kafka, PostgreSQL) via ProtoBuffer adaptor
Citations
11 sources- Prometheus - Monitoring system & time series database prometheus.io
- GitHub - prometheus/prometheus: The Prometheus monitoring system and time series database. · GitHub github.com
- https://prometheus.io/docs/introduction/overview prometheus.io
- tsdb/checkpoint.go at master · prometheus-junkyard/tsdb · GitHub github.com
- http://www.vldb.org/pvldb/vol8/p1816-teller.pdf vldb.org
- https://prometheus.io/docs/prometheus/latest/storage prometheus.io
- https://prometheus.io/docs/concepts/data_model prometheus.io
- https://github.com/prometheus/tsdb/blob/master/docs/format/index.md github.com
- tsdb/docs/format/wal.md at master · prometheus-junkyard/tsdb · GitHub github.com
- tsdb/querier.go at master · prometheus-junkyard/tsdb · GitHub github.com
- https://prometheus.io/docs/prometheus/latest/querying/basics prometheus.io