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

Post on 10-Aug-2015

82 Views

Category:

Technology

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

What is your application doing right now?

Matthias Grüter@mattgruter

It will happen to you!

Nagios

Monit

Consul

Pingdom

Munin

Curl

InfluxDB

Bosun

Graphite

Prometheus

Dashing

JMX

Riemann

Librato

Codahale Metrics

Collectd

...

Nagios

Monit

Consul

Pingdom

Munin

Curl

InfluxDB

Bosun

Graphite

PrometheusDashing

JMX

Riemann

Librato

Codahale Metrics

Collectd

...

Enter Prometheus

promotheus.ioby SoundCloud

Client Libraries: Java, Ruby, Go, Python, Bash, Node…

Exporters: Docker, Mesos, AWS CloudWatch, JMX, StatsD

Out-of-the-Box: etcd, cAdvisor, Kubernetes

Pushgateway

Scrape

Queryhttp_requests_total

http_requests_total{env=”prod”}

http_requests_total{name=~”worker”}

job: { name: "container-exporter" scrape_interval: "5s" target_group: { target: "http://exporter:9104/metrics" }}

prometheus.conf

[...]

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

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

Qubit Coins

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

static final Gauge numberOfCoins = Gauge.build()

.name("coins")

.help("Number of coins").register();

// …

numberOfCoins.set(42);

Java

● Gauges

● Summary

● Counter

● Histogram

top related