SlideShare a Scribd company logo
Brian Brazil
Founder
Evaluating Prometheus
Knowledge in Interviews
Who am I?
● One of the developers of Prometheus
● Author of Prometheus: Up&Running
● Primary author of Reliable Insights blog
You may have heard of me :)
Looking Back..
Two years I gave a lightning talk on "An Exploration of the
Formal Properties of PromQL" demonstrating that PromQL
was Turing Complete via Conway's Life.
Last year I gave a talk on "Rule 110 for Prometheus", a
simpler demonstration of the above.
Filtering
With the growth of the ecosystem you may looking to hire an
employee with existing experience to assist you on your
Prometheus journey.
How can you filter the wheat from the chaff?
CV
You could look at someone's experience with Prometheus
● Are they a Prometheus developer?
● Have they written a book?
● Do they have a well known blog?
● Have they demonstrated esoteric PromQL knowledge?
But the technology is fairly new, and this is a high bar. No
one has 10+ years of experience with Prometheus after all!
Low Pass Filter
Rather than looking for a unicorn, how about instead throwing
away applicants that are pretty obviously faking it until they
make it.
From there you can more deeply consider the remaining
applicants.
Enter FizzBuzz.
FizzBuzz
Write a program that prints the numbers from 1 to 100. But for
multiples of three print “Fizz” instead of the number and for
the multiples of five print “Buzz”. For numbers which are
multiples of both three and five print “FizzBuzz”.
Source: http://wiki.c2.com/?FizzBuzzTest
FizzBuzz for Prometheus
FizzBuzz is a trivial programming task, that an experienced
programmer should have no problem coding up.
We could use this to evaluate PromQL knowledge, and thus
get an idea if someone has at least a very basic
understanding of Prometheus.
Let's do it then!
FizzBuzz is a trivial problem, but let me share my solution.
Input Data
We'll need some input data
for the for loop.
We can build it up with a
recording rule.
Input Recording Rule
record: input
expr: >
(
input
or
count_values("number", (input + 1) <= 100)
* on() group_left
max(input) + 1
or
vector(0)
)
Output
From there we need to filter based on the values.
PromQL has a modulus operator, and label_replace can do
strings, so this isn't hard.
Output Recording Rule
record: output
expr: >
(
label_replace(input % 15 == 0, "output", "FizzBuzz", "", "")
or on (number)
label_replace(input % 5 == 0, "output", "Buzz", "", "")
or on (number)
label_replace(input % 3 == 0, "output", "Fizz", "", "")
or on (number)
label_replace(input, "output", "$1", "number", "(.*)")
)
Output Result
The answer is right, but
out of order.
That can be fixed.
Output Recording Rule - v2
record: output
expr: >
(
label_replace(input % 15 == 0, "output", "FizzBuzz", "", "")
or on (number)
label_replace(input % 5 == 0, "output", "Buzz", "", "")
or on (number)
label_replace(input % 3 == 0, "output", "Fizz", "", "")
or on (number)
label_replace(input, "output", "$1", "number", "(.*)")
) * 0 + on(number) group_left input > 0
Output Result v2 and Sorted
The values now match
in input number, so we
can do sort(output)!
Resources
Book: http://shop.oreilly.com/product/0636920147343.do
Robust Perception Blog: www.robustperception.io/blog
Queries: prometheus@robustperception.io

More Related Content

