Grafana and MySQL
Benefits and Challenges
Aemelia Presentation Template from http://www.slidescarnival.com
About me
Philip Wernersbach
Software Engineer
Ingram Content Group
https://github.com/philip-wernersbach
https://www.linkedin.com/in/pwernersbach
2
• I work in Ingram Content Group’s
Automated Print On Demand division
• We have an automated process in
which publishers (independent or
corporate) request books via a website,
and we automatically print, bind, and
ship those books to them
• This process involves lots of hardware
devices and software components
3
We collect:
• Device Status (Online/Offline)
• Tracking data for every piece of material
for every book
• Throughput metrics
• Etc.
This produces gigabytes of data
an hour.
4
The Problem
5
The Problem
“How do we aggregate and track metrics
from our hardware and software sources,
and display those data points in a graph
format to the end user?”
 Grafana!
6
Which data store should we
use with Grafana?
▸ Out of the box, Grafana supports
Elasticsearch, Graphite, InfluxDB,
KairosDB, OpenTSDB
7
Which data store should we
use with Grafana?
▸ We compared the options and tried
InfluxDB
▸ There were several sticking points
with InfluxDB, both technical and
organizational, that caused us to rule
it out
8
Which data store should we
use with Grafana?
▸ We already have a MySQL cluster
deployed, System Administrators and
Operations know how to manage it
▸ Decided to go with MySQL as a data
store for Grafana
9
The Solution: Ingram
Content’s Grafana-MySQL
Integration
10
The
Integration
▸Written in Nim
▸Emulates an InfluxDB
server
▸Connects to an existing
MySQL server
▸Protocol compatible with
InfluxDB 0.9.3
▸Acts as a proxy that
converts the InfluxDB
protocol to the MySQL
11
The
Integration
12
Grafana
Integration Proxy
(InfluxDB compatible)
MySQL
The Challenges!
13
InfluxDB
▸ Time Series
database
▸ “time” is a special
value, has special
meaning
▸ Applies special
logic to “time”
SMART!
The
Challenges!
Database
Engine
Comparison
MySQL
▸ Generic relational
database
▸ “time” is a generic
data value
▸ Doesn’t apply
special logic
DUMB!
14
The
Challenges!
Query
Comparison
InfluxDB
“SELECT count(bar1) FROM foo
WHERE bar1 > 0 AND bar2 > 0 AND
time > now() - 7d GROUP BY time(1h)”
15
The
Challenges!
Query
Comparison
MySQL
“SELECT time, count(bar1) FROM foo
WHERE bar1 > 0 AND bar2 > 0 AND
time > NOW(6) - INTERVAL 7 DAY
GROUP BY YEAR(time), MONTH(time),
DAY(time), HOUR(time) ORDER BY time
ASC”
16
The
Challenges!
InfluxQL !=
SQL
InfluxQL != SQL
▸ InfluxQL is SQL-like, but
different enough that it can’t
be passed through to MySQL
17
The
Challenges!
InfluxQL !=
SQL
▸ “time” is SELECT’d automatically
implicitly in InfluxDB
▹ “SELECT bar FROM foo”  “SELECT time, bar
FROM FOO”
▸ GROUP’ing on “time” is smart in
InfluxDB, and dumb in MySQL
▹ See slides 16 and 17
▸ “time” in epoch format with
millisecond precision is a float in
MySQL
▹ “FROM_UNIXTIME(1444667802.145)”
18
The
Challenges!
InfluxQL !=
SQL
▸ InfluxDB series are roughly equivalent
to MySQL tables, but the
management syntax is sometimes
different
▹ “DROP SERIES FROM foo”  “DELETE FROM
foo”
▸ InfluxDB allows quoted identifiers,
MySQL is more restrictive
▹ “SELECT * FROM foo WHERE bar > ‘0’” 
Silently returns garbage in MySQL
▹ Grafana quotes identifiers aggressively, so we had
to patch it
19
The
Challenges!
InfluxQL !=
SQL
There’s probably more InfluxQL-
SQL incompatibilities, but these
are the ones that we’ve run into
with Grafana at Ingram Content
Group.
20
The Benefits!
21
The Benefits!
▸ Allows us to leverage System
Administrator’s and Operation’s
existing knowledge of MySQL
▸ Allows us to process large amounts of
data
▹ InfluxDB had issues when we tried to insert about
a million points at a time, MySQL handles this with
no problem
22
The Benefits!
▸ We can use full, regular SQL for our
Grafana queries in addition to
InfluxQL
▹ Think JOINs, etc.
▸ We’re doing massive batch inserts,
and MySQL’s query cache makes
Grafana queries significantly faster
▹ This is obviously use case specific, but shows how
you can tune MySQL to your specific use case
23

