Prometheus Basics in 143 Seconds

Prometheus Basics in 143 Seconds

Apr 25, 2024

In this video, we cover the key the basics of Prometheus Monitoring in 143 seconds.

Learn more at https://pagertree.com/learn/prometheus

This video was brought to you by PagerTree. On-Call. Simplified.
Start your free trial today at https://pagertree.com

Transcript:

In the next 143 seconds, I will show you WHY you need Prometheus, WHAT it's all about, and what you need to understand before using it.

Does this situation sound familiar?

You’ve deployed the latest and greatest feature to your app, and you go tell all your bosses that it's deployed, and then… support requests start flooding in. You don’t even know where to begin looking, or what is causing the issue. Could it be that your configuration update caused the app to crash, or your inefficient programming takes up too much CPU? How would you even know? Where would you begin to look?

Well…, that’s the moment you realize you need Prometheus. But what is Prometheus?

In a nutshell, Prometheus is a systems monitoring and alerting toolkit. It’s designed to monitor the health and performance of systems and applications in a dynamic cloud-native environment.

Prometheus uses a "pull-based" architecture where it periodically "scrapes" metrics from configured targets, stores them in a time-series database, and allows you to query, visualize, and even alert on data.

So what is a target? And what do I mean by “scrape”?

Targets are anything that can be monitored. Think servers, containers, databases, or even applications.

And Scraping is the process of Prometheus collecting metrics from your targets (by default, every minute).

Each scrape collection is known as a sample.

And all samples collected, are appended and stored as a time series.

Every time series is uniquely identified by a metric name and optional labels.

So what is a metric?

A metric is a characteristic of a system being measured (for example, the total number of requests made to your application).

Metrics are identified and organized by key-value pairs called labels.

There are 4 different metric types in Prometheus:.

Counters that track values that can ONLY increase.

Gauges that track values that can increase OR decrease.

Summaries track quantiles.

And Histograms that track cumulative bucketed counts.

Nice! Now that we have metrics, labels, and time series. let’s use them!

Metrics can be queried using Prometheus Query Language, aka PromQL.

PromQL can be used to query data, create alerting conditions, and even visualize that data.

You can use tools like Grafana to help visualize your metrics over time.

And you can send the alerts that Prometheus generates to tools like Alertmanager for grouping and deduplication.

Alertmanager can send them to various integrations like email, webhooks, or even PagerTree.

And just like that, you now know what Prometheus is and why you would use it.

If you thought this video was helpful, make sure to like this video and subscribe to get notified when more helpful videos are released.