SlideShare uma empresa Scribd logo
1 de 29
Al Sargent
Sr. Director, Product
InfluxData
April 2021
Stream processing IoT time
series data with Kafka &
InfluxDB
Mirek Malecha
Product Manager
Bonitoo
April 2021
© 2021 InfluxData. All rights reserved.
3
What is time series
data?
© 2021 InfluxData. All rights reserved.
4
Time series data is
‒ Sequence of data points.
‒ Successive measurements made from same source over a time
interval.
‒ Plot the points on a graph and your X axis is time.
© 2021 InfluxData. All rights reserved.
5
Example: Weather conditions
© 2021 InfluxData. All rights reserved.
6
Example: Server monitoring
© 2021 InfluxData. All rights reserved.
7
Example: Healthcare
© 2021 InfluxData. All rights reserved.
8
What is a time series
database?
© 2021 InfluxData. All rights reserved.
9
Characteristics of the
Data
– All Time-stamped data
– Generated in regular (Metric) and
irregular (Event) time periods
– Huge volumes of data
– Real-time and time sensitive
© 2021 InfluxData. All rights reserved.
10
Time Series databases:
optimized for collecting,
storing, retrieving &
processing of time
series data
Compare this to:
– Document databases
– Optimized for JSON documents
– Search databases
– Optimized for full-text searches
– Traditional relational
– Databases optimized for the tabular
storage of related data in rows &
columns
© 2021 InfluxData. All rights reserved.
11
Time-series use
cases
© 2021 InfluxData. All rights reserved.
12
IoT DevOps Monitoring Operations Analytics
Industrial devices: factories,
energy, vehicles, buildings,
agriculture, etc.
Consumer sensors: wearables,
home appliances, health
monitors
Monitor the performance of
servers, virtual machines,
containers, and applications
Track business, customer,
financial and scientific metrics
Primary Use Cases for time series data
Delivered an Industrial IoT data historian
that
• provides automation and control of
their oil drilling platforms
• provides edge and centralized insight
into emerging patterns
by storing and analyzing all the sensor data
derived from energy production sensors
Internet of Things (IoT)
IoT monitoring
© 2020 InfluxData. All rights reserved.
15
InfluxData Time Series Data Platform
Accumulate Act
Analyze
Flux joins
MySQL, Postgres, RDS, etc.
Telegraf plugins
200+ plugins
Client libraries
Python, Javascript, Java, Go...
Prometheus
scrapers
FluentD
700+ plugins
AWS, Google, Azure
InfluxDB Cloud InfluxDB
Enterprise
InfluxDB
Purpose-built Time Series Database
Realtime Data Stream Processing
Visualization & Dashboarding
Data Analysis & Anomaly Detection
Alerting & Notifications
Metering & Billing
InfluxDB
Open
Source
(OSS)
On-prem, self-managed cloud
Alerting Systems
PagerDuty
Slack
Webhooks
Grafana
Client Libraries
CLI
REST API
© 2021 InfluxData. All rights reserved.
16
Simple IoT Solution
© 2021 InfluxData. All rights reserved.
17
IoT Center
• Simple demo application
• Register, configure and monitor IoT devices
• How to integrate InfluxDB
• Write measurements
• Query database
• Manage InfluxDB
• Based on Node.js and React
• Use Kafka to write measurements
• Virtual Device - emulates real devices
• Help with links to source code - GIT
• InfluxDB Cloud - No DB installation
© 2021 InfluxData. All rights reserved.
18
IoT Center Functions
‒ Device Registration - register new IoT Devices
‒ Virtual Device - emulate IoT device
‒ Dashboard - show measured data from the IoT Devices
© 2021 InfluxData. All rights reserved.
19
IoT Devices Registration
Left menu
● Devices
Registration
© 2021 InfluxData. All rights reserved.
20
Virtual Device - Generate demo data
Left menu
● Virtual Device
Top screen
● Button with pencil
© 2021 InfluxData. All rights reserved.
21
Visualisation
Left Menu
● Dashboard
Filters
● Device
● Time
© 2021 InfluxData. All rights reserved.
22
IoT Center Architecture
Configuration
InfluxDB Cloud
Time Series Database
(or standalone InfluxDB)
IoT Center
IoT
Devices
InfluxDB
JS
Client
Virtual
Device
Web
Browser
Measurements (temp, humidity, pressure, GPS, …)
UI
Kafka
topic: iot
Telegraf
IoT Devices registration, Queries
kafkajs
© 2021 InfluxData. All rights reserved.
23
Arduino
Python
Java
.NET
Kafka
Scalable component decoupling IoT layer from DB/Analytics layer
IoT Center - virtual device
‒ KafkaJS client
IoT devices - data flow
const producer = kafka.producer()
await producer.connect()
await producer.send({
key: 'mykey',
topic: KAFKA_TOPIC,
messages: [{value: influxLineProtocolData}],
compression: CompressionTypes.GZIP,
})
IoT
Device
Kafka Telegraf
MQTT Broker
.
.
.
1
2
3
© 2021 InfluxData. All rights reserved.
24
Telegraf
A plugin-driven server agent collecting messages from Kafka into
InfluxDB.
1. Download telegraf (Docker, Linux, Windows, macOS, ARM, ...)
https://portal.influxdata.com/downloads/
2. Update configuration file telegraf.conf (see the next slide)
3. Start it
# telegraf --config telegraf.conf
Kafka Telegraf
IoT Devices
© 2021 InfluxData. All rights reserved.
25
Telegraf.conf file
Read data from Kafka
https://github.com/influxdata/telegraf/tree/master/plugins/inputs/kafka_consumer
Write to InfluxDB (replace fields by your account)
Format options
https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
‒ Values, CSV, JSON, XML, InfluxDB Line Protocol, Collectd, Dropwizard, Graphite, Grok,
Logfmt, Nagios, Prometheus, PrometheusRemoteWrite, Wavefront
[[outputs.influxdb_v2]]
urls = ["https://us-west-2-1.aws.cloud2.influxdata.com"]
token = "heRbZX2n4kc8Q_jYPddwjkv3dAZRorNQnN67pMwKs1lGgbMW8vWRjAi7VvkUitQMii2XwJM9qX3cnK4oAZDIjg=="
organization = "iot-center@bonitoo.io"
bucket = "iot_center"
[[inputs.kafka_consumer]]
brokers = ["localhost:9092"]
topics = ["iot"]
data_format = "influx"
© 2021 InfluxData. All rights reserved.
26
InfluxDB
FREE Account
https://cloud2.influxdata.com
‒ Data Explorer
‒ Dashboards
‒ Alerts
‒ Configuration
Kafka Telegraf
IoT Devices
© 2021 InfluxData. All rights reserved.
27
Demo Kafka Telegraf
Virtual Device
© 2021 InfluxData. All rights reserved.
28
IoT Center - Source code
https://github.com/bonitoo-io/iot-center-v2 ESP8266 and ESP32
devices
Arduino
Raspberry Pi
Python
Mobile application
Flutter/Dart
© 2021 InfluxData. All rights reserved.
29
Summary
‒ Time series data
‒ InfluxDB
‒ Highly scalable database
‒ Store & Analyze data
‒ CLI, API, Dashboards, Tasks, etc.
‒ Free cloud time-unlimited account
‒ Telegraf
‒ Reads Kafka messages
‒ Stores data into InfluxDB
‒ 200+ data inputs
‒ Configuration file, only 9 lines
© 2021 InfluxData. All rights reserved.
30
influxdata.com/cloud
Thank You

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Apache Pulsar Development 101 with Python
Apache Pulsar Development 101 with PythonApache Pulsar Development 101 with Python
Apache Pulsar Development 101 with Python
 