More Related Content

PDF
Tools for Solving Performance Issues
 
PDF
Architecting for the Cloud using NetflixOSS - Codemash Workshop
PDF
ClickHouse Deep Dive, by Aleksei Milovidov
PDF
Introduction Ă  ElasticSearch
PDF
PostgreSQL and RAM usage
PDF
10 Good Reasons to Use ClickHouse
 
PPTX
Autoscaling Flink with Reactive Mode
PDF
ClickHouse Monitoring 101: What to monitor and how
Tools for Solving Performance Issues
 
Architecting for the Cloud using NetflixOSS - Codemash Workshop
ClickHouse Deep Dive, by Aleksei Milovidov
Introduction Ă  ElasticSearch
PostgreSQL and RAM usage
10 Good Reasons to Use ClickHouse
 
Autoscaling Flink with Reactive Mode
ClickHouse Monitoring 101: What to monitor and how

What's hot (20)

PDF
Apache Bigtop3.2 (仮)(Open Source Conference 2022 Online/Hiroshima 発表資料)
PDF
How Netflix Tunes EC2 Instances for Performance
PDF
Blazing Performance with Flame Graphs
PDF
EDB Postgres DBA Best Practices
 
PDF
Top 10 Mistakes When Migrating From Oracle to PostgreSQL
PPTX
Query logging with proxysql
PPTX
Elastic Stack Introduction
PDF
Intro to Airflow: Goodbye Cron, Welcome scheduled workflow management
PDF
Apache Spark At Scale in the Cloud
PDF
Java Performance Analysis on Linux with Flame Graphs
PPTX
Hive+Tez: A performance deep dive
PDF
Advanced Postgres Monitoring
PDF
Spark shuffle introduction
PDF
PDF
Distributed Databases Deconstructed: CockroachDB, TiDB and YugaByte DB
PDF
[Pgday.Seoul 2021] 2. Porting Oracle UDF and Optimization
PDF
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
PPTX
Managing Egress with Istio
PDF
Introduction to Cassandra
PDF
Query Engines for Hive: MR, Spark, Tez with LLAP – Considerations!
Apache Bigtop3.2 (仮)(Open Source Conference 2022 Online/Hiroshima 発表資料)
How Netflix Tunes EC2 Instances for Performance
Blazing Performance with Flame Graphs
EDB Postgres DBA Best Practices
 
Top 10 Mistakes When Migrating From Oracle to PostgreSQL
Query logging with proxysql
Elastic Stack Introduction
Intro to Airflow: Goodbye Cron, Welcome scheduled workflow management
Apache Spark At Scale in the Cloud
Java Performance Analysis on Linux with Flame Graphs
Hive+Tez: A performance deep dive
Advanced Postgres Monitoring
Spark shuffle introduction
Distributed Databases Deconstructed: CockroachDB, TiDB and YugaByte DB
[Pgday.Seoul 2021] 2. Porting Oracle UDF and Optimization
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
Managing Egress with Istio
Introduction to Cassandra
Query Engines for Hive: MR, Spark, Tez with LLAP – Considerations!
Ad

Viewers also liked (7)

PDF
Andrew Nelson - Zabbix and SNMP on Linux
 
PDF
Monitoring the #DevOps way
PDF
Zabbix 3.0 and beyond - FISL 2015
 
PPTX
Icinga Camp Barcelona - Current State of Icinga
 
PDF
Alexei Vladishev - Opening Speech
 
PDF
Stop using Nagios (so it can die peacefully)
PDF
Fall in Love with Graphs and Metrics using Grafana
Andrew Nelson - Zabbix and SNMP on Linux
 
Monitoring the #DevOps way
Zabbix 3.0 and beyond - FISL 2015
 
Icinga Camp Barcelona - Current State of Icinga
 
Alexei Vladishev - Opening Speech
 
Stop using Nagios (so it can die peacefully)
Fall in Love with Graphs and Metrics using Grafana
Ad

Similar to Grafana and MySQL - Benefits and Challenges (20)

