SlideShare a Scribd company logo
Cloud-Native Monitoring
With Prometheus
Jacopo Nardiello
Founder & DevOps Engineer
@jnardiello
Thanks to our sponsors
KubePrimer Workshop
14/07, Milano
http://kubeprimer.sighup.io
What is Prometheus?
Community Driven Open-source Monitoring and
Alerting toolkit, ships a time series database, an
alerting entity and a number of integration tools to
expose metrics.
A bit of context around Prometheus
Started in 2012 as a SoundCloud
internal project
Second project to join CNCF after
Kubernetes
Focus
Operational systems monitoring
Dynamic cloud environments
Natively integrates with existing
providers/tools and extract
scrape targets
Monitoring Cloud Native Applications with Prometheus
Core features
● A powerful query language - PromQL
● Dimensional Data model
● Optimized to be efficient
● Operational & Architectural simplicity
Pull
/metrics endpoints
Model & typical monitoring scenario
The Architecture behind Prometheus
Let’s go a bit hands-on
Time Series Database
&
Web UI
http://demo.robustperception.io:9090/graph
Alert-Manager
http://demo.robustperception.io:9090/graph
Graphs & Dashboards
http://demo.robustperception.io:3000/dashboard/db/host-stats
PromQL & Label based queries
http_requests_total all time series related to the metric http_requests_total
http_requests_total{code="200",method="get"} time series related to successful request with
method get for the metric http_requests_total
http_requests_total{code="200",method="get"}[5m] returns a range vector
http_requests_total{status!~"^4..$"}
Selecting all errors-related time series using
regexes
sum(rate(http_requests_total[5m])) by (job) Applying functions, in this case we sum over a
range vector and aggregating by job
ACHTUNG!
Labels are transparent to Prometheus
whatever you define when exposing a metric, will be
available to query in the db.
Pulling metrics
● How do you expose those metrics?
● Exporters
● Language specific SDKs
/metrics
# HELP hash_seconds Time taken to create hashes
# TYPE hash_seconds histogram
hash_seconds_bucket{code="200",le="1"} 2
hash_seconds_bucket{code="200",le="2.5"} 2
hash_seconds_bucket{code="200",le="5"} 2
hash_seconds_bucket{code="200",le="10"} 2
hash_seconds_bucket{code="200",le="+Inf"} 2
hash_seconds_sum{code="200"} 9.370800000000002e-05
hash_seconds_count{code="200"} 2
Exporters
The community has contributed
writing exporters for pretty much
everything
https://prometheus.io/docs/instrumenting/exporters/
Alerting, Writing alerts: a simple example
ALERT <alert_name>
IF <condition>
FOR 5m
LABELS { severity="error" }
ANNOTATIONS {
summary = <summary>,
description = <description>,
}
Alert-Manager, Writing alerts: a real-world example
ALERT NODE_DISK_FREE_SPACE_ROOT_PARTITION_80
IF ((node_filesystem_size{fstype="rootfs"}-node_filesystem_avail{fstype="rootfs"})/node_filesystem_size{fstype="rootfs"})*100 > 80
FOR 5m
LABELS { severity="error" }
ANNOTATIONS {
summary = "Current disk usage on root partition is {{ $value }}% on node {{ $labels.instance }}",
description = "Current disk usage on root partition is {{ $value }}% on node {{ $labels.instance }}",
fixes = "Current disk usage on root partition is {{ $value }}% on node {{ $labels.instance }}",
}
Alert Dispatching
Job of the alert-manager is to dispatch
alerts to the right channel according to
their severity
Wrapping up
Thanks, questions?

More Related Content

What's hot (20)