Delivering: from Kafka to WebSockets | Adam Warski, SoftwareMill
Delivering: from Kafka to WebSockets | Adam Warski, SoftwareMillDelivering: from Kafka to WebSockets | Adam Warski, SoftwareMill
Delivering: from Kafka to WebSockets | Adam Warski, SoftwareMill
 
MySQL Monitoring using Prometheus & Grafana
MySQL Monitoring using Prometheus & GrafanaMySQL Monitoring using Prometheus & Grafana
MySQL Monitoring using Prometheus & Grafana
 
Best Practices for ETL with Apache NiFi on Kubernetes - Albert Lewandowski, G...
Best Practices for ETL with Apache NiFi on Kubernetes - Albert Lewandowski, G...Best Practices for ETL with Apache NiFi on Kubernetes - Albert Lewandowski, G...
Best Practices for ETL with Apache NiFi on Kubernetes - Albert Lewandowski, G...
 
When NOT to use Apache Kafka?
When NOT to use Apache Kafka?When NOT to use Apache Kafka?
When NOT to use Apache Kafka?
 
Introduction to Kafka Streams
Introduction to Kafka StreamsIntroduction to Kafka Streams
Introduction to Kafka Streams
 
ksqlDB: A Stream-Relational Database System
ksqlDB: A Stream-Relational Database SystemksqlDB: A Stream-Relational Database System
ksqlDB: A Stream-Relational Database System
 
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
 
Kubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory GuideKubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory Guide
 
Kafka to the Maxka - (Kafka Performance Tuning)
Kafka to the Maxka - (Kafka Performance Tuning)Kafka to the Maxka - (Kafka Performance Tuning)
Kafka to the Maxka - (Kafka Performance Tuning)
 
The Heart of the Data Mesh Beats in Real-Time with Apache Kafka
The Heart of the Data Mesh Beats in Real-Time with Apache KafkaThe Heart of the Data Mesh Beats in Real-Time with Apache Kafka
The Heart of the Data Mesh Beats in Real-Time with Apache Kafka
 
Cloud native integration
Cloud native integrationCloud native integration
Cloud native integration
 
The Proxy Wars - MySQL Router, ProxySQL, MariaDB MaxScale
The Proxy Wars - MySQL Router, ProxySQL, MariaDB MaxScaleThe Proxy Wars - MySQL Router, ProxySQL, MariaDB MaxScale
The Proxy Wars - MySQL Router, ProxySQL, MariaDB MaxScale
 
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes Concepts And Architecture Powerpoint Presentation SlidesKubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
 
ksqlDB - Stream Processing simplified!
ksqlDB - Stream Processing simplified!ksqlDB - Stream Processing simplified!
ksqlDB - Stream Processing simplified!
 
Exposing and Controlling Kafka Event Streaming with Kong Konnect Enterprise |...
Exposing and Controlling Kafka Event Streaming with Kong Konnect Enterprise |...Exposing and Controlling Kafka Event Streaming with Kong Konnect Enterprise |...
Exposing and Controlling Kafka Event Streaming with Kong Konnect Enterprise |...
 
Serverless integration with Knative and Apache Camel on Kubernetes
Serverless integration with Knative and Apache Camel on KubernetesServerless integration with Knative and Apache Camel on Kubernetes
Serverless integration with Knative and Apache Camel on Kubernetes
 
Kubernetes Basics
Kubernetes BasicsKubernetes Basics
Kubernetes Basics
 
Airbyte @ Airflow Summit - The new modern data stack
Airbyte @ Airflow Summit - The new modern data stackAirbyte @ Airflow Summit - The new modern data stack
Airbyte @ Airflow Summit - The new modern data stack
 
Introduction to Apache Kafka and Confluent... and why they matter
Introduction to Apache Kafka and Confluent... and why they matterIntroduction to Apache Kafka and Confluent... and why they matter
Introduction to Apache Kafka and Confluent... and why they matter
 

Semelhante a Stream processing IoT time series data with Kafka & InfluxDB | Al Sargent, InfluxData

Streaming Sensor Data Slides_Virender
Streaming Sensor Data Slides_VirenderStreaming Sensor Data Slides_Virender
Streaming Sensor Data Slides_Virender
vithakur
 

Semelhante a Stream processing IoT time series data with Kafka & InfluxDB | Al Sargent, InfluxData (20)

Kafka & InfluxDB: BFFs for Enterprise Data Applications | Russ Savage, Influx...
Kafka & InfluxDB: BFFs for Enterprise Data Applications | Russ Savage, Influx...Kafka & InfluxDB: BFFs for Enterprise Data Applications | Russ Savage, Influx...
Kafka & InfluxDB: BFFs for Enterprise Data Applications | Russ Savage, Influx...
 
Maximizing Real-Time Data Processing with Apache Kafka and InfluxDB: A Compre...
Maximizing Real-Time Data Processing with Apache Kafka and InfluxDB: A Compre...Maximizing Real-Time Data Processing with Apache Kafka and InfluxDB: A Compre...
Maximizing Real-Time Data Processing with Apache Kafka and InfluxDB: A Compre...
 
