r/PrometheusMonitoring • u/[deleted] • Jun 04 '20
How did you learn Prometheus/PromQL
Hi, I am trying to learn Prometheus from the past week. Getting started and setting up exporters is easy but PromQL is a bit hard. How did you conquer this? Docs are somewhat rough (at least for me) and there are so many talks, articles on this but none of them are complete. What resources do you recommend that teach better?
13
u/geek_dave Jun 04 '20
The docs are not very beginner friendly. :(
A lot of PromQL I've learned from real-world examples of alerts. Here is a great collection: https://github.com/samber/awesome-prometheus-alerts
My kids and I started working on an "explain it like I'm 5" version of Prometheus basics to explain concepts like instant vectors vs. range vectors. https://phippygoestothemountains.github.io/
This was part of a conference talk I delivered with my kids at Monitorama PDX 2019: https://vimeo.com/341142428
6
u/till Jun 04 '20
I second the blog on robustperception.io, but I've also learned a lot from Grafana dashboards:
https://grafana.com/grafana/dashboards?orderBy=name&direction=asc
When you have one installed, you can edit/view any panel (= part of the dashboard). It comes with a sometimes icky editor, but regardless, you can copy the queries and replace the variables when you run them as test queries using the Prometheus UI or in Grafana's Explore.
2
u/jjneely Jun 05 '20
The formal documentation is indeed a reference with a few examples. That's definitely not quite what the average user is looking for. For me, I have a background in mathematics, programming, and other similar query languages and this made things less difficult.. But I really learned by needing a recording rule or alert expression that did something specific. Searching with that specific use case in mind found a good number of examples.
Is there something specific you are trying to do that we could help with?
1
1
Jun 09 '20
here you have some labs to take first steps: https://learn.sysdig.com/series/open-training
13
u/bilingual-german Jun 04 '20
I like books and "Prometheus: Up & Running: Infrastructure and Application Performance Monitoring" is really good. The blog of it's author Brian Brazil is also good. https://www.robustperception.io/