PDF
Beautiful Monitoring With Grafana and InfluxDB
PDF
Why Open Source Works for DevOps Monitoring
PPTX
Discover How IBM Uses InfluxDB and Grafana to Help Clients Monitor Large Prod...
PDF
Timeseries - data visualization in Grafana
PPTX
Wayfair Storefront Performance Monitoring with InfluxEnterprise by Richard La...
PPTX
InfluxDb and Grafana fighting with data
PDF
Real Time Test Data with Grafana
PPTX
Using InfluxDB for real-time monitoring in Jmeter
PDF
InfiniFlux vs_RDBMS
PDF
InfiniFlux Feature perf comp_v1
PDF
IniniFlux Feature_Perf_Comparison
PDF
InfluxDB and Grafana: An Introduction to Time-Based Data Storage and Visualiz...
PDF
Getting started with influx Db and Grafana Installation Guide
PDF
InfluxDB Internals
PPTX
MySQL 8.0 Featured for Developers
PDF
Time seriesdb influx
PDF
MySQL 开发
PPTX
CCI2019 - Monitorare SQL Server Senza Andare in Bancarotta
PDF
NOSQL Meets Relational - The MySQL Ecosystem Gains More Flexibility
PDF
[4DEV][Łódź] Ivan Vaskevych - InfluxDB and Grafana fighting together with IoT...
Beautiful Monitoring With Grafana and InfluxDB
Why Open Source Works for DevOps Monitoring
Discover How IBM Uses InfluxDB and Grafana to Help Clients Monitor Large Prod...
Timeseries - data visualization in Grafana
Wayfair Storefront Performance Monitoring with InfluxEnterprise by Richard La...
InfluxDb and Grafana fighting with data
Real Time Test Data with Grafana
Using InfluxDB for real-time monitoring in Jmeter
InfiniFlux vs_RDBMS
InfiniFlux Feature perf comp_v1
IniniFlux Feature_Perf_Comparison
InfluxDB and Grafana: An Introduction to Time-Based Data Storage and Visualiz...
Getting started with influx Db and Grafana Installation Guide
InfluxDB Internals
MySQL 8.0 Featured for Developers
Time seriesdb influx
MySQL 开发
CCI2019 - Monitorare SQL Server Senza Andare in Bancarotta
NOSQL Meets Relational - The MySQL Ecosystem Gains More Flexibility
[4DEV][Łódź] Ivan Vaskevych - InfluxDB and Grafana fighting together with IoT...

Recently uploaded (20)

PPTX
DIGITAL DESIGN AND.pptx hhhhhhhhhhhhhhhhh
PDF
The high price of a dog bite in California
PDF
Q1-wK1-Human-and-Cultural-Variation-sy-2024-2025-Copy-1.pdf
PDF
Nucleic-Acids_-Structure-Typ...-1.pdf 011
PDF
PPT IEPT 2025_Ms. Nurul Presentation 10.pdf
PPT
Handout for Lean and Six Sigma application
PDF
Lesson 1 - intro Cybersecurity and Cybercrime.pptx.pdf
PDF
9 FinOps Tools That Simplify Cloud Cost Reporting.pdf
 
PPTX
Evaluasi program Bhs Inggris th 2023-2024 dan prog th 2024-2025-1.pptx
PPT
DWDM unit 1 for btech 3rd year students.ppt
PPTX
AI-Augmented Business Process Management Systems
PPTX
Overview_of_Computing_Presentation.pptxxx
PPT
Technicalities in writing workshops indigenous language
PDF
Delhi c@ll girl# cute girls in delhi with travel girls in delhi call now
PPTX
The future of AIThe future of AIThe future of AI
 
PPTX
Power BI - Microsoft Power BI is an interactive data visualization software p...
PDF
Mcdonald's : a half century growth . pdf
PDF
Introduction to Database Systems Lec # 1
PPT
Drug treatment of Malbbbbbhhbbbbhharia.ppt
PPTX
Capstone Presentation a.pptx on data sci
DIGITAL DESIGN AND.pptx hhhhhhhhhhhhhhhhh
The high price of a dog bite in California
Q1-wK1-Human-and-Cultural-Variation-sy-2024-2025-Copy-1.pdf
Nucleic-Acids_-Structure-Typ...-1.pdf 011
PPT IEPT 2025_Ms. Nurul Presentation 10.pdf
Handout for Lean and Six Sigma application
Lesson 1 - intro Cybersecurity and Cybercrime.pptx.pdf
9 FinOps Tools That Simplify Cloud Cost Reporting.pdf
 
Evaluasi program Bhs Inggris th 2023-2024 dan prog th 2024-2025-1.pptx
DWDM unit 1 for btech 3rd year students.ppt
AI-Augmented Business Process Management Systems
Overview_of_Computing_Presentation.pptxxx
Technicalities in writing workshops indigenous language
Delhi c@ll girl# cute girls in delhi with travel girls in delhi call now
The future of AIThe future of AIThe future of AI
 
Power BI - Microsoft Power BI is an interactive data visualization software p...
Mcdonald's : a half century growth . pdf
Introduction to Database Systems Lec # 1
Drug treatment of Malbbbbbhhbbbbhharia.ppt
Capstone Presentation a.pptx on data sci

