Prometheus
By Kasper Nissen
@phennex
Monitoring with
Hi!
My name is Kasper
@phennex
What am I going to cover?
@phennex
+
+
+
Monitoring - why and what?
Prometheus - an introduction
Short demo
DEMO Part 1
@phennex
https://github.com/kaspernissen/automation_night_demo
Why monitor?
@phennex
What to monitor?
@phennex
Analyzing long-term trends
@phennex
What to monitor?
@phennex
Comparing over time or experiment groups
@phennex
What to monitor?
@phennex
Alerting
@phennex
What to monitor?
@phennex
Building dashboards
@phennex
@phennex
Conducting ad hoc retrospective analysis
@phennex
@phennex
Purpose:
What is broken?
and why?
What to monitor?
@phennex
What to monitor?
@phennex
Hosts
CPU, Memory, I/O, Network, Filesystem
@phennex
What to monitor?
@phennex
Containers
CPU, Memory, I/O, Restarts, Throttling
@phennex
What to monitor?
@phennex
Applications
Throughput, Latency
@phennex
The Four Golden Signals
@phennex
Site Reliability Engineering - How Google Runs Production Systems
What to monitor?
@phennex
Latency
The time it takes to service a request.
Important to distinguish between the latency of
successful and failed requests.
@phennex
What to monitor?
@phennex
Traffic
A measure of how much demand is being placed on your system,
measured in a high-level system-specific metric.
@phennex
What to monitor?
@phennex
Errors
The rate of requests that fail, either explicitly (e.g. HTTP 500s),
implicitly (HTTP 200 success with wrong content)
@phennex
What to monitor?
@phennex
Saturation
How “full” your service is. A measure of your system fraction,
emphasizing the resources that are most constrained
(e.g. in a memory-constrained system, show memory)
@phennex
Prometheus
@phennex
What to monitor?
@phennex
Prometheus
Prometheus was presented to be the protector and benefactor of mankind.
@phennex
Prometheus
@phennex
+
+
+
+
Heavily inspired by Borgmon
Built by ex-Googlers at SoundCloud
Pull-based (scrapes at regular intervals)
Many integration possibilities
The 2nd project in CNCF
What is Prometheus?
@phennex
+
+
+
+
+
+
Monitoring system and Timeseries Database
Instrumentation
Metrics collection and storage
Querying
Alerting
Dashboard / Graphing / Trending
Source: https://promcon.io/2016-berlin/talks/prometheus-design-and-philosophy/
Prometheus focus on
@phennex
+
+
Operational systems monitoring
Dynamic cloud environments
Source: https://promcon.io/2016-berlin/talks/prometheus-design-and-philosophy/
Prometheus does not do
@phennex
+
+
+
+
+
+
Raw log / event collection (use ELK stack)
Request tracing (use opentracing.io)
“Magic” anomaly detection
Durable long-term storage
Automatic horizontal scaling
User / auth management
Prometheus Architecture
@phennex
Long-lived jobs
Pushgateway AlertmanagerShort-lived jobs
Grafana
The Data model
@phennex
<metric name>{<label name>=<label value>, …}
api_http_requests_total{method="POST", handler="/messages"}
Notation:
Example:
Every time series is uniquely identified by its metric name and a set of key-
value pairs, also known as labels.
How to get metrics?
@phennex
Directly
instrumented
Not Directly
instrumented
Exporter
Source: https://promcon.io/2016-berlin/talks/so-you-want-to-write-an-exporter/
@phennex
Directly instrumented software
@phennex
cAdvisor
Doorman
Etcd
Kubernetes-Mesos
Kubernetes
RobustIRC
SkyDNS
Weave Flux
Official Prometheus Exporters
@phennex
Node/system metrics exporter
AWS CloudWatch exporter
Blackbox exporter
Collectd exporter
Consul exporter
Graphite exporter
HAProxy exporter
InfluxDB exporter
JMX exporter
Memcached exporter
Mesos task exporter
MySQL server exporter
SNMP exporter
StatsD exporter
3rd party exporters
@phennex
Databases
Aerospike exporter
ClickHouse exporter
CouchDB exporter
MongoDB exporter
PgBouncer exporter
PostgreSQL exporter
ProxySQL exporter
Redis exporter
RethinkDB exporter
SQL query result set metrics exporter
3rd party exporters
@phennex
Hardware related
apcupsd exporter
IoT Edison exporter
IPMI exporter
knxd exporter
Ubiquiti UniFi exporter
Messaging systems
NATS exporter
NSQ exporter
RabbitMQ exporter
RabbitMQ Management Plugin exporter
Mirth Connect exporter
3rd party exporters
@phennex
Storage
Ceph exporter
ScaleIO exporter
HTTP
Apache exporter
Nginx metric library
Passenger exporter
Varnish exporter
WebDriver exporter
APIs
Docker Hub exporter
GitHub exporter
OpenWeatherMap exporter
Rancher exporter
Speedtest.net exporter
Logging
Google's mtail log data extractor
Grok exporter
Other monitoring systems
Cloud Foundry Firehose exporter
scollector exporter
Heka dashboard exporter
Heka exporter
Munin exporter
New Relic exporter
Miscellaneous
BIG-IP exporter
BIND exporter
BOSH exporter
Jenkins exporter
Meteor JS web framework exporter
Minecraft exporter module
PowerDNS exporter
rTorrent exporter
SMTP/Maildir MDA blackbox prober
Xen exporter
PromQL
@phennex
+
+
+
Non-SQL Query Language
Better for metrics computation
Only does reads
Source: https://promcon.io/2016-berlin/talks/prometheus-design-and-philosophy/
PromQL - Operators
@phennex
+ (addition) == (equal)
- (substraction) != (not-equal)
* (multiplication) > (greater-than)
/ (division) < (less-than)
% (modulo) >= (greater-or-equal)
^ (exponentiation) <= (less-or-equal)
and (intersection) or (union)
unless (complement)
… and vector matching
Source: https://prometheus.io
PromQL - Aggregation Operators
@phennex
sum stddev bottomk
min stdvar topk
max count quantile
avg count_values
Source: https://prometheus.io
PromQL - Examples
@phennex
rate(api_http_requests_total[5m])
errors{job=“foo”} / total{job=“foo”}
Source: https://promcon.io/2016-berlin/talks/prometheus-design-and-philosophy/
DEMO Part 2
@phennex
https://github.com/kaspernissen/automation_night_demo
Alerting
@phennex
What to monitor?
@phennex
Symptom-based alerting
Be proactive
@phennex
What to monitor?
@phennex
Prevent alert fatigue
- Use ticketing systems (Avoid email spam)
- Warning are tasks like new features
@phennex
What to monitor?
@phennex
Provide runbooks
- Keep them concise
- Explanation, hints, links
- Dynamic - include recent observations
@phennex
What to monitor?
@phennex
Practice outages
“Firedrills”, “Gamedays” - repeat regularly
@phennex
Monitoring with prometheus
@phennex
Start being proactive.
Dont be firefighters.
… and remember …
@phennex
Hope is NOT a strategy
@phennex
Source: Site Reliability Engineering, How Google Runs Production Systems (2016), B. Beyer et al.
If you wanna know more…
@phennex
- prometheus.io
- promcon.io
- The Site Reliability Engineering book
- Podcasts:
- https://dev.to/sedaily/prometheus-monitoring-with-brian-brazil
- https://dev.to/sedaily/the-art-of-monitoring-with-james-turnbull 

