Slide 1

Slide 1 text

INFLUXDB

Slide 2

Slide 2 text

TIME SERIES DATABASE

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

USE CASES

Slide 5

Slide 5 text

DATA MODEL

Slide 6

Slide 6 text

▸ String ▸ Integer ▸ Floats ▸ Boolean

Slide 7

Slide 7 text

influxd -config /usr/local/etc/influxdb.conf

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

QUERY LANGUAGE

Slide 10

Slide 10 text

SELECT COUNT(duration) as count_duration, MIN(duration) as min, MAX(duration) as max, MEAN(duration) as MEAN FROM events WHERE time > now() - 1h GROUP BY time(30s)

Slide 11

Slide 11 text

INSERT cpu_load,server_name=gilbert value=2

Slide 12

Slide 12 text

curl -i -XPOST 'http://localhost:8086/write?db=mydb' --data-binary 'cpu_load,server_name=gilbert value=2'

Slide 13

Slide 13 text

RETENTION

Slide 14

Slide 14 text

CREATE RETENTION POLICY two_hours ON food_data DURATION 2h REPLICATION 1 DEFAULT

Slide 15

Slide 15 text

DOWNSAMPLING

Slide 16

Slide 16 text

CREATE CONTINUOUS QUERY cq_30m ON food_data BEGIN SELECT mean(temperature) AS mean_temperature, mean(delivery_time) AS mean_delivery_time INTO food_data."default".downsampled_orders FROM orders GROUP BY time(30m) END

Slide 17

Slide 17 text

TELEGRAF

Slide 18

Slide 18 text

INPUT PLUGINS aerospike, apache, bcache, couchdb, disque, dns query time, docker, dovecot, elasticsearch, exec, haproxy, httpjson, influxdb, jolokia, leofs, lustre2, mailchimp, memcached, mesos, mongodb, mysql, net_response, nginx, nsq, phpfpm, phusion passenger, ping, postgresql, powerdns, procstat, prometheus, puppetagent, rabbitmq, raindrops, redis, rethinkdb, riak, sensors, snmp, sql server, twemproxy, zfs, zookeeper, win_perf_counters, system, cpu, mem, net, netstat, disk, diskio, swap, statsd, mqtt_consumer, kafka_consumer, nats_consumer, github_webhooks

Slide 19

Slide 19 text

OUTPUT PLUGINS influxdb, amon, amqp, aws kinesis, aws cloudwatch, datadog, graphite, kafka, librato, mqtt, nsq, opentsdb, prometheus, riemann

Slide 20

Slide 20 text

telegraf -sample-config -input-filter cpu -output-filter influxdb > telegraf.conf

Slide 21

Slide 21 text

[[outputs.influxdb]] urls = ["http://localhost:8086"] database = "telegraf" precision = "s"

Slide 22

Slide 22 text

[[inputs.cpu]] percpu = true totalcpu = true drop = ["time_*"]

Slide 23

Slide 23 text

telegraf -config telegraf.conf

Slide 24

Slide 24 text

CHRONOGRAF

Slide 25

Slide 25 text

chronograf

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

No content

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

No content

Slide 32

Slide 32 text

GitLab Performance Monitoring: a monitoring system using InfluxDB [...] then visualized using Grafana — Gitlab Performance Blogpost

Slide 33

Slide 33 text

KAPACITOR

Slide 34

Slide 34 text

kapacitord config > kapacitor.conf

Slide 35

Slide 35 text

kapacitord -config kapacitor.conf

Slide 36

Slide 36 text

CPU_ALERT.TICK stream // Select just the cpu measurement .from().measurement('cpu') .alert() .crit(lambda: "usage_idle" < 70) // Whenever we get an alert write it to a file. .log('/tmp/alerts.log')

Slide 37

Slide 37 text

kapacitor define \ -name cpu_alert \ -type stream \ -tick cpu_alert.tick \ -dbrp kapacitor_example.default

Slide 38

Slide 38 text

kapacitor enable cpu_alert

Slide 39

Slide 39 text

stream .from().measurement('cpu') .alert() // Compare values to running mean and standard deviation .crit(lambda: sigma("usage_idle") > 3) .log('/tmp/alerts.log')

Slide 40

Slide 40 text

stream .from().measurement('cpu_usage_idle') .groupBy('host') .window().period(1m).every(1m) .mapReduce(influxql.mean('value')) .eval(lambda: 100.0 - "mean").as('used') .alert() .message('{{ .Level}}: {{ .Name }}/{{ index .Tags "host" }} has ' + 'high cpu usage: {{ index .Fields "used" }}') .warn(lambda: "used" > 70.0) .crit(lambda: "used" > 85.0) .slack().channel('#alerts') .pagerDuty()

Slide 41

Slide 41 text

No content

Slide 42

Slide 42 text

Bodo Tasche @bitboxer — CTO bitcrowd

Slide 43

Slide 43 text

CREDITS * Time Series Image CC-BY-2.0 Ian Sane https://www.flickr.com/photos/31246066@N04/5261957053