Understanding Prometheus Metric Types | Meaning and Usage (Gauge, Counter, Summary, Histogram)
Ғылым және технология
This video explains the four different metric types in Prometheus: Gauges, Counters, Summaries, and Histograms. It goes into the meaning of each type, explains how to use each type in instrumentation, and how they show up in the exposition format. It also touches on what you have to watch out for when querying each metric type with PromQL.
Check my Prometheus training courses if you want to learn Prometheus in a structured way from the ground up:
training.promlabs.com/
Histograms vs. Summaries in the Prometheus documentation:
prometheus.io/docs/practices/...
Chapters:
00:00 Introduction
00:25 Gauges
01:00 Gauge Instrumentation Methods
01:40 Gauges in the Exposition Format
01:50 Querying Gauges
02:05 Gauges Containing Timestamps
02:18 Counters
02:44 Counter Resets
02:56 Counter Instrumentation Methods
03:48 Counters in the Exposition Format
03:58 Querying Counters (absolute values vs. rates)
04:53 Summaries
05:05 Constructing Summaries
05:15 Summary Instrumentation Methods
05:37 Summaries in the Exposition Format
06:01 Querying Summaries
06:45 Histograms
07:10 Cumulative Histograms
07:48 Constructing Histograms
07:58 Histogram Instrumentation Methods
08:08 Histograms in the Exposition Format
09:05 Querying Histograms (percentile calculation using histogram_quantile() )
10:10 Average Request Latencies
10:29 Native Histograms
11:04 Outro & PromLabs Prometheus Trainings
---------------------------------------------------------------------------
CREDITS: "Subscribe Button" by MrNumber112 • Free Download: Subscri...
Пікірлер: 21
The Prometheus CO-FOUNDER is out here explaining these concepts, and doing them so well. What a legend! Easiest sub ever. Thanks Julius!!!
hey julius... your way of explaining is super simple and on-point. the way you speak steadily and clearly..it made the concepts so easy to understand. keep bringing more videos on grafana and prometheus.
We recently started using it in our production, thank you so much for your work and for these videos. Hope to see them more 🙏
Thanks! This video covers just what I wanted to know
Thanks a ton ! I'm re-watching this and a couple more of your videos till the "dust settles" ...
Thank you very much for the amazing videos! Very informative
Amazing explanation, thanks for sharing
Thanks for the video!
Thanks for this video. Would like to know more about native histogram.
@PromLabs
Жыл бұрын
Thanks! Yes, I'll definitely make a video about those at some point! In the meantime, maybe these videos from PromCon EU 2022 are interesting: kzread.info/dash/bejne/c5eho6SPZrGpic4.html and kzread.info/dash/bejne/mJ2fpdOhnLi1nbQ.html
🙏🙏🙏🙏🙏 thank you soo much
It might set the context better for a first time watcher, if instrumentation is mentioned briefly.
I have a datetime value I want to track with metrics and prometheus. What would be the ideal metric type for that job?
@PromLabs
Ай бұрын
A common pattern in Prometheus is to store Unix timestamps in gauge metrics. Then you can use the time() function (e.g. "time() - my_timestamp_seconds") to calculate how old the timestamp is. Example: demo.promlens.com/?l=e2HGvJ2PJgl
How to enable authentication in prometheus
@PromLabs
24 күн бұрын
There's several ways, but take a look at prometheus.io/docs/guides/basic-auth/ and prometheus.io/docs/prometheus/latest/configuration/https/ for a start.
when I am trying to create datasource using local prometheus url in grafana its throwing an error "ReadObject: expect { or , or } or n, but found #, error found in #1 byte of ...|# HELP jmx_|..., bigger context ...|# HELP jmx_config_reload_success_total Number of ti|... - There was an error returned querying the Prometheus API." how to resolve this .Any body help me
@PromLabs
4 ай бұрын
It sounds like you are inputting the URL of a Prometheus /metrics endpoint (perhaps of the JMX exporter), not the URL to a Prometheus monitoring server.
thanks for the video but the subscriber button has a very different kind of inc() method it substracts one if you are already subscribed :)
@PromLabs
24 күн бұрын
Haha yes, this is very dangerous 🤣