PDF
Systems Monitoring with Prometheus (Devops Ireland April 2015)
PPTX
Prometheus design and philosophy
PDF
Monitoring Hadoop with Prometheus (Hadoop User Group Ireland, December 2015)
PDF
Better Monitoring for Python: Inclusive Monitoring with Prometheus (Pycon Ire...
PPTX
So You Want to Write an Exporter
PDF
Provisioning and Capacity Planning Workshop (Dogpatch Labs, September 2015)
PDF
Monitoring your Python with Prometheus (Python Ireland April 2015)
PDF
Prometheus and Docker (Docker Galway, November 2015)
Systems Monitoring with Prometheus (Devops Ireland April 2015)
Prometheus design and philosophy
Monitoring Hadoop with Prometheus (Hadoop User Group Ireland, December 2015)
Better Monitoring for Python: Inclusive Monitoring with Prometheus (Pycon Ire...
So You Want to Write an Exporter
Provisioning and Capacity Planning Workshop (Dogpatch Labs, September 2015)
Monitoring your Python with Prometheus (Python Ireland April 2015)
Prometheus and Docker (Docker Galway, November 2015)

What's hot (18)

PDF
What is your application doing right now? An introduction to Prometheus
PPTX
Counting with Prometheus (CloudNativeCon+Kubecon Europe 2017)
PPTX
Prometheus for Monitoring Metrics (Percona Live Europe 2017)
PPTX
Provisioning and Capacity Planning (Travel Meets Big Data)
PDF
Your data is in Prometheus, now what? (CurrencyFair Engineering Meetup, 2016)
PPTX
Prometheus - Open Source Forum Japan
PPTX
An Introduction to Prometheus (GrafanaCon 2016)
PPTX
Prometheus (Prometheus London, 2016)
PDF
Cloud Monitoring with Prometheus
PDF
Prometheus: A Next Generation Monitoring System (FOSDEM 2016)
PDF
No C-QL (Or how I learned to stop worrying, and love eventual consistency) (N...
PPTX
Evolving Prometheus for the Cloud Native World (FOSDEM 2018)
PPTX
Primeiros Passos na API do Zabbix com Python - 2º ZABBIX MEETUP DO INTERIOR-SP
PPT
Monitoring using Prometheus and Grafana
PPTX
What i got wrong when somebody asked me to deploy a web app
PDF
How to debug slow lambda response times
PPTX
TLS - 2016 Velocity Training
PDF
Devoxx France: Fault tolerant microservices on the JVM with Cassandra
What is your application doing right now? An introduction to Prometheus
Counting with Prometheus (CloudNativeCon+Kubecon Europe 2017)
Prometheus for Monitoring Metrics (Percona Live Europe 2017)
Provisioning and Capacity Planning (Travel Meets Big Data)
Your data is in Prometheus, now what? (CurrencyFair Engineering Meetup, 2016)
Prometheus - Open Source Forum Japan
An Introduction to Prometheus (GrafanaCon 2016)
Prometheus (Prometheus London, 2016)
Cloud Monitoring with Prometheus
Prometheus: A Next Generation Monitoring System (FOSDEM 2016)
No C-QL (Or how I learned to stop worrying, and love eventual consistency) (N...
Evolving Prometheus for the Cloud Native World (FOSDEM 2018)
Primeiros Passos na API do Zabbix com Python - 2º ZABBIX MEETUP DO INTERIOR-SP
Monitoring using Prometheus and Grafana
What i got wrong when somebody asked me to deploy a web app
How to debug slow lambda response times
TLS - 2016 Velocity Training
Devoxx France: Fault tolerant microservices on the JVM with Cassandra
Ad

More from Brian Brazil (17)

PPTX
OpenMetrics: What Does It Mean for You (PromCon 2019, Munich)
PPTX
Evolution of Monitoring and Prometheus (Dublin 2018)
PPTX
Anatomy of a Prometheus Client Library (PromCon 2018)
PPTX
Prometheus for Monitoring Metrics (Fermilab 2018)
PPTX
Evolution of the Prometheus TSDB (Percona Live Europe 2017)
PPTX
Staleness and Isolation in Prometheus 2.0 (PromCon 2017)
PPTX
Rule 110 for Prometheus (PromCon 2017)
PPTX
Prometheus: From Berlin to Bonanza (Keynote CloudNativeCon+Kubecon Europe 2017)
PPTX
What does "monitoring" mean? (FOSDEM 2017)
PPTX
Monitoring What Matters: The Prometheus Approach to Whitebox Monitoring (Berl...
PPTX
An Exploration of the Formal Properties of PromQL
PPTX
Life of a Label (PromCon2016, Berlin)
PPTX
Prometheus (Monitorama 2016)
PDF
Microservices and Prometheus (Microservices NYC 2016)
PDF
Monitoring Kubernetes with Prometheus (Kubernetes Ireland, 2016)
PDF
Ansible at FOSDEM (Ansible Dublin, 2016)
PDF
Prometheus (Microsoft, 2016)
OpenMetrics: What Does It Mean for You (PromCon 2019, Munich)
Evolution of Monitoring and Prometheus (Dublin 2018)
Anatomy of a Prometheus Client Library (PromCon 2018)
Prometheus for Monitoring Metrics (Fermilab 2018)
Evolution of the Prometheus TSDB (Percona Live Europe 2017)
Staleness and Isolation in Prometheus 2.0 (PromCon 2017)
Rule 110 for Prometheus (PromCon 2017)
Prometheus: From Berlin to Bonanza (Keynote CloudNativeCon+Kubecon Europe 2017)
What does "monitoring" mean? (FOSDEM 2017)
Monitoring What Matters: The Prometheus Approach to Whitebox Monitoring (Berl...
An Exploration of the Formal Properties of PromQL
Life of a Label (PromCon2016, Berlin)
Prometheus (Monitorama 2016)
Microservices and Prometheus (Microservices NYC 2016)
Monitoring Kubernetes with Prometheus (Kubernetes Ireland, 2016)
Ansible at FOSDEM (Ansible Dublin, 2016)
Prometheus (Microsoft, 2016)
Ad

Recently uploaded (20)

PPTX
Introduction to Artificial Intelligence
PDF
Nekopoi APK 2025 free lastest update
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
AI in Product Development-omnex systems
PPTX
Essential Infomation Tech presentation.pptx
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
Transform Your Business with a Software ERP System
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
System and Network Administration Chapter 2
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PPTX
Operating system designcfffgfgggggggvggggggggg
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Introduction to Artificial Intelligence
Nekopoi APK 2025 free lastest update
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
wealthsignaloriginal-com-DS-text-... (1).pdf
AI in Product Development-omnex systems
Essential Infomation Tech presentation.pptx
Wondershare Filmora 15 Crack With Activation Key [2025
Softaken Excel to vCard Converter Software.pdf
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Transform Your Business with a Software ERP System
Design an Analysis of Algorithms I-SECS-1021-03
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
System and Network Administration Chapter 2
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Operating system designcfffgfgggggggvggggggggg
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
How Creative Agencies Leverage Project Management Software.pdf
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf

Evaluating Prometheus Knowledge in Interviews (PromCon 2018)

  • 2. Who am I? ● One of the developers of Prometheus ● Author of Prometheus: Up&Running ● Primary author of Reliable Insights blog You may have heard of me :)
  • 3. Looking Back.. Two years I gave a lightning talk on "An Exploration of the Formal Properties of PromQL" demonstrating that PromQL was Turing Complete via Conway's Life. Last year I gave a talk on "Rule 110 for Prometheus", a simpler demonstration of the above.
  • 4. Filtering With the growth of the ecosystem you may looking to hire an employee with existing experience to assist you on your Prometheus journey. How can you filter the wheat from the chaff?
  • 5. CV You could look at someone's experience with Prometheus ● Are they a Prometheus developer? ● Have they written a book? ● Do they have a well known blog? ● Have they demonstrated esoteric PromQL knowledge? But the technology is fairly new, and this is a high bar. No one has 10+ years of experience with Prometheus after all!
  • 6. Low Pass Filter Rather than looking for a unicorn, how about instead throwing away applicants that are pretty obviously faking it until they make it. From there you can more deeply consider the remaining applicants. Enter FizzBuzz.
  • 7. FizzBuzz Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”. Source: http://wiki.c2.com/?FizzBuzzTest
  • 8. FizzBuzz for Prometheus FizzBuzz is a trivial programming task, that an experienced programmer should have no problem coding up. We could use this to evaluate PromQL knowledge, and thus get an idea if someone has at least a very basic understanding of Prometheus.
  • 9. Let's do it then! FizzBuzz is a trivial problem, but let me share my solution.
  • 10. Input Data We'll need some input data for the for loop. We can build it up with a recording rule.
  • 11. Input Recording Rule record: input expr: > ( input or count_values("number", (input + 1) <= 100) * on() group_left max(input) + 1 or vector(0) )
  • 12. Output From there we need to filter based on the values. PromQL has a modulus operator, and label_replace can do strings, so this isn't hard.
  • 13. Output Recording Rule record: output expr: > ( label_replace(input % 15 == 0, "output", "FizzBuzz", "", "") or on (number) label_replace(input % 5 == 0, "output", "Buzz", "", "") or on (number) label_replace(input % 3 == 0, "output", "Fizz", "", "") or on (number) label_replace(input, "output", "$1", "number", "(.*)") )
  • 14. Output Result The answer is right, but out of order. That can be fixed.
  • 15. Output Recording Rule - v2 record: output expr: > ( label_replace(input % 15 == 0, "output", "FizzBuzz", "", "") or on (number) label_replace(input % 5 == 0, "output", "Buzz", "", "") or on (number) label_replace(input % 3 == 0, "output", "Fizz", "", "") or on (number) label_replace(input, "output", "$1", "number", "(.*)") ) * 0 + on(number) group_left input > 0
  • 16. Output Result v2 and Sorted The values now match in input number, so we can do sort(output)!
  • 17. Resources Book: http://shop.oreilly.com/product/0636920147343.do Robust Perception Blog: www.robustperception.io/blog Queries: prometheus@robustperception.io