@rawkode david mckay @rawkode · v1.1.3 deployed cpu 12% ci passed ci started. @rawkode healthcheck...

102
@rawkode Good Afternoon David McKay @rawkode Developer Advocate @InfluxDB | #InfluxDB PHPUK 2020

Upload: others

Post on 17-Aug-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Good AfternoonDavid McKay@rawkode

Developer Advocate@InfluxDB | #InfluxDB

PHPUK 2020

Page 2: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Developer Advocateat InfluxData

@rawkode

🏴󠁧󠁢󠁳󠁣󠁴󠁿 Scottish

🐭 Has 9 Pets

💙 Esoteric Programming Languages

☸ Kubernetes Team

🤔 Stoic

David Mckay

Page 4: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

Introduction to Time Series

Page 5: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Before we begin …

Page 6: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Pop Quiz“Invented” When?

Page 7: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

EncodingFirst Used … ?First Used 410 BC

Page 8: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Encoding“Documented” in The Lives of the Noble Grecians and Romans, by Roman historian Plutarch.

Page 9: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Alcibiades suddenly raised the Athenian ensign in the admiral shop, and fell upon those galleys of the Peloponnesians …

Page 10: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

In the 14th century, things hadn’t actually advanced much more. The Black Book of Admiralty listed 2 signals: 1 flag or 2 flags

Encoding

Page 11: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

By the 15th century there were 15 flags, each with a single meaning.

Encoding

Page 12: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Finally, in the late 17th century; a French system existed (Mahé de la Bourdonnais) with 10 coloured flags, representing 0-9

Encoding

Page 13: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

ShardingFirst Used … ?First Used 150 BC

Page 14: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

ShardingFirst “documented” example was in ~150 AD, invented and described by Polybius.

Page 15: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

We take the alphabet and divide it into five parts, each consisting of five letters.

Page 16: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Page 17: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Page 18: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

History of Time Series

Page 19: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

The earliest form of a company which issued public shares was the case of the publicani during the Roman Republic.

The Romans Did It

Page 20: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Like modern joint-stock companies, the publicani were legal bodies independent of their members whose ownership was divided into shares, or partes. There is evidence that these shares were sold to public investors and traded in a type of over-the-counter market in the Forum, near the Temple of Castor and Pollux. The shares fluctuated in value, encouraging the activity of speculators, or quaestors.

Page 21: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

In 1602 … First IPO: Dutch East India Company

Page 22: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

In 1873 … First US IPO: Bank of North America

Page 23: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

In 1884 … What was the price of wheat?

Page 24: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

A Comparison of the Fluctuations in the Price of Wheat and in the Cotton and Silk Imports into Great Britain

First Documented Time Series

J. H. PoyntingJournal of the Statistical Society of LondonVol. 47, No. 1 (Mar., 1884), pp. 34-74

Page 25: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

What is all this?This is the first (or one of) paper that added the dimension of time to statistical mathematics

Page 26: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Most data is best understood in the dimension of time

@pauldix, CTO

Page 27: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

Introduction to Time Series

Page 28: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

What Will We Cover?

➔ Time Series Data➔ Time Series Databases➔ Getting to Know InfluxDB➔ Value of Time Series Data➔ Advancing Monitoring with Time Series

Page 29: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

Time Series DataWhat is it?

Page 30: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Time Series DataData with a timestamp

Page 31: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Healthcheck Failed

Mem100%

DB MigrationRun

Scotland Qualify for World Cup

Pod KilledBy OOM Pod Restarted Git

Commit

V1.1.3 Deployed CPU12% CI Passed CI Started

Page 32: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Healthcheck Failed

Mem100%

DB MigrationRun

Scotland Qualify for World Cup

Pod KilledBy OOM Pod Restarted Git

Commit

V1.1.3 Deployed CPU12% CI Passed CI Started

Page 33: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Healthcheck Failed

Mem100%

DB MigrationRun

Scotland Qualify for World Cup

Pod KilledBy OOM Pod Restarted Git

Commit

V1.1.3 Deployed CPU12% CI Passed CI Started

Page 34: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Healthcheck Failed

Mem100%

DB MigrationRun

Scotland Qualify for World Cup

Pod KilledBy OOM Pod Restarted Git

Commit