Tim Hall [InfluxData] | InfluxDB Roadmap | InfluxDays Virtual Experience Lond...
Tim Hall [InfluxData] | InfluxDB Roadmap | InfluxDays Virtual Experience Lond...Tim Hall [InfluxData] | InfluxDB Roadmap | InfluxDays Virtual Experience Lond...
Tim Hall [InfluxData] | InfluxDB Roadmap | InfluxDays Virtual Experience Lond...
 
Tim Hall [InfluxData] | InfluxDB Roadmap | InfluxDays Virtual Experience NA 2020
Tim Hall [InfluxData] | InfluxDB Roadmap | InfluxDays Virtual Experience NA 2020Tim Hall [InfluxData] | InfluxDB Roadmap | InfluxDays Virtual Experience NA 2020
Tim Hall [InfluxData] | InfluxDB Roadmap | InfluxDays Virtual Experience NA 2020
 
Getting Started: Intro to Telegraf - July 2021
Getting Started: Intro to Telegraf - July 2021Getting Started: Intro to Telegraf - July 2021
Getting Started: Intro to Telegraf - July 2021
 
Streaming Sensor Data Slides_Virender
Streaming Sensor Data Slides_VirenderStreaming Sensor Data Slides_Virender
Streaming Sensor Data Slides_Virender
 
Flux QL - Nexgen Management of Time Series Inspired by JS
Flux QL - Nexgen Management of Time Series Inspired by JSFlux QL - Nexgen Management of Time Series Inspired by JS
Flux QL - Nexgen Management of Time Series Inspired by JS
 
Enabling Microservices Frameworks to Solve Business Problems
Enabling Microservices Frameworks to Solve  Business ProblemsEnabling Microservices Frameworks to Solve  Business Problems
Enabling Microservices Frameworks to Solve Business Problems
 
Introduction to FIWARE Open Ecosystem
Introduction to FIWARE Open EcosystemIntroduction to FIWARE Open Ecosystem
Introduction to FIWARE Open Ecosystem
 
How to Use Telegraf and Its Plugin Ecosystem
How to Use Telegraf and Its Plugin EcosystemHow to Use Telegraf and Its Plugin Ecosystem
How to Use Telegraf and Its Plugin Ecosystem
 
Javantura v3 - Real-time BigData ingestion and querying of aggregated data – ...
Javantura v3 - Real-time BigData ingestion and querying of aggregated data – ...Javantura v3 - Real-time BigData ingestion and querying of aggregated data – ...
Javantura v3 - Real-time BigData ingestion and querying of aggregated data – ...
 
Io t world_2016_iot_smart_gateways_moe
Io t world_2016_iot_smart_gateways_moeIo t world_2016_iot_smart_gateways_moe
Io t world_2016_iot_smart_gateways_moe
 
3 Reasons to Select Time Series Platforms for Cloud Native Applications Monit...
3 Reasons to Select Time Series Platforms for Cloud Native Applications Monit...3 Reasons to Select Time Series Platforms for Cloud Native Applications Monit...
3 Reasons to Select Time Series Platforms for Cloud Native Applications Monit...
 
Vasilis Papavasiliou [Mist.io] | Integrating Telegraf, InfluxDB and Mist to M...
Vasilis Papavasiliou [Mist.io] | Integrating Telegraf, InfluxDB and Mist to M...Vasilis Papavasiliou [Mist.io] | Integrating Telegraf, InfluxDB and Mist to M...
Vasilis Papavasiliou [Mist.io] | Integrating Telegraf, InfluxDB and Mist to M...
 
Influx data basic
Influx data basicInflux data basic
Influx data basic
 
Jess Ingrassellino [InfluxData] | How to Get Data Into InfluxDB | InfluxDays ...
Jess Ingrassellino [InfluxData] | How to Get Data Into InfluxDB | InfluxDays ...Jess Ingrassellino [InfluxData] | How to Get Data Into InfluxDB | InfluxDays ...
Jess Ingrassellino [InfluxData] | How to Get Data Into InfluxDB | InfluxDays ...
 
Open Source Edge Computing Platforms - Overview
Open Source Edge Computing Platforms - OverviewOpen Source Edge Computing Platforms - Overview
Open Source Edge Computing Platforms - Overview
 
citus™ iot ecosystem
citus™ iot ecosystemcitus™ iot ecosystem
citus™ iot ecosystem
 
