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

  • @ankitshah8369
    @ankitshah83693 ай бұрын

    The Prometheus CO-FOUNDER is out here explaining these concepts, and doing them so well. What a legend! Easiest sub ever. Thanks Julius!!!

  • @abdussamisehaam2523
    @abdussamisehaam2523Ай бұрын

    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.

  • @user-mn8hm2fe1v
    @user-mn8hm2fe1v9 ай бұрын

    We recently started using it in our production, thank you so much for your work and for these videos. Hope to see them more 🙏

  • @manumonti_
    @manumonti_9 ай бұрын

    Thanks! This video covers just what I wanted to know

  • @cokegen
    @cokegen11 ай бұрын

    Thanks a ton ! I'm re-watching this and a couple more of your videos till the "dust settles" ...

  • @denar5022
    @denar50228 ай бұрын

    Thank you very much for the amazing videos! Very informative

  • @metalmasterlp
    @metalmasterlp Жыл бұрын

    Amazing explanation, thanks for sharing

  • @joshuabrard1061
    @joshuabrard1061 Жыл бұрын

    Thanks for the video!

  • @VishalSharma-rl1ko
    @VishalSharma-rl1ko Жыл бұрын

    Thanks for this video. Would like to know more about native histogram.

  • @PromLabs

    @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

  • @Jam-ht2ky
    @Jam-ht2ky Жыл бұрын

    🙏🙏🙏🙏🙏 thank you soo much

  • @user-bc2vi4lo1z
    @user-bc2vi4lo1z8 ай бұрын

    It might set the context better for a first time watcher, if instrumentation is mentioned briefly.

  • @catex5452
    @catex5452Ай бұрын

    I have a datetime value I want to track with metrics and prometheus. What would be the ideal metric type for that job?

  • @PromLabs

    @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

  • @vipinmanakkattel9241
    @vipinmanakkattel9241Ай бұрын

    How to enable authentication in prometheus

  • @PromLabs

    @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.

  • @sriyushanyanshunamana4651
    @sriyushanyanshunamana46514 ай бұрын

    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

    @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.

  • @JackReacher1
    @JackReacher1Ай бұрын

    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

    @PromLabs

    24 күн бұрын

    Haha yes, this is very dangerous 🤣

Келесі