The Prometheus Data Model and PromQL
With Prometheus deployed, let’s explore a little more about what it’s doing under the hood. You’re likely already somewhat familiar with Prometheus, but you may not know the intricacies of how it works. It’s something I’m still learning every day and I dare say that Prometheus’s code base has grown to the size where there may not be a single person or maintainer who understands the ins and outs of how every piece of it works. Nevertheless, there’s still plenty to be learned; the more you understand a system, the better you can run and maintain it.
The core of the Prometheus system is its TSDB. Most of the work that Prometheus does is centered around either getting data into the TSDB or reading data out of it. But TSDBs are complicated topics that are ever-changing and evolving. Even Prometheus underwent a major TSDB rewrite when it went from version 1 to version 2. So, we’ll keep our inquiry...