Grafana and MySQL - Benefits and Challenges

  • 1. Grafana and MySQL Benefits and Challenges Aemelia Presentation Template from http://www.slidescarnival.com
  • 2. About me Philip Wernersbach Software Engineer Ingram Content Group https://github.com/philip-wernersbach https://www.linkedin.com/in/pwernersbach 2
  • 3. • I work in Ingram Content Group’s Automated Print On Demand division • We have an automated process in which publishers (independent or corporate) request books via a website, and we automatically print, bind, and ship those books to them • This process involves lots of hardware devices and software components 3
  • 4. We collect: • Device Status (Online/Offline) • Tracking data for every piece of material for every book • Throughput metrics • Etc. This produces gigabytes of data an hour. 4
  • 6. The Problem “How do we aggregate and track metrics from our hardware and software sources, and display those data points in a graph format to the end user?”  Grafana! 6
  • 7. Which data store should we use with Grafana? ▸ Out of the box, Grafana supports Elasticsearch, Graphite, InfluxDB, KairosDB, OpenTSDB 7
  • 8. Which data store should we use with Grafana? ▸ We compared the options and tried InfluxDB ▸ There were several sticking points with InfluxDB, both technical and organizational, that caused us to rule it out 8
  • 9. Which data store should we use with Grafana? ▸ We already have a MySQL cluster deployed, System Administrators and Operations know how to manage it ▸ Decided to go with MySQL as a data store for Grafana 9
  • 10. The Solution: Ingram Content’s Grafana-MySQL Integration 10
  • 11. The Integration ▸Written in Nim ▸Emulates an InfluxDB server ▸Connects to an existing MySQL server ▸Protocol compatible with InfluxDB 0.9.3 ▸Acts as a proxy that converts the InfluxDB protocol to the MySQL 11
  • 14. InfluxDB ▸ Time Series database ▸ “time” is a special value, has special meaning ▸ Applies special logic to “time” SMART! The Challenges! Database Engine Comparison MySQL ▸ Generic relational database ▸ “time” is a generic data value ▸ Doesn’t apply special logic DUMB! 14
  • 15. The Challenges! Query Comparison InfluxDB “SELECT count(bar1) FROM foo WHERE bar1 > 0 AND bar2 > 0 AND time > now() - 7d GROUP BY time(1h)” 15
  • 16. The Challenges! Query Comparison MySQL “SELECT time, count(bar1) FROM foo WHERE bar1 > 0 AND bar2 > 0 AND time > NOW(6) - INTERVAL 7 DAY GROUP BY YEAR(time), MONTH(time), DAY(time), HOUR(time) ORDER BY time ASC” 16
  • 17. The Challenges! InfluxQL != SQL InfluxQL != SQL ▸ InfluxQL is SQL-like, but different enough that it can’t be passed through to MySQL 17
  • 18. The Challenges! InfluxQL != SQL ▸ “time” is SELECT’d automatically implicitly in InfluxDB ▹ “SELECT bar FROM foo”  “SELECT time, bar FROM FOO” ▸ GROUP’ing on “time” is smart in InfluxDB, and dumb in MySQL ▹ See slides 16 and 17 ▸ “time” in epoch format with millisecond precision is a float in MySQL ▹ “FROM_UNIXTIME(1444667802.145)” 18
  • 19. The Challenges! InfluxQL != SQL ▸ InfluxDB series are roughly equivalent to MySQL tables, but the management syntax is sometimes different ▹ “DROP SERIES FROM foo”  “DELETE FROM foo” ▸ InfluxDB allows quoted identifiers, MySQL is more restrictive ▹ “SELECT * FROM foo WHERE bar > ‘0’”  Silently returns garbage in MySQL ▹ Grafana quotes identifiers aggressively, so we had to patch it 19
  • 20. The Challenges! InfluxQL != SQL There’s probably more InfluxQL- SQL incompatibilities, but these are the ones that we’ve run into with Grafana at Ingram Content Group. 20
  • 22. The Benefits! ▸ Allows us to leverage System Administrator’s and Operation’s existing knowledge of MySQL ▸ Allows us to process large amounts of data ▹ InfluxDB had issues when we tried to insert about a million points at a time, MySQL handles this with no problem 22
  • 23. The Benefits! ▸ We can use full, regular SQL for our Grafana queries in addition to InfluxQL ▹ Think JOINs, etc. ▸ We’re doing massive batch inserts, and MySQL’s query cache makes Grafana queries significantly faster ▹ This is obviously use case specific, but shows how you can tune MySQL to your specific use case 23