Visualize Your Data With Grafana Percona Live 2017 Daniel Lee - - - PowerPoint PPT Presentation

visualize your data with grafana
SMART_READER_LITE
LIVE PREVIEW

Visualize Your Data With Grafana Percona Live 2017 Daniel Lee - - - PowerPoint PPT Presentation

Visualize Your Data With Grafana Percona Live 2017 Daniel Lee - Software Engineer at Grafana Labs Daniel Lee Software Engineer at Grafana Labs Stockholm, Sweden @danlimerick on Twitter What is Grafana? Grafana The Grafana


slide-1
SLIDE 1

Visualize Your Data With Grafana

Percona Live 2017

Daniel Lee - Software Engineer at Grafana Labs

slide-2
SLIDE 2

Daniel Lee

  • Software Engineer at Grafana Labs
  • Stockholm, Sweden
  • @danlimerick on Twitter
slide-3
SLIDE 3

What is Grafana?

slide-4
SLIDE 4

Grafana

slide-5
SLIDE 5

The Grafana Project

  • First release on January, 2014.
  • Apache License
  • 17800 Stars on GitHub
  • > 3000 forks
slide-6
SLIDE 6

Grafana Installations - the last 400 days

slide-7
SLIDE 7

Agenda

  • 1. Introduction to Grafana
  • 2. Introduction to Monitoring
  • 3. Monitoring MySQL
  • 4. Application Metrics
  • 5. The new MySQL data source for Grafana
slide-8
SLIDE 8

Timeseries Definition

A time series is a sequence of values in time order. Most commonly the sequence is taken at evenly spaced points in time.

slide-9
SLIDE 9

Timeseries Are Everywhere

slide-10
SLIDE 10

Logs Can Be Timeseries

slide-11
SLIDE 11

Battlefield Stats

slide-12
SLIDE 12

Aggregations

  • Aggregations over time
  • Summarize functions
  • Sum, max, min, count, avg, percentiles
  • Can visualize the data from different angles
slide-13
SLIDE 13
  • Gauges
  • Counters
  • Timers

Timeseries Value Types

slide-14
SLIDE 14

Timeseries Databases

  • Not really relational data
  • More efficient at storing timeseries data
  • Better at querying timeseries data
slide-15
SLIDE 15

Grafana Dashboards

slide-16
SLIDE 16

Graph Panel

slide-17
SLIDE 17

Graph Panel - Display Options

slide-18
SLIDE 18

~40 Published Data Sources

And many more...

slide-19
SLIDE 19

Query Editors - Prometheus

slide-20
SLIDE 20

Query Editors - Graphite

slide-21
SLIDE 21

Query Editors - InfluxDB

slide-22
SLIDE 22

Alerting

slide-23
SLIDE 23
slide-24
SLIDE 24
slide-25
SLIDE 25
slide-26
SLIDE 26
slide-27
SLIDE 27
slide-28
SLIDE 28

Ready Made Dashboards

slide-29
SLIDE 29

GrafanaCloud

slide-30
SLIDE 30

Monitoring

“observe and check the progress or quality of (something) over a period of time; keep under systematic review.”

  • r

What’s broken, and why?

slide-31
SLIDE 31

Observability

  • A culture of being data-driven/data-informed
  • Whitebox monitoring
  • Application metrics
  • Something you have to build into your system
slide-32
SLIDE 32

Whitebox Monitoring

  • 1. Know when stuff fails
  • 2. Be able to debug why it failed
  • 3. Future trends
  • Detect future problems
  • capacity planning
slide-33
SLIDE 33

Know when stuff fails

Monitor symptoms. Not causes.

  • Throughput (Rate)
  • number of errors (Errors)
  • Performance (Duration

Based on:

  • Googles’ Four Golden Signals
  • R.E.D
slide-34
SLIDE 34

Monitoring MySQL - Metrics to alert on

Depends on your context. Some examples:

  • Connections
  • Query Latency/Run Time
  • Query Errors
  • Slow Queries
slide-35
SLIDE 35

Monitoring MySQL - querying for metrics

  • INFORMATION_SCHEMA
  • PERFORMANCE_SCHEMA
  • Counters:

select lower(variable_name) as variable_name, variable_value from global_status where variable_name = 'slow_queries' or variable_name = 'max_used_connections'

slide-36
SLIDE 36

Monitoring MySQL

  • 1. Collect data
  • 2. Write to a Timeseries database
  • 3. Visualize in Grafana
  • 4. Add alert rules
slide-37
SLIDE 37

Collector/Timeseries DB Combinations

  • 1. CollectD + Graphite
  • 2. Telegraf + InfluxDB
  • 3. Node Exporter + Prometheus
  • 4. Lots of other combinations
slide-38
SLIDE 38

Where to find out more

Prometheus

  • mysqld_exporter
  • Roman Vynars’ presentations at PerconaLive and Promcon

InfluxDB

  • Telegraf MySQL Input plugin

CollectD

  • MySQL plugin
  • DBI plugin
slide-39
SLIDE 39

An Example: Monitoring MySQL for GrafanaCloud

slide-40
SLIDE 40

Alert Query for Connections

slide-41
SLIDE 41

Alert Condition for Connections

slide-42
SLIDE 42

Triggered Alert

slide-43
SLIDE 43

Trends - Last 30 Days

slide-44
SLIDE 44

Application Metrics

  • Measure the user experience
  • Communicate with Graphs and Metrics
slide-45
SLIDE 45

The MySQL Data Source

Demo

slide-46
SLIDE 46

Demo Fail Backup - Create Table

slide-47
SLIDE 47

Demo Fail Backup - Query

slide-48
SLIDE 48

Demo Fail Backup - Query Zoomed In

slide-49
SLIDE 49

Demo Fail Backup - Template Variable

slide-50
SLIDE 50

Demo Fail Backup - Graph

slide-51
SLIDE 51

Demo Fail Backup - Timeshifted 1 Week

slide-52
SLIDE 52
slide-53
SLIDE 53

Recommended Talks

  • GrafanaCon 2016: Brian Brazil, Monitoring What Matters
  • PromCon 2016: Roman Vynar, Graphing MySQL Performance with

Prometheus and Grafana

  • Monitorama 2016: Torkel Ödegaard - Grafana Masterclass
  • Grafana Screencasts by Torkel Ödegaard on docs.grafana.org
slide-54
SLIDE 54

But wait there’s more

Grafana 5.0 coming soon:

  • Postgres Data Source
  • Dashboard Folders
  • Dashboard permissions
  • Elasticsearch Alerting
  • Cloudwatch Alerting
  • New Dashboard layout engine
slide-55
SLIDE 55

Dashboard Folders

slide-56
SLIDE 56

New Dashboard Layout Engine

slide-57
SLIDE 57

Q&A

  • Get Grafana - grafana.com
  • GrafanaCloud: https://grafana.com/cloud/grafana
  • Play Site: http://play.grafana.org
  • github.com/grafana/grafana
  • @grafana
  • @danlimerick