From the course: Prometheus Essential Training

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Prometheus functions

Prometheus functions

- [Instructor] By now you have encountered various helpful functions used in PromQL syntax, but what are Prometheus functions? Simply put, these are functions that can be used to query Prometheus. We have seen some examples when discussing operators, but in this video I will walk you through some useful functions along with some gems that are less used, but very helpful for niche operations. We can't cover all available functions, but you can take a look at the documentation for any function that you're interested in. Now, let's take a look at some of the scenarios which require the use of Prometheus functions. We'll use the Prometheus UI to also see them work in real time. One of my favorite functions is label replace, which allows you to replace a label using a matching regex. It's a powerful way to write queries that build on top of each other. The syntaxes are shown on the screen. For each time series, it'll match the regex against the source label, and if it matches, the value of…

Contents