Prometheus Time series
Time series is the entry / data of the prometheus server , A time series is composed of :
METRIC-NAME LABELS-AND-VALUES METRIC-VALUE TIME-STAMP
Types of time series’ metrics
Counter
Counter is a cumulative metric. As the name suggests, it tells the number of times a phenomenon occurred. Since one cannot undo the occurrence, the counter is always increasing (never decreases except on reset). In this case, rate() is used for evaluations.
`HOW MANY TIME THINGS HAVE OCCURRED
Gauge
Gauge in a nutshell can be defined as a spectrum; its value changes over time which can be decreasing and increasing. Ex. speedometer. Gauge is the most used metric type. It helps us to track change over time as well as see the current value.
WHAT IS THE CURRENT STATE
Histogram
In a nutshell, a histogram shows the distribution of values with their frequencies over a time period. For example, suppose there are three buckets: A, B, and C. The first entry will include at time T1 the frequency/count of observations in bucket A = 1, B = 2, and C = 3. The second entry will include at time T2 the frequency/count in bucket A = 2, B = 3, and C = 4. The range of values is defined by bins/buckets. There can be many buckets with multiple data points - it depends on the granularity of the histogram. In a typical histogram, the buckets can be as follows: ≤0.69, ≤ANY-VALUE, ≥ANY-VALUE (buckets are cumulative).
HOW MANY THINGS OCCURRED IN EACH BUCKET @ T
Summary
Summary is the brother of histogram where instead of buckets there are quantiles, i.e., percentages with count as their values. For example, suppose three phenomena occur: A, B, C. It’s evident that out of the total number of phenomena, A has a specific percentage, and so forth for B and C - this percentage is the quantile. It’s to be noted that all the quantiles sum up to 1 or 100%.