what is your application doing right now? an introduction to prometheus
TRANSCRIPT
![Page 1: What is your application doing right now? An introduction to Prometheus](https://reader034.vdocuments.net/reader034/viewer/2022042716/55c7c899bb61ebbe488b4600/html5/thumbnails/1.jpg)
What is your application doing right now?
Matthias Grüter@mattgruter
![Page 2: What is your application doing right now? An introduction to Prometheus](https://reader034.vdocuments.net/reader034/viewer/2022042716/55c7c899bb61ebbe488b4600/html5/thumbnails/2.jpg)
![Page 3: What is your application doing right now? An introduction to Prometheus](https://reader034.vdocuments.net/reader034/viewer/2022042716/55c7c899bb61ebbe488b4600/html5/thumbnails/3.jpg)
It will happen to you!
![Page 4: What is your application doing right now? An introduction to Prometheus](https://reader034.vdocuments.net/reader034/viewer/2022042716/55c7c899bb61ebbe488b4600/html5/thumbnails/4.jpg)
Nagios
Monit
Consul
Pingdom
Munin
Curl
InfluxDB
Bosun
Graphite
Prometheus
Dashing
JMX
Riemann
Librato
Codahale Metrics
Collectd
...
![Page 5: What is your application doing right now? An introduction to Prometheus](https://reader034.vdocuments.net/reader034/viewer/2022042716/55c7c899bb61ebbe488b4600/html5/thumbnails/5.jpg)
Nagios
Monit
Consul
Pingdom
Munin
Curl
InfluxDB
Bosun
Graphite
PrometheusDashing
JMX
Riemann
Librato
Codahale Metrics
Collectd
...
![Page 6: What is your application doing right now? An introduction to Prometheus](https://reader034.vdocuments.net/reader034/viewer/2022042716/55c7c899bb61ebbe488b4600/html5/thumbnails/6.jpg)
Enter Prometheus
promotheus.ioby SoundCloud
![Page 7: What is your application doing right now? An introduction to Prometheus](https://reader034.vdocuments.net/reader034/viewer/2022042716/55c7c899bb61ebbe488b4600/html5/thumbnails/7.jpg)
Client Libraries: Java, Ruby, Go, Python, Bash, Node…
Exporters: Docker, Mesos, AWS CloudWatch, JMX, StatsD
Out-of-the-Box: etcd, cAdvisor, Kubernetes
Pushgateway
Scrape
![Page 8: What is your application doing right now? An introduction to Prometheus](https://reader034.vdocuments.net/reader034/viewer/2022042716/55c7c899bb61ebbe488b4600/html5/thumbnails/8.jpg)
Queryhttp_requests_total
http_requests_total{env=”prod”}
http_requests_total{name=~”worker”}
![Page 9: What is your application doing right now? An introduction to Prometheus](https://reader034.vdocuments.net/reader034/viewer/2022042716/55c7c899bb61ebbe488b4600/html5/thumbnails/9.jpg)
![Page 10: What is your application doing right now? An introduction to Prometheus](https://reader034.vdocuments.net/reader034/viewer/2022042716/55c7c899bb61ebbe488b4600/html5/thumbnails/10.jpg)
job: { name: "container-exporter" scrape_interval: "5s" target_group: { target: "http://exporter:9104/metrics" }}
prometheus.conf
![Page 11: What is your application doing right now? An introduction to Prometheus](https://reader034.vdocuments.net/reader034/viewer/2022042716/55c7c899bb61ebbe488b4600/html5/thumbnails/11.jpg)
![Page 12: What is your application doing right now? An introduction to Prometheus](https://reader034.vdocuments.net/reader034/viewer/2022042716/55c7c899bb61ebbe488b4600/html5/thumbnails/12.jpg)
![Page 13: What is your application doing right now? An introduction to Prometheus](https://reader034.vdocuments.net/reader034/viewer/2022042716/55c7c899bb61ebbe488b4600/html5/thumbnails/13.jpg)
[...]
rule_file: "/etc/prometheus/prometheus.rules"
prometheus.conf
ALERT InstanceDown IF up == 0 FOR 5m WITH {} SUMMARY "Instance {{$labels.instance}} down" DESCRIPTION "{{$labels.instance}} has been down for more than 5 minutes."
prometheus.rules
![Page 14: What is your application doing right now? An introduction to Prometheus](https://reader034.vdocuments.net/reader034/viewer/2022042716/55c7c899bb61ebbe488b4600/html5/thumbnails/14.jpg)
notification_config { name: "alerts" slack_config { webhook_url: <URL> send_resolved: true }}
aggregation_rule { repeat_rate_seconds: 300 notification_config_name: "alert"}
Prometheus Alert Manager
![Page 15: What is your application doing right now? An introduction to Prometheus](https://reader034.vdocuments.net/reader034/viewer/2022042716/55c7c899bb61ebbe488b4600/html5/thumbnails/15.jpg)
![Page 16: What is your application doing right now? An introduction to Prometheus](https://reader034.vdocuments.net/reader034/viewer/2022042716/55c7c899bb61ebbe488b4600/html5/thumbnails/16.jpg)
Qubit Coins
![Page 17: What is your application doing right now? An introduction to Prometheus](https://reader034.vdocuments.net/reader034/viewer/2022042716/55c7c899bb61ebbe488b4600/html5/thumbnails/17.jpg)
![Page 18: What is your application doing right now? An introduction to Prometheus](https://reader034.vdocuments.net/reader034/viewer/2022042716/55c7c899bb61ebbe488b4600/html5/thumbnails/18.jpg)
![Page 19: What is your application doing right now? An introduction to Prometheus](https://reader034.vdocuments.net/reader034/viewer/2022042716/55c7c899bb61ebbe488b4600/html5/thumbnails/19.jpg)
job: { name: "balance" scrape_interval: "5s" target_group: { labels: { label: { name: "zone" value: "eu-central-1" } label: { name: "env" value: "prod" } } target: "http://webapp:8080/metrics" }}
prometheus.conf
![Page 20: What is your application doing right now? An introduction to Prometheus](https://reader034.vdocuments.net/reader034/viewer/2022042716/55c7c899bb61ebbe488b4600/html5/thumbnails/20.jpg)
static final Gauge numberOfCoins = Gauge.build()
.name("coins")
.help("Number of coins").register();
// …
numberOfCoins.set(42);
Java
● Gauges
● Summary
● Counter
● Histogram
![Page 21: What is your application doing right now? An introduction to Prometheus](https://reader034.vdocuments.net/reader034/viewer/2022042716/55c7c899bb61ebbe488b4600/html5/thumbnails/21.jpg)