Slide 1

Slide 1 text

Organizing Metrics: Hierarchical or Tagged? Paul Dix CEO of InfluxDB paul@influxdb.com @pauldix

Slide 2

Slide 2 text

Organizing Metrics?

Slide 3

Slide 3 text

Necessary when you have thousands, tens, hundreds, or millions

Slide 4

Slide 4 text

Discovery What metrics do I have?

Slide 5

Slide 5 text

Merging and Aggregating Combine these and give me a result

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

Hierarchy

Slide 8

Slide 8 text

Artifact of Whisper’s implementation

Slide 9

Slide 9 text

Series are round robin files on disk organized in directories (hierarchy)

Slide 10

Slide 10 text

Meta data encoded in series name

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

Tagged?

Slide 13

Slide 13 text

OpenTSDB Metrics mysql.bytes_received \ ! 1287333217 327810227706 \ ! schema=foo host=db1

Slide 14

Slide 14 text

mysql.bytes_received \ ! 1287333217 327810227706 \ ! schema=foo host=db1 Name

Slide 15

Slide 15 text

mysql.bytes_received \ ! 1287333217 327810227706 \ ! schema=foo host=db1 Tags

Slide 16

Slide 16 text

Single Level Hierarchy + Tags

Slide 17

Slide 17 text

Hierarchy: names

Slide 18

Slide 18 text

Tags

Slide 19

Slide 19 text

Meta data encoded in series name and tags

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

Data [ { "name": "cpu", "columns": ["time", "value", "host"], "points": [ [1395168540, 56.7, "foo.influxdb.com"], [1395168540, 43.9, "bar.influxdb.com"] ] } ]

Slide 22

Slide 22 text

Flat

Slide 23

Slide 23 text

list series

Slide 24

Slide 24 text

list series /.*dc\.USWest/

Slide 25

Slide 25 text

select percentile(90, value) from merge(/cpu_wait.*dc\.USWest.*/) group by time(10m) where time > now() - 4h

Slide 26

Slide 26 text

Doesn’t scale well to millions of series!

Slide 27

Slide 27 text

select percentile(90, value) from cpu_wait group by time(10m) where time > now() - 4h and dataCenter = ‘USWest’

Slide 28

Slide 28 text

Doesn’t scale well to thousands of hosts!

Slide 29

Slide 29 text

We have to pick a method

Slide 30

Slide 30 text

Hierarchy vs. Tags?

Slide 31

Slide 31 text

Religious Debate?

Slide 32

Slide 32 text

Emacs vs. Vim

Slide 33

Slide 33 text

i.e. debates that can’t be solved

Slide 34

Slide 34 text

Scientific Debate?

Slide 35

Slide 35 text

acceleration due to gravity

Slide 36

Slide 36 text

Things that have a clear testable answer

Slide 37

Slide 37 text

Hierarchy vs. Tags a bit of both?

Slide 38

Slide 38 text

Tags are vastly superior to hierarchies

Slide 39

Slide 39 text

What questions can you ask?

Slide 40

Slide 40 text

What sensors do I have? CPU Idle, network in bytes, memory used, redis key count, etc.

Slide 41

Slide 41 text

OpenTSDB names

Slide 42

Slide 42 text

cpu_wait network_in_bytes network_out_bytes …

Slide 43

Slide 43 text

Graphite traverse hierarchy

Slide 44

Slide 44 text

app.foo.dc.uswest.host.servera.cpu_wait app.foo.dc.uswest.host.servera.network_in_bytes app.foo.dc.uswest.host.servera.network_out_bytes …

Slide 45

Slide 45 text

app.foo.dc.uswest.host.servera.cpu_wait app.foo.dc.uswest.host.servera.network_in_bytes app.foo.dc.uswest.host.servera.network_out_bytes … Sensor at the end

Slide 46

Slide 46 text

What values do I have on dimension X? hosts, data centers, services, applications

Slide 47

Slide 47 text

OpenTSDB traverse one level and tags

Slide 48

Slide 48 text

redis_connections response_times.90 …

Slide 49

Slide 49 text

app.foo.dc.uswest.host.servera.cpu_wait app.foo.dc.uswest.host.servera.network_in_bytes app.foo.dc.uswest.host.servera.network_out_bytes …

Slide 50

Slide 50 text

Show me all time series for X dashboard for MySQL, dashboard for host

Slide 51

Slide 51 text

Computations percentiles across sets of hosts, data centers, services

Slide 52

Slide 52 text

Pure tagging

Slide 53

Slide 53 text

{! "Name": "CPU Wait",! "Host": "serverA.influxdb.com",! "Data Center": "US West"! }!

Slide 54

Slide 54 text

{! "Name": "CPU Wait",! "Host": "serverA.influxdb.com",! "Data Center": "US West"! }! Readable Names!

Slide 55

Slide 55 text

{! "Name": “Redis Connections",! "Host": "serverA.influxdb.com",! "Data Center": "US West"! }! Queryable! Which hosts have redis connections?

Slide 56

Slide 56 text

{! "Name": "Erorrs",! "Host": "serverA.influxdb.com",! "Data Center": "US West",! "Application": "My super rad app"! }! Queryable! What names (sensors) do I have for My super rad app?

Slide 57

Slide 57 text

Queryable! What names (sensors) do I have at 1h precision? {! "Name": "Erorrs",! "Host": "serverA.influxdb.com",! "Data Center": "US West",! "Application": "My super rad app",! "Precision": "1h"! }!

Slide 58

Slide 58 text

Computation select percentile(90)! from ("Name": "CPU Wait", "Data Center": "US West")! group by time(10m)! where time > now() - 6h!

Slide 59

Slide 59 text

Hierarchy on the fly What tags co-occur with a given tag?

Slide 60

Slide 60 text

Faceted Serch

Slide 61

Slide 61 text

Given “Host” and “Data Center” what other tags are there?

Slide 62

Slide 62 text

"Data Center" = "US West" ! "Name": 2153 "Host": 256 "Service": 20 "Precision": 10 "Application": 4

Slide 63

Slide 63 text

Need to be able to add dimensions/tags

Slide 64

Slide 64 text

Need to support a large number of tags Both for a single data point and over all

Slide 65

Slide 65 text

Pure tagging gives you much more power than hierarchies

Slide 66

Slide 66 text

Can be combinatorial OpenTSDB hot spots, etc

Slide 67

Slide 67 text

Need to be able to define indexing behavior for tags

Slide 68

Slide 68 text

Can it work?

Slide 69

Slide 69 text

This is part of what InfluxDB is working on Feedback welcome! http://influxdb.com/community.html @InfluxDB