(prefers push based opposite prometheus)
- https://dev.to/sedaily/prometheus-with-julius-volz
@phennex
The 3rd project in CNCF
opentracing.io
Thank you!
@phennex
kaspernissen@gmail.com
@phennex

More Related Content

PDF
Infrastructure & System Monitoring using Prometheus
PDF
Prometheus Overview
ODP
Monitoring With Prometheus
PDF
PromQL Deep Dive - The Prometheus Query Language
PPTX
Apache Kafka Best Practices
PDF
Convolutional Neural Networks (CNN)
PDF
Monitoring Kubernetes with Prometheus
ODP
Introduction to Ansible
Infrastructure & System Monitoring using Prometheus
Prometheus Overview
Monitoring With Prometheus
PromQL Deep Dive - The Prometheus Query Language
Apache Kafka Best Practices
Convolutional Neural Networks (CNN)
Monitoring Kubernetes with Prometheus
Introduction to Ansible

What's hot (20)

PPT
Monitoring using Prometheus and Grafana
PDF
How to monitor your micro-service with Prometheus?
PPTX
Prometheus and Grafana
PPTX
MeetUp Monitoring with Prometheus and Grafana (September 2018)
PPTX
Prometheus design and philosophy
PDF
Getting Started Monitoring with Prometheus and Grafana
PPTX
Prometheus - Intro, CNCF, TSDB,PromQL,Grafana
PDF
Server monitoring using grafana and prometheus
PDF
Prometheus - basics
PDF
Grafana Loki: like Prometheus, but for Logs
PPTX
An Introduction to Prometheus (GrafanaCon 2016)
PPTX
Monitoring With Prometheus
PPTX
Terraform
PDF
Observability
PDF
Cloud Monitoring tool Grafana
PDF
Kubernetes Deployment Strategies
PPTX
OpenTelemetry For Architects
PDF
Improve Monitoring and Observability for Kubernetes with OSS tools
PPTX
Introduction to CI/CD
PPTX
Grafana optimization for Prometheus
Monitoring using Prometheus and Grafana
How to monitor your micro-service with Prometheus?
Prometheus and Grafana
MeetUp Monitoring with Prometheus and Grafana (September 2018)
Prometheus design and philosophy
Getting Started Monitoring with Prometheus and Grafana
Prometheus - Intro, CNCF, TSDB,PromQL,Grafana
Server monitoring using grafana and prometheus
Prometheus - basics
Grafana Loki: like Prometheus, but for Logs
An Introduction to Prometheus (GrafanaCon 2016)
Monitoring With Prometheus
Terraform
Observability
Cloud Monitoring tool Grafana
Kubernetes Deployment Strategies
OpenTelemetry For Architects
Improve Monitoring and Observability for Kubernetes with OSS tools
Introduction to CI/CD
Grafana optimization for Prometheus
Ad

