Upgrade to Pro — share decks privately, control downloads, hide ads and more …

InfluxDB + Prometheus

Paul Dix
August 18, 2017

InfluxDB + Prometheus

Slides from my Promcon2017 talk on integrating InfluxDB and Prometheus.

Paul Dix

August 18, 2017
Tweet

More Decks by Paul Dix

Other Decks in Programming

Transcript

  1. • OSS - MIT License • Written in Go •

    SQL-ish query language • Time Series Merge Tree storage engine & inverted index • Commercial Enterprise - HA + Scale Out Clustering
  2. Example Query select percentile(90, value) from cpu where time >

    now() - 12h and “region” = ‘west’ group by time(10m), host
  3. Process: • OSS - MIT License • Written in Go

    • Process, monitor, alert, act/execute • TICK script • Streaming & Batch • Store data back into InfluxDB • User Defined Functions • Service Discovery & Pull
  4. Collect: • OSS - MIT License • Written in Go

    • Agent deployed across infrastructure • Input plugins - system, docker, postgres, mysql, cassandra, elastic, hadoop, redis, nginx, apache, etc. • Output plugins - InfluxDB, Graphite, Kafka, etc.
  5. Client Libraries • Supported • Go • Java • Python

    • Ruby • Community • C++ • C# • Node.js • PHP • etc…
  6. Prometheus Config # Remote write configuration (for Graphite, OpenTSDB, or

    InfluxDB). remote_write: - url: "http://localhost:9201/write" # Remote read configuration (for InfluxDB only at the moment). remote_read: - url: "http://localhost:9201/read"
  7. Reads message Query { int64 start_timestamp_ms = 1; int64 end_timestamp_ms

    = 2; repeated LabelMatcher matchers = 3; } enum MatchType { EQUAL = 0; NOT_EQUAL = 1; REGEX_MATCH = 2; REGEX_NO_MATCH = 3; } message LabelMatcher { MatchType type = 1; string name = 2; string value = 3; }
  8. Like Prometheus message Sample { double value = 1; int64

    timestamp_ms = 2; } message LabelPair { string name = 1; string value = 2; } message TimeSeries { repeated LabelPair labels = 1; // Sorted by time, oldest sample first. repeated Sample samples = 2; }
  9. DAG { "operations": [ { "id": "select", "kind": "select", "spec":

    { "database": "mydb" } }, { "id": "range", "kind": "range", "spec": { "start": "-4h", "stop": "now" } }, { "id": "sum", "kind": "sum" } ], "edges": [ { "parent": "select", "child": "range" }, { "parent": "range", "child": "sum" } ] } }