Support of containerized workloads in ONAP
Support of containerized workloads in ONAPSupport of containerized workloads in ONAP
Support of containerized workloads in ONAP
 
Shashi Raina [AWS] & Al Sargent [InfluxData] | Build Modern Monitoring with I...
Shashi Raina [AWS] & Al Sargent [InfluxData] | Build Modern Monitoring with I...Shashi Raina [AWS] & Al Sargent [InfluxData] | Build Modern Monitoring with I...
Shashi Raina [AWS] & Al Sargent [InfluxData] | Build Modern Monitoring with I...
 

Mais de HostedbyConfluent

Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
HostedbyConfluent
 
Evolution of NRT Data Ingestion Pipeline at Trendyol
Evolution of NRT Data Ingestion Pipeline at TrendyolEvolution of NRT Data Ingestion Pipeline at Trendyol
Evolution of NRT Data Ingestion Pipeline at Trendyol
HostedbyConfluent
 

Mais de HostedbyConfluent (20)

Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Renaming a Kafka Topic | Kafka Summit London
Renaming a Kafka Topic | Kafka Summit LondonRenaming a Kafka Topic | Kafka Summit London
Renaming a Kafka Topic | Kafka Summit London
 
Evolution of NRT Data Ingestion Pipeline at Trendyol
Evolution of NRT Data Ingestion Pipeline at TrendyolEvolution of NRT Data Ingestion Pipeline at Trendyol
Evolution of NRT Data Ingestion Pipeline at Trendyol
 
Ensuring Kafka Service Resilience: A Dive into Health-Checking Techniques
Ensuring Kafka Service Resilience: A Dive into Health-Checking TechniquesEnsuring Kafka Service Resilience: A Dive into Health-Checking Techniques
Ensuring Kafka Service Resilience: A Dive into Health-Checking Techniques
 
Exactly-once Stream Processing with Arroyo and Kafka
Exactly-once Stream Processing with Arroyo and KafkaExactly-once Stream Processing with Arroyo and Kafka
Exactly-once Stream Processing with Arroyo and Kafka
 
Fish Plays Pokemon | Kafka Summit London
Fish Plays Pokemon | Kafka Summit LondonFish Plays Pokemon | Kafka Summit London
Fish Plays Pokemon | Kafka Summit London
 
Tiered Storage 101 | Kafla Summit London
Tiered Storage 101 | Kafla Summit LondonTiered Storage 101 | Kafla Summit London
Tiered Storage 101 | Kafla Summit London
 
Building a Self-Service Stream Processing Portal: How And Why
Building a Self-Service Stream Processing Portal: How And WhyBuilding a Self-Service Stream Processing Portal: How And Why
Building a Self-Service Stream Processing Portal: How And Why
 
From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...
From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...
From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...
 
Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...
Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...
Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...
 
Navigating Private Network Connectivity Options for Kafka Clusters
Navigating Private Network Connectivity Options for Kafka ClustersNavigating Private Network Connectivity Options for Kafka Clusters
Navigating Private Network Connectivity Options for Kafka Clusters
 
Apache Flink: Building a Company-wide Self-service Streaming Data Platform
Apache Flink: Building a Company-wide Self-service Streaming Data PlatformApache Flink: Building a Company-wide Self-service Streaming Data Platform
Apache Flink: Building a Company-wide Self-service Streaming Data Platform
 
Explaining How Real-Time GenAI Works in a Noisy Pub
Explaining How Real-Time GenAI Works in a Noisy PubExplaining How Real-Time GenAI Works in a Noisy Pub
Explaining How Real-Time GenAI Works in a Noisy Pub
 
TL;DR Kafka Metrics | Kafka Summit London
TL;DR Kafka Metrics | Kafka Summit LondonTL;DR Kafka Metrics | Kafka Summit London
TL;DR Kafka Metrics | Kafka Summit London
 
A Window Into Your Kafka Streams Tasks | KSL
A Window Into Your Kafka Streams Tasks | KSLA Window Into Your Kafka Streams Tasks | KSL
A Window Into Your Kafka Streams Tasks | KSL
 
Mastering Kafka Producer Configs: A Guide to Optimizing Performance
Mastering Kafka Producer Configs: A Guide to Optimizing PerformanceMastering Kafka Producer Configs: A Guide to Optimizing Performance
Mastering Kafka Producer Configs: A Guide to Optimizing Performance
 