Viewers also liked (20)

PPTX
Counting with Prometheus (CloudNativeCon+Kubecon Europe 2017)
PDF
Microservices and Prometheus (Microservices NYC 2016)
PPTX
Monitoring at-lazada
PDF
Cloud Monitoring with Prometheus
PDF
What is your application doing right now? An introduction to Prometheus
PDF
Computer monitoring with the Open Monitoring Distribution
PDF
How to build a Distributed Serverless Polyglot Microservices IoT Platform us...
PDF
Data Visualization on the Tech Side
PDF
Doç. Dr. Mehmet Ali GÜLÇELİK
PPTX
Engineering Development & Design Capstone Project _ RICE-Optimized Knee Brace
DOCX
Alan Johnson Resume
PDF
Business quiz
PDF
Realtime Recommender with Redis: Hands on
PDF
Docker Swarm Meetup (15min lightning)
PDF
Regex Considered Harmful: Use Rosie Pattern Language Instead
PPTX
Incident Response in the wake of Dear CEO
PPTX
Plumbing tips
PDF
Urban legends - PJ Hagerty - Codemotion Amsterdam 2017
PPTX
Ufrs varlıklar grubu standartları i̇nceleme raporu sunumu
PDF
SpringIO 2016 - Spring Cloud MicroServices, a journey inside a financial entity
Counting with Prometheus (CloudNativeCon+Kubecon Europe 2017)
Microservices and Prometheus (Microservices NYC 2016)
Monitoring at-lazada
Cloud Monitoring with Prometheus
What is your application doing right now? An introduction to Prometheus
Computer monitoring with the Open Monitoring Distribution
How to build a Distributed Serverless Polyglot Microservices IoT Platform us...
Data Visualization on the Tech Side
Doç. Dr. Mehmet Ali GÜLÇELİK
Engineering Development & Design Capstone Project _ RICE-Optimized Knee Brace
Alan Johnson Resume
Business quiz
Realtime Recommender with Redis: Hands on
Docker Swarm Meetup (15min lightning)
Regex Considered Harmful: Use Rosie Pattern Language Instead
Incident Response in the wake of Dear CEO
Plumbing tips
Urban legends - PJ Hagerty - Codemotion Amsterdam 2017
Ufrs varlıklar grubu standartları i̇nceleme raporu sunumu
SpringIO 2016 - Spring Cloud MicroServices, a journey inside a financial entity
Ad

Similar to Monitoring with prometheus (20)