V1.1.3 Deployed CPU12% CI Passed CI Started

Page 35: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Healthcheck Failed

Mem100%

DB MigrationRun

Scotland Qualify for World Cup

Pod KilledBy OOM Pod Restarted Git

Commit

V1.1.3 Deployed CPU12% CI Passed CI Started

Page 36: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Healthcheck Failed

Mem100%

DB MigrationRun

Pod KilledBy OOM V1.1.3 Deployed

Time

Page 37: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM
Page 38: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

What is Time Series Data?

Page 39: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Irregular (Events)

➔ Unpredictable➔ Inconsistent Intervals

What is Time Series Data?

Regular (Metrics)

➔ Predictable➔ Evenly Distributed

Page 40: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Regular / Metrics★ CPU Usage★ Memory Usage★ Ping Time for Google.com★ Number of Processes

Page 41: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Irregular / Events★ User Clicked Login★ Authentication Failed★ CI Published v1.3.1★ Network Cable Unplugged

Page 42: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM
Page 43: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Metrics vs. EventsAll Metrics are an aggregation of events

Page 44: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Collecting Metrics & EventsWith Prometheus Exporters or Telegraf

Page 45: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Collecting Metrics & EventsInputs:➔ CloudWatch➔ Elasticsearch➔ Kafka➔ Jenkins➔ Kubernetes➔ Linux➔ Puppet➔ Windows➔ x509

Outputs:➔ CloudWatch➔ Kafka➔ DataDog➔ Elasticsearch➔ Graphite➔ Prometheus

Exporters:➔ Atlassian➔ Ceph➔ Consul➔ Kubernetes➔ Memcached➔ MySQL

Page 46: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM
Page 47: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Push AND Pull

Metrics are pulled at a regular interval

Consistent and reliable intervals

Events NEED to be pushed as they happen

Inconsistent intervals

Page 48: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Time Series DataUse Cases

Page 49: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

IoT / Sensor

➔ Thermostats➔ Electric Engines➔ Smart Things➔ GPS➔ Fitbits

Real Time Analytics

➔ Website Tracking

➔ Stock Prices➔ Currency

Exchange Rates

Use Cases for Time SeriesMonitoring

➔ Infrastructure➔ Applications➔ Third Party

Services

Page 50: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

Time Series DatabasesTSDB’s

Page 51: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Time Series databases are optimized for collecting, storing, retrieving, and processing of Time Series data.

Time Series Databases

Page 52: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

➔ High Write Frequency

➔ Reads are range scans

➔ TTL / Lifecycle Management

➔ Time Sensitive

Time Series Databases

Page 53: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM
Page 54: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

12%Are you in the 88%?

Page 55: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM
Page 56: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM
Page 57: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM
Page 58: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM
Page 59: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM
Page 60: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM
Page 61: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

13%It’s Not Too Late!

Page 62: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Page 63: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

DisclaimerMost of this isn’t unique to InfluxDB

Page 64: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

InfluxDBIntroductions

Page 65: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

InfluxDB➔ TSDB➔ Open-Source➔ FullStack (Telegraf,

InfluxDB, Chronograf, and Kapacitor)

➔ v2 …

Page 66: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

PointsAt any point in time, this value was N

Page 67: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

load,host=vm1 1m=6.32,5m=8.20,15m=9.55 123456789

Point● Series● Fields● Timestamp

Page 68: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

● load,host=vm1

● stock_price,market=NASDAQ,ticker=GOOG

● users,service=comments

Series● Name● Tag Keys● Tag Values

Page 69: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

stock_price,market=NASDAQ,ticker=GOOG

stock_price,market=NASDAQ,ticker=APPL

Series● Name● Tag Keys● Tag Values

Page 70: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Fields

➔ Not Indexed➔ Multiple Data Types

Tags & Fields

Tags

➔ Indexed➔ String Types

Page 71: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

Value of Time Series Data

Isn’t It Valuable Forever?

Page 72: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Resolution

The predictable interval at which we will collect our time series data

Page 73: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

The value of all time series data is directly correlated with the resolution that the data is available

Value of Time Series Data

Page 74: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

Cost of Time Series Data

Wait, Isn’t It Free?!

Page 75: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Examplecpu,machine=abc1 usage=1.66 timestamp

