what is your application doing right now? an introduction to prometheus

21
What is your application doing right now? Matthias Grüter @mattgruter

Upload: matthias-grueter

Post on 10-Aug-2015

82 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: What is your application doing right now? An introduction to Prometheus

What is your application doing right now?

Matthias Grüter@mattgruter

Page 2: What is your application doing right now? An introduction to Prometheus
Page 3: What is your application doing right now? An introduction to Prometheus

It will happen to you!

Page 4: What is your application doing right now? An introduction to Prometheus

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

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

Enter Prometheus

promotheus.ioby SoundCloud

Page 7: What is your application doing right now? An introduction to Prometheus

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

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
Page 10: What is your application doing right now? An introduction to Prometheus

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
Page 12: What is your application doing right now? An introduction to Prometheus
Page 13: What is your application doing right now? An introduction to Prometheus

[...]

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

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
Page 16: What is your application doing right now? An introduction to Prometheus

Qubit Coins

Page 17: What is your application doing right now? An introduction to Prometheus
Page 18: What is your application doing right now? An introduction to Prometheus
Page 19: What is your application doing right now? An introduction to Prometheus

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

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