Data Contracts Management: Schema Registry and Beyond
Data Contracts Management: Schema Registry and BeyondData Contracts Management: Schema Registry and Beyond
Data Contracts Management: Schema Registry and Beyond
 
Code-First Approach: Crafting Efficient Flink Apps
Code-First Approach: Crafting Efficient Flink AppsCode-First Approach: Crafting Efficient Flink Apps
Code-First Approach: Crafting Efficient Flink Apps
 
Debezium vs. the World: An Overview of the CDC Ecosystem
Debezium vs. the World: An Overview of the CDC EcosystemDebezium vs. the World: An Overview of the CDC Ecosystem
Debezium vs. the World: An Overview of the CDC Ecosystem
 
Beyond Tiered Storage: Serverless Kafka with No Local Disks
Beyond Tiered Storage: Serverless Kafka with No Local DisksBeyond Tiered Storage: Serverless Kafka with No Local Disks
Beyond Tiered Storage: Serverless Kafka with No Local Disks
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 

Stream processing IoT time series data with Kafka & InfluxDB | Al Sargent, InfluxData

  • 1. Al Sargent Sr. Director, Product InfluxData April 2021 Stream processing IoT time series data with Kafka & InfluxDB Mirek Malecha Product Manager Bonitoo April 2021
  • 2. © 2021 InfluxData. All rights reserved. 3 What is time series data?
  • 3. © 2021 InfluxData. All rights reserved. 4 Time series data is ‒ Sequence of data points. ‒ Successive measurements made from same source over a time interval. ‒ Plot the points on a graph and your X axis is time.
  • 4. © 2021 InfluxData. All rights reserved. 5 Example: Weather conditions
  • 5. © 2021 InfluxData. All rights reserved. 6 Example: Server monitoring
  • 6. © 2021 InfluxData. All rights reserved. 7 Example: Healthcare
  • 7. © 2021 InfluxData. All rights reserved. 8 What is a time series database?
  • 8. © 2021 InfluxData. All rights reserved. 9 Characteristics of the Data – All Time-stamped data – Generated in regular (Metric) and irregular (Event) time periods – Huge volumes of data – Real-time and time sensitive
  • 9. © 2021 InfluxData. All rights reserved. 10 Time Series databases: optimized for collecting, storing, retrieving & processing of time series data Compare this to: – Document databases – Optimized for JSON documents – Search databases – Optimized for full-text searches – Traditional relational – Databases optimized for the tabular storage of related data in rows & columns
  • 10. © 2021 InfluxData. All rights reserved. 11 Time-series use cases
  • 11. © 2021 InfluxData. All rights reserved. 12 IoT DevOps Monitoring Operations Analytics Industrial devices: factories, energy, vehicles, buildings, agriculture, etc. Consumer sensors: wearables, home appliances, health monitors Monitor the performance of servers, virtual machines, containers, and applications Track business, customer, financial and scientific metrics Primary Use Cases for time series data
  • 12. Delivered an Industrial IoT data historian that • provides automation and control of their oil drilling platforms • provides edge and centralized insight into emerging patterns by storing and analyzing all the sensor data derived from energy production sensors Internet of Things (IoT) IoT monitoring
  • 13. © 2020 InfluxData. All rights reserved. 15 InfluxData Time Series Data Platform Accumulate Act Analyze Flux joins MySQL, Postgres, RDS, etc. Telegraf plugins 200+ plugins Client libraries Python, Javascript, Java, Go... Prometheus scrapers FluentD 700+ plugins AWS, Google, Azure InfluxDB Cloud InfluxDB Enterprise InfluxDB Purpose-built Time Series Database Realtime Data Stream Processing Visualization & Dashboarding Data Analysis & Anomaly Detection Alerting & Notifications Metering & Billing InfluxDB Open Source (OSS) On-prem, self-managed cloud Alerting Systems PagerDuty Slack Webhooks Grafana Client Libraries CLI REST API
  • 14. © 2021 InfluxData. All rights reserved. 16 Simple IoT Solution
  • 15. © 2021 InfluxData. All rights reserved. 17 IoT Center • Simple demo application • Register, configure and monitor IoT devices • How to integrate InfluxDB • Write measurements • Query database • Manage InfluxDB • Based on Node.js and React • Use Kafka to write measurements • Virtual Device - emulates real devices • Help with links to source code - GIT • InfluxDB Cloud - No DB installation
  • 16. © 2021 InfluxData. All rights reserved. 18 IoT Center Functions ‒ Device Registration - register new IoT Devices ‒ Virtual Device - emulate IoT device ‒ Dashboard - show measured data from the IoT Devices
  • 17. © 2021 InfluxData. All rights reserved. 19 IoT Devices Registration Left menu ● Devices Registration
  • 18. © 2021 InfluxData. All rights reserved. 20 Virtual Device - Generate demo data Left menu ● Virtual Device Top screen ● Button with pencil
  • 19. © 2021 InfluxData. All rights reserved. 21 Visualisation Left Menu ● Dashboard Filters ● Device ● Time
  • 20. © 2021 InfluxData. All rights reserved. 22 IoT Center Architecture Configuration InfluxDB Cloud Time Series Database (or standalone InfluxDB) IoT Center IoT Devices InfluxDB JS Client Virtual Device Web Browser Measurements (temp, humidity, pressure, GPS, …) UI Kafka topic: iot Telegraf IoT Devices registration, Queries kafkajs
  • 21. © 2021 InfluxData. All rights reserved. 23 Arduino Python Java .NET Kafka Scalable component decoupling IoT layer from DB/Analytics layer IoT Center - virtual device ‒ KafkaJS client IoT devices - data flow const producer = kafka.producer() await producer.connect() await producer.send({ key: 'mykey', topic: KAFKA_TOPIC, messages: [{value: influxLineProtocolData}], compression: CompressionTypes.GZIP, }) IoT Device Kafka Telegraf MQTT Broker . . . 1 2 3
  • 22. © 2021 InfluxData. All rights reserved. 24 Telegraf A plugin-driven server agent collecting messages from Kafka into InfluxDB. 1. Download telegraf (Docker, Linux, Windows, macOS, ARM, ...) https://portal.influxdata.com/downloads/ 2. Update configuration file telegraf.conf (see the next slide) 3. Start it # telegraf --config telegraf.conf Kafka Telegraf IoT Devices
  • 23. © 2021 InfluxData. All rights reserved. 25 Telegraf.conf file Read data from Kafka https://github.com/influxdata/telegraf/tree/master/plugins/inputs/kafka_consumer Write to InfluxDB (replace fields by your account) Format options https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md ‒ Values, CSV, JSON, XML, InfluxDB Line Protocol, Collectd, Dropwizard, Graphite, Grok, Logfmt, Nagios, Prometheus, PrometheusRemoteWrite, Wavefront [[outputs.influxdb_v2]] urls = ["https://us-west-2-1.aws.cloud2.influxdata.com"] token = "heRbZX2n4kc8Q_jYPddwjkv3dAZRorNQnN67pMwKs1lGgbMW8vWRjAi7VvkUitQMii2XwJM9qX3cnK4oAZDIjg==" organization = "iot-center@bonitoo.io" bucket = "iot_center" [[inputs.kafka_consumer]] brokers = ["localhost:9092"] topics = ["iot"] data_format = "influx"
  • 24. © 2021 InfluxData. All rights reserved. 26 InfluxDB FREE Account https://cloud2.influxdata.com ‒ Data Explorer ‒ Dashboards ‒ Alerts ‒ Configuration Kafka Telegraf IoT Devices
  • 25. © 2021 InfluxData. All rights reserved. 27 Demo Kafka Telegraf Virtual Device
  • 26. © 2021 InfluxData. All rights reserved. 28 IoT Center - Source code https://github.com/bonitoo-io/iot-center-v2 ESP8266 and ESP32 devices Arduino Raspberry Pi Python Mobile application Flutter/Dart
  • 27. © 2021 InfluxData. All rights reserved. 29 Summary ‒ Time series data ‒ InfluxDB ‒ Highly scalable database ‒ Store & Analyze data ‒ CLI, API, Dashboards, Tasks, etc. ‒ Free cloud time-unlimited account ‒ Telegraf ‒ Reads Kafka messages ‒ Stores data into InfluxDB ‒ 200+ data inputs ‒ Configuration file, only 9 lines
  • 28. © 2021 InfluxData. All rights reserved. 30 influxdata.com/cloud