SlideShare a Scribd company logo
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

What's hot (20)

PDF
JavaでCPUを使い倒す! ~Java 9 以降の CPU 最適化を覗いてみる~(NTTデータ テクノロジーカンファレンス 2019 講演資料、2019...
NTT DATA Technology & Innovation
 
PDF
[db tech showcase Tokyo 2014] B25: [In-Memory DB: SAP HANA] 障害・災害対策のメカニズム by...
Insight Technology, Inc.
 
PDF
Azure Synapse Analytics 専用SQL Poolベストプラクティス
Microsoft
 
PPT
DataGuard体験記
Shinnosuke Akita
 
PPTX
適切な Azure AD 認証方式の選択の決め手
Yusuke Kodama
 
ODP
Stream processing using Kafka
Knoldus Inc.
 
PDF
Talking TUF: Securing Software Distribution
Docker, Inc.
 
PPTX
コンテナネットワーキング(CNI)最前線
Motonori Shindo
 
PDF
How to monitor your micro-service with Prometheus?
Wojciech Barczyński
 
PDF
ksqlDB - Stream Processing simplified!
Guido Schmutz
 
PDF
PostgreSQL安定運用のコツ2009 @hbstudy#5
Uptime Technologies LLC (JP)
 
PDF
Istio on Kubernetes
Daneyon Hansen
 
PDF
Linux Networking Explained
Thomas Graf
 
ODP
PerfUG : présentation de Dynatrace APM
Antonio Gomes Rodrigues
 
PDF
ZabbixのAPIを使って運用を楽しくする話
Masahito Zembutsu
 
PDF
ヤフー発のメッセージキュー「Pulsar」のご紹介
Yahoo!デベロッパーネットワーク
 
PPT
Monitoring using Prometheus and Grafana
Arvind Kumar G.S
 
PPTX
オラクルのDX事例から学ぶ「次世代クラウド・インフラストラクチャとは?」第16回しゃちほこオラクル俱楽部
オラクルエンジニア通信
 
PDF
Unified JVM Logging
Yuji Kubota
 
PDF
MHA for MySQLとDeNAのオープンソースの話
Yoshinori Matsunobu
 
JavaでCPUを使い倒す! ~Java 9 以降の CPU 最適化を覗いてみる~(NTTデータ テクノロジーカンファレンス 2019 講演資料、2019...
NTT DATA Technology & Innovation
 
[db tech showcase Tokyo 2014] B25: [In-Memory DB: SAP HANA] 障害・災害対策のメカニズム by...
Insight Technology, Inc.
 
Azure Synapse Analytics 専用SQL Poolベストプラクティス
Microsoft
 
DataGuard体験記
Shinnosuke Akita
 
適切な Azure AD 認証方式の選択の決め手
Yusuke Kodama
 
Stream processing using Kafka
Knoldus Inc.
 
Talking TUF: Securing Software Distribution
Docker, Inc.
 
コンテナネットワーキング(CNI)最前線
Motonori Shindo
 
How to monitor your micro-service with Prometheus?
Wojciech Barczyński
 
ksqlDB - Stream Processing simplified!
Guido Schmutz
 
PostgreSQL安定運用のコツ2009 @hbstudy#5
Uptime Technologies LLC (JP)
 
Istio on Kubernetes
Daneyon Hansen
 
Linux Networking Explained
Thomas Graf
 
PerfUG : présentation de Dynatrace APM
Antonio Gomes Rodrigues
 
ZabbixのAPIを使って運用を楽しくする話
Masahito Zembutsu
 
ヤフー発のメッセージキュー「Pulsar」のご紹介
Yahoo!デベロッパーネットワーク
 
Monitoring using Prometheus and Grafana
Arvind Kumar G.S
 
オラクルのDX事例から学ぶ「次世代クラウド・インフラストラクチャとは?」第16回しゃちほこオラクル俱楽部
オラクルエンジニア通信
 
Unified JVM Logging
Yuji Kubota
 
MHA for MySQLとDeNAのオープンソースの話
Yoshinori Matsunobu
 

Viewers also liked (7)

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

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

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

Recently uploaded (20)

PDF
apidays Helsinki & North 2025 - APIs in the healthcare sector: hospitals inte...
apidays
 
PPTX
TSM_08_0811111111111111111111111111111111111111111111111
csomonasteriomoscow
 
PPTX
Hadoop_EcoSystem slide by CIDAC India.pptx
migbaruget
 
PDF
Performance Report Sample (Draft7).pdf
AmgadMaher5
 
PPTX
AI Project Cycle and Ethical Frameworks.pptx
RiddhimaVarshney1
 
PDF
What does good look like - CRAP Brighton 8 July 2025
Jan Kierzyk
 
PDF
Web Scraping with Google Gemini 2.0 .pdf
Tamanna
 
PPTX
Advanced_NLP_with_Transformers_PPT_final 50.pptx
Shiwani Gupta
 
PPTX
Module-5-Measures-of-Central-Tendency-Grouped-Data-1.pptx
lacsonjhoma0407
 
PDF
Avatar for apidays apidays PRO June 07, 2025 0 5 apidays Helsinki & North 2...
apidays
 
PPT
01 presentation finyyyal معهد معايره.ppt
eltohamym057
 
PPTX
Usage of Power BI for Pharmaceutical Data analysis.pptx
Anisha Herala
 
PPTX
GenAI-Introduction-to-Copilot-for-Bing-March-2025-FOR-HUB.pptx
cleydsonborges1
 
DOCX
AI/ML Applications in Financial domain projects
Rituparna De
 
PPTX
Slide studies GC- CRC - PC - HNC baru.pptx
LLen8
 
PPTX
Exploring Multilingual Embeddings for Italian Semantic Search: A Pretrained a...
Sease
 
PPT
Lecture 2-1.ppt at a higher learning institution such as the university of Za...
rachealhantukumane52
 
PDF
Context Engineering vs. Prompt Engineering, A Comprehensive Guide.pdf
Tamanna
 
PDF
How to Connect Your On-Premises Site to AWS Using Site-to-Site VPN.pdf
Tamanna
 
PDF
apidays Helsinki & North 2025 - API-Powered Journeys: Mobility in an API-Driv...
apidays
 
apidays Helsinki & North 2025 - APIs in the healthcare sector: hospitals inte...
apidays
 
TSM_08_0811111111111111111111111111111111111111111111111
csomonasteriomoscow
 
Hadoop_EcoSystem slide by CIDAC India.pptx
migbaruget
 
Performance Report Sample (Draft7).pdf
AmgadMaher5
 
AI Project Cycle and Ethical Frameworks.pptx
RiddhimaVarshney1
 
What does good look like - CRAP Brighton 8 July 2025
Jan Kierzyk
 
Web Scraping with Google Gemini 2.0 .pdf
Tamanna
 
Advanced_NLP_with_Transformers_PPT_final 50.pptx
Shiwani Gupta
 
Module-5-Measures-of-Central-Tendency-Grouped-Data-1.pptx
lacsonjhoma0407
 
Avatar for apidays apidays PRO June 07, 2025 0 5 apidays Helsinki & North 2...
apidays
 
01 presentation finyyyal معهد معايره.ppt
eltohamym057
 
Usage of Power BI for Pharmaceutical Data analysis.pptx
Anisha Herala
 
GenAI-Introduction-to-Copilot-for-Bing-March-2025-FOR-HUB.pptx
cleydsonborges1
 
AI/ML Applications in Financial domain projects
Rituparna De
 
Slide studies GC- CRC - PC - HNC baru.pptx
LLen8
 
Exploring Multilingual Embeddings for Italian Semantic Search: A Pretrained a...
Sease
 
Lecture 2-1.ppt at a higher learning institution such as the university of Za...
rachealhantukumane52
 
Context Engineering vs. Prompt Engineering, A Comprehensive Guide.pdf
Tamanna
 
How to Connect Your On-Premises Site to AWS Using Site-to-Site VPN.pdf
Tamanna
 
apidays Helsinki & North 2025 - API-Powered Journeys: Mobility in an API-Driv...
apidays
 

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