PDF
Container orchestration on_aws
PDF
Introduction of eBPF - 時下最夯的Linux Technology
PDF
TechWiseTV Workshop: Catalyst Switching Programmability
PPTX
PHP North-East - Automated Deployment
PPTX
Automated Deployment
PPTX
Openstack win final
PDF
Frontend testing of (legacy) websites
PDF
Release with confidence
PPTX
20091112 - Mars Jug - Apache Maven
PPTX
Observability-as-a-Service: When Platform Engineers meet SREs
PPTX
Phalcon 2 - PHP Brazil Conference
PPTX
Flink in action
PDF
Php Conference Brazil - Phalcon Giant Killer
DOCX
Dean Hagen
PPTX
OpenSouthCode 2016 - Accenture DevOps Platform 2016-05-07
PPTX
Practical Introduction To Linux
KEY
An introduction to Phing the PHP build system (PHPDay, May 2012)
ODP
Open Source Monitoring Tools Shootout
ODP
Monitoring shootout loadays
DOCX
Informix and PHP
Container orchestration on_aws
Introduction of eBPF - 時下最夯的Linux Technology
TechWiseTV Workshop: Catalyst Switching Programmability
PHP North-East - Automated Deployment
Automated Deployment
Openstack win final
Frontend testing of (legacy) websites
Release with confidence
20091112 - Mars Jug - Apache Maven
Observability-as-a-Service: When Platform Engineers meet SREs
Phalcon 2 - PHP Brazil Conference
Flink in action
Php Conference Brazil - Phalcon Giant Killer
Dean Hagen
OpenSouthCode 2016 - Accenture DevOps Platform 2016-05-07
Practical Introduction To Linux
An introduction to Phing the PHP build system (PHPDay, May 2012)
Open Source Monitoring Tools Shootout
Monitoring shootout loadays
Informix and PHP

More from Kasper Nissen (10)

PDF
GitOps - Operation By Pull Request
PDF
Should developers care about dockerfiles and kubernetes resources
PDF
Two Years In Production With Kubernetes - An Experience Report
PDF
Cloud Native CI/CD with GitOps
PDF
Cloud native aarhus #5
PDF
Kubernetes Kops - Automation Night
PDF
Lunar Way and the Cloud Native "stack"
PDF
IT Minds Mindblown Networking Event 2016
PDF
Google Cloud Platform and Kubernetes
PDF
Let's tak Productivity (Let's talk Apple #4)
GitOps - Operation By Pull Request
Should developers care about dockerfiles and kubernetes resources
Two Years In Production With Kubernetes - An Experience Report
Cloud Native CI/CD with GitOps
Cloud native aarhus #5
Kubernetes Kops - Automation Night
Lunar Way and the Cloud Native "stack"
IT Minds Mindblown Networking Event 2016
Google Cloud Platform and Kubernetes
Let's tak Productivity (Let's talk Apple #4)

Recently uploaded (20)

PDF
August Patch Tuesday
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PDF
WOOl fibre morphology and structure.pdf for textiles
PDF
Architecture types and enterprise applications.pdf
PDF
A comparative study of natural language inference in Swahili using monolingua...
PPTX
Modernising the Digital Integration Hub
PPT
What is a Computer? Input Devices /output devices
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PPTX
Web Crawler for Trend Tracking Gen Z Insights.pptx
PPTX
observCloud-Native Containerability and monitoring.pptx
PDF
A review of recent deep learning applications in wood surface defect identifi...
PDF
CloudStack 4.21: First Look Webinar slides
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PDF
STKI Israel Market Study 2025 version august
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
August Patch Tuesday
Univ-Connecticut-ChatGPT-Presentaion.pdf
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
A contest of sentiment analysis: k-nearest neighbor versus neural network
WOOl fibre morphology and structure.pdf for textiles
Architecture types and enterprise applications.pdf
A comparative study of natural language inference in Swahili using monolingua...
Modernising the Digital Integration Hub
What is a Computer? Input Devices /output devices
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
Web Crawler for Trend Tracking Gen Z Insights.pptx
observCloud-Native Containerability and monitoring.pptx
A review of recent deep learning applications in wood surface defect identifi...
CloudStack 4.21: First Look Webinar slides
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
STKI Israel Market Study 2025 version august
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf

Monitoring with prometheus