PDF
Better Monitoring for Python: Inclusive Monitoring with Prometheus (Pycon Ire...
Brian Brazil
 
PDF
Monitoring Kubernetes with Prometheus
Grafana Labs
 
PPTX
MeetUp Monitoring with Prometheus and Grafana (September 2018)
Lucas Jellema
 
PDF
Prometheus (Microsoft, 2016)
Brian Brazil
 
PDF
Infrastructure & System Monitoring using Prometheus
Marco Pas
 
PDF
Prometheus Overview
Brian Brazil
 
PDF
What is your application doing right now? An introduction to Prometheus
Matthias Grüter
 
PDF
The history of Prometheus at SoundCloud
Tobias Schmidt
 
PDF
Prometheus: A Next Generation Monitoring System (FOSDEM 2016)
Brian Brazil
 
PDF
Microservices and Prometheus (Microservices NYC 2016)
Brian Brazil
 
ODP
Monitoring With Prometheus
Knoldus Inc.
 
PDF
Monitoring Kubernetes with Prometheus
Tobias Schmidt
 
PPTX
Prometheus grafana workshop
Demis Rizzotto
 
PPTX
OpenTelemetry For Operators
Kevin Brockhoff
 
PDF
Prometheus + Grafana = Awesome Monitoring
Henrique Galafassi Dalssaso
 
PPTX
Prometheus - Open Source Forum Japan
Brian Brazil
 
PDF
Automated monitoring using grafana - DevOpsBKK 2018
Eakkapan Sinlapachipwilai
 
PDF
Your data is in Prometheus, now what? (CurrencyFair Engineering Meetup, 2016)
Brian Brazil
 
PPTX
Prometheus for Monitoring Metrics (Percona Live Europe 2017)
Brian Brazil
 
PDF
Prometheus Introduction (InfraCoders Vienna)
Oliver Moser
 
Better Monitoring for Python: Inclusive Monitoring with Prometheus (Pycon Ire...
Brian Brazil
 
Monitoring Kubernetes with Prometheus
Grafana Labs
 
MeetUp Monitoring with Prometheus and Grafana (September 2018)
Lucas Jellema
 
Prometheus (Microsoft, 2016)
Brian Brazil
 
Infrastructure & System Monitoring using Prometheus
Marco Pas
 
Prometheus Overview
Brian Brazil
 
What is your application doing right now? An introduction to Prometheus
Matthias Grüter
 
The history of Prometheus at SoundCloud
Tobias Schmidt
 
Prometheus: A Next Generation Monitoring System (FOSDEM 2016)
Brian Brazil
 
Microservices and Prometheus (Microservices NYC 2016)
Brian Brazil
 
Monitoring With Prometheus
Knoldus Inc.
 
Monitoring Kubernetes with Prometheus
Tobias Schmidt
 
Prometheus grafana workshop
Demis Rizzotto
 
OpenTelemetry For Operators
Kevin Brockhoff
 
Prometheus + Grafana = Awesome Monitoring
Henrique Galafassi Dalssaso
 
Prometheus - Open Source Forum Japan
Brian Brazil
 
Automated monitoring using grafana - DevOpsBKK 2018
Eakkapan Sinlapachipwilai
 
Your data is in Prometheus, now what? (CurrencyFair Engineering Meetup, 2016)
Brian Brazil
 
Prometheus for Monitoring Metrics (Percona Live Europe 2017)
Brian Brazil
 
Prometheus Introduction (InfraCoders Vienna)
Oliver Moser
 

Similar to Monitoring Cloud Native Applications with Prometheus (20)

PDF
Monitoring Kubernetes with Prometheus (Kubernetes Ireland, 2016)
Brian Brazil
 
PDF
Red Hat Forum Benelux 2015
Microsoft
 
PDF
The DevOps paradigm - the evolution of IT professionals and opensource toolkit
Marco Ferrigno
 
PDF
The DevOps Paradigm
NaLUG
 
PDF
Operator SDK for K8s using Go
CloudOps2005
 
PPTX
NuGet beyond Hello World - DotNext Piter 2017
Maarten Balliauw
 
PPTX
Prometheus Training
Tim Tyler
 
PDF
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
QAware GmbH
 
PDF
Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...
Ajeet Singh Raina
 
PDF
Cloud-native .NET Microservices mit Kubernetes
QAware GmbH
 
PPTX
Deploying R for Production - SRUG
Holger Hellebro
 
PPTX
The Right Tools for IoT Developers – Dan Gross @ Eclipse IoT Day ThingMonk 2016
Benjamin Cabé
 
PPTX
Breaking the 2 Pizza Paradox with your Platform as an Application
Mark Rendell
 
PPTX
Spring Boot & Spring Cloud Apps on Pivotal Application Service - Daniel Lavoie
VMware Tanzu
 
PDF
Red Hat and kubernetes: awesome stuff coming your way
Johannes Brännström
 
PDF
When to use Serverless? When to use Kubernetes?
Niklas Heidloff
 
PDF
Eclipse Che - A Revolutionary IDE for Distributed & Mainframe Development
DevOps.com
 
DOC
Balaji Resume
Balaji Ommudali
 
DOCX
Kunal bhatia resume mass
Kunal Bhatia, MBA Candidate, BSc.
 
PDF
Combining formal and machine learning techniques for the generation of JML sp...
Decoder Project
 
Monitoring Kubernetes with Prometheus (Kubernetes Ireland, 2016)
Brian Brazil
 
Red Hat Forum Benelux 2015
Microsoft
 
The DevOps paradigm - the evolution of IT professionals and opensource toolkit
Marco Ferrigno
 
The DevOps Paradigm
NaLUG
 
Operator SDK for K8s using Go
CloudOps2005
 
NuGet beyond Hello World - DotNext Piter 2017
Maarten Balliauw
 
Prometheus Training
Tim Tyler
 
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
QAware GmbH
 
Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...
Ajeet Singh Raina
 
Cloud-native .NET Microservices mit Kubernetes
QAware GmbH
 
Deploying R for Production - SRUG
Holger Hellebro
 
The Right Tools for IoT Developers – Dan Gross @ Eclipse IoT Day ThingMonk 2016
Benjamin Cabé
 
Breaking the 2 Pizza Paradox with your Platform as an Application
Mark Rendell
 
Spring Boot & Spring Cloud Apps on Pivotal Application Service - Daniel Lavoie
VMware Tanzu
 
Red Hat and kubernetes: awesome stuff coming your way
Johannes Brännström
 
When to use Serverless? When to use Kubernetes?
Niklas Heidloff
 
Eclipse Che - A Revolutionary IDE for Distributed & Mainframe Development
DevOps.com
 
Balaji Resume
Balaji Ommudali
 
Kunal bhatia resume mass
Kunal Bhatia, MBA Candidate, BSc.
 
Combining formal and machine learning techniques for the generation of JML sp...
Decoder Project
 
Ad

More from Jacopo Nardiello (7)

PDF
The Art of Cloud Native Defense on Kubernetes
Jacopo Nardiello
 
PDF
Tales of the mythical cloud-native platform - Container day 2022
Jacopo Nardiello
 
PDF
Kubernetes 101
Jacopo Nardiello
 
PDF
Becoming a developer
Jacopo Nardiello
 
PDF
Eventsourcing with PHP and MongoDB
Jacopo Nardiello
 
PDF
Ultimate Introduction To AngularJS
Jacopo Nardiello
 
PDF
Testing AngularJS
Jacopo Nardiello
 
The Art of Cloud Native Defense on Kubernetes
Jacopo Nardiello
 
Tales of the mythical cloud-native platform - Container day 2022
Jacopo Nardiello
 
Kubernetes 101
Jacopo Nardiello
 
Becoming a developer
Jacopo Nardiello
 
Eventsourcing with PHP and MongoDB
Jacopo Nardiello
 
Ultimate Introduction To AngularJS
Jacopo Nardiello
 
Testing AngularJS
Jacopo Nardiello
 
Ad

Recently uploaded (20)

PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PPTX
CapCut Pro PC Crack Latest Version Free Free
josanj305
 
PDF
Governing Geospatial Data at Scale: Optimizing ArcGIS Online with FME in Envi...
Safe Software
 
PDF
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
PDF
Pipeline Industry IoT - Real Time Data Monitoring
Safe Software
 
PDF
5 Things to Consider When Deploying AI in Your Enterprise
Safe Software
 
PDF
Quantum Threats Are Closer Than You Think – Act Now to Stay Secure
WSO2
 
PDF
Darley - FIRST Copenhagen Lightning Talk (2025-06-26) Epochalypse 2038 - Time...
treyka
 
PDF
Deploy Faster, Run Smarter: Learn Containers with QNAP
QNAP Marketing
 
PDF
🚀 Let’s Build Our First Slack Workflow! 🔧.pdf
SanjeetMishra29
 
PDF
Hello I'm "AI" Your New _________________
Dr. Tathagat Varma
 
PDF
Understanding The True Cost of DynamoDB Webinar
ScyllaDB
 
PPTX
Enabling the Digital Artisan – keynote at ICOCI 2025
Alan Dix
 
PDF
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PPTX
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Pitch ...
Michele Kryston
 
PDF
Next Generation AI: Anticipatory Intelligence, Forecasting Inflection Points ...
dleka294658677
 
PDF
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
PPTX
Wondershare Filmora Crack Free Download 2025
josanj305
 
PDF
How to Comply With Saudi Arabia’s National Cybersecurity Regulations.pdf
Bluechip Advanced Technologies
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
CapCut Pro PC Crack Latest Version Free Free
josanj305
 
Governing Geospatial Data at Scale: Optimizing ArcGIS Online with FME in Envi...
Safe Software
 
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
Pipeline Industry IoT - Real Time Data Monitoring
Safe Software
 
5 Things to Consider When Deploying AI in Your Enterprise
Safe Software
 
Quantum Threats Are Closer Than You Think – Act Now to Stay Secure
WSO2
 
Darley - FIRST Copenhagen Lightning Talk (2025-06-26) Epochalypse 2038 - Time...
treyka
 
Deploy Faster, Run Smarter: Learn Containers with QNAP
QNAP Marketing
 
🚀 Let’s Build Our First Slack Workflow! 🔧.pdf
SanjeetMishra29
 
Hello I'm "AI" Your New _________________
Dr. Tathagat Varma
 
Understanding The True Cost of DynamoDB Webinar
ScyllaDB
 
Enabling the Digital Artisan – keynote at ICOCI 2025
Alan Dix
 
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Pitch ...
Michele Kryston
 
Next Generation AI: Anticipatory Intelligence, Forecasting Inflection Points ...
dleka294658677
 
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
Wondershare Filmora Crack Free Download 2025
josanj305
 
How to Comply With Saudi Arabia’s National Cybersecurity Regulations.pdf
Bluechip Advanced Technologies
 

Monitoring Cloud Native Applications with Prometheus