Page 76: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Resolution➔ 1 Measurement➔ 1 Series➔ 1s Resolution

86400 PointsPer Day

Page 77: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Resolution➔ 1 Measurement➔ 2 Series➔ 1s Resolution

172800 PointsPer Day

Page 78: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Resolution 4320000 PointsPer Day

➔ 5 Measurement➔ 10 Series➔ 1s Resolution

Page 79: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Nasdaq 285120000000

PointsPer Day

➔ 1 Measurement➔ 3300 Series➔ 1ms Resolution

Page 80: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Nasdaq 4752000 PointsPer Day

➔ 1 Measurement➔ 3300 Series➔ 1m Resolution

Page 81: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Nasdaq 79200 PointsPer Day

➔ 1 Measurement➔ 3300 Series➔ 1h Resolution

Page 82: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Nasdaq 13200 PointsPer Day

➔ 1 Measurement➔ 3300 Series➔ 6h Resolution

Page 83: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM
Page 84: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

DownsamplingLowering the Resolution

Page 85: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Rollups with Continuous QueriesCREATE CONTINUOUS QUERY "rollup_1h" ON "nasdaq"

BEGIN SELECT mean(price) INTO yearly FROM weekly GROUP BY time(1h)END

Page 86: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Events?Outlier / Anomaly Detection

InfluxDB Anomaly Detection

Page 87: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

Advancing Monitoring with Time Series

Taking Small Steps for Giant Leaps

Page 88: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

Application

Database

CPU > 80% MEM > 80%

Response Time > 300ms

Black Friday

Page 89: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

Application

Database

How do we know when to send a page to SRE / Ops?

When the application fails the health-check

Page 90: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

Application

DatabaseHow do we know when to send a page to SRE / Ops?

When we get more than 100 [ 5xx | Exceptions ] within a 5

minute period

ApplicationApplication

Page 91: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

Service A

Database A

Service B Service B Service C

Database B Database C

Virtual Network Service Mesh

Canary

Ummm?

Page 92: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Cloud Native Architectures

Convenience Vs. Cost

You can treat the symptoms for a while …

Upgrade Your Monitoring

Page 93: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

CausalityTreating the Disease

Page 94: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

➔ Look at last weeks, months, and years of data➔ Use tags to build correlation➔ Get Statistical

◆ INTEGRAL()◆ LINEAR_PREDICTION()◆ DERIVATIVE()◆ MAD()◆ MOVING_AVERAGE()◆ HOLT_WINTERS()

Causality

Page 95: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Have you ever been paged at 4am because the disk usage of a machine went above 85%?

Could this have been determined during office hours? (Linear Growth)

Can we use correlations to determine the cause during anomalies?

Causality

Page 96: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

In our distributed application, our p99 reports that our users are being served healthy responses in under 2ms. Our pager is going off because we’ve getting too many exceptions in the code

histogram(bins: [...])

Causality

Page 97: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Beware

http_request_duration_seconds_bucket{le="0.3"}http_request_duration_seconds_bucket{le="0.5"}http_request_duration_seconds_bucket{le="1.0"}

http_request_duration_seconds_bucket{le="+Inf"}

Page 98: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

In our distributed application, our p99 reports that our users are being served healthy responses in under 2ms. Our pager is going off because we’ve getting too many exceptions in the code

histogram()|> mode(*)

Causality

Page 99: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

We run Big News Corp and we need to reduce our cloud costs. Instead of running at 30% utilisation, can we run at 80% utilisation?

HOLT_WINTERS

Proactive Ops

Page 100: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Build AutomationThrough Causality, Historical Data, Prediction, and ML

Page 101: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

➔ Use a TSDB

➔ Understand Cost / Select Tags Wisely

➔ Understand the resolution you need for 1m, 6m, > 12m

Summary

➔ Rollup metrics

➔ Perform outlier detection on events

➔ Build automation, dashboarding, and reporting around your data (past, present, and future)

Page 102: @rawkode David McKay @rawkode · V1.1.3 Deployed CPU 12% CI Passed CI Started. @rawkode Healthcheck Failed Mem 100% DB Migration Run Scotland Qualify for World Cup Pod Killed By OOM

@rawkode

Cheers!David McKay@rawkode

Developer Advocate@InfluxDB | #InfluxDB

That’s All Folks!