0% found this document useful (0 votes)
13 views

influxdb-introduction

InfluxDB is a time series database and application development platform that supports various programming languages and is optimized for storing and querying time series data. It offers three versions: Open Source, InfluxCloud, and InfluxEnterprise, catering to different user needs. The document also covers the data model, query language (InfluxQL and Flux), and the advantages of using InfluxDB for real-time data monitoring and visualization.

Uploaded by

eliezercunha256
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

influxdb-introduction

InfluxDB is a time series database and application development platform that supports various programming languages and is optimized for storing and querying time series data. It offers three versions: Open Source, InfluxCloud, and InfluxEnterprise, catering to different user needs. The document also covers the data model, query language (InfluxQL and Flux), and the advantages of using InfluxDB for real-time data monitoring and visualization.

Uploaded by

eliezercunha256
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

InfluxDB

Introduction to InfluxDB

KIT – Die Forschungsuniversität in der Helmholtz-Gemeinschaft www.kit.edu


Components of monitoring architecture

Data collection Data storage Data visualization

Queries the datasource


push data and it returns data

Logstash Beats

2 23.01.2023 Melanie Ernst – Introduction InfluxDB SCC


Agenda
What is InfluxDB?
Time Series Data and Databases
Data model of InfluxDB
Query languge flux

3 23.01.2023 Melanie Ernst – Introduction InfluxDB SCC


What is InfluxDB
InfluxDB, released in 2013, is a time series database

evolved into a time series application development platform

InfluxDB includes the InfluxDB User Interface (InfluxDB UI) and Flux

used for server monitoring, financial applications, customer facing IoT and many other
applications.

InfluxData Inc. → https://www.influxdata.com

written in Go programming language, also called Golang

supports many programming languages like Java, JavaScript, Perl, PHP, Python...

4 23.01.2023 Melanie Ernst – Introduction InfluxDB SCC


InfluxDB versions
InfluxData offers three different versions

InfluxDB: Open Source

InfluxCloud: fully customised and has a web-based user interface for the
data ingestion and visualization

InfluxEnterprise: installed on the server within a corporate network. It


provides maintenance agreements and special access controls for the
business customers

5 23.01.2023 Melanie Ernst – Introduction InfluxDB SCC


What are Time Series?

Time series data is a sequence of data points indexed in time order.

Data points typically consist of successive measurements made from the


same source and are used to track changes over time.

Examples: weather data, monitoring data, Stock prices...


everything that can be viewed over time!

6 23.01.2023 Melanie Ernst – Introduction InfluxDB SCC


What are Time-Series Databases

A time series database is defined as a database system optimised to


provide the time series data and its storage in association with the value
and time

Times series databases can ingest millions of data points per second,
resulting in high-level performance

7 23.01.2023 Melanie Ernst – Introduction InfluxDB SCC


Why use InfluxDB

storing large amounts of data


faster than traditional databases for time series data
Real-time data and parallel incoming data possible
Includes UI dashboards to see the data such as Chronograf, Grafana
It is easy to build, easy to share templates via influxdb templates
InfluxDB is a storage, ingest, query, and visualisation platform that you
can access through a unified API

8 23.01.2023 Melanie Ernst – Introduction InfluxDB SCC


Write data to Influx
InfluxDB provides many different options for ingesting or writing data,
including the following

Influx user interface


InfluxDB HTTP API
Influx Cli
Telegraf
InfluxDB client libraries

9 23.01.2023 Melanie Ernst – Introduction InfluxDB SCC


Data model

Bucket: Named location where time series data is stored


A bucket can contain multiple measurements.

Measurements: Logical grouping for time series data.


A measurement contains multiple tags and fields.

– Tag values → describe/identify the data points


– Field values → the actual measured values
– Timestamp → the time of the measurement

10 23.01.2023 Melanie Ernst – Introduction InfluxDB SCC


Data model example

name of the
Fields value(s) timestamp
measurement Tag values(s)

Temperatur,place=room1,sensor=1 temp=24.5 159345356

Temperatur,place=room2,sensor=1 temp=20,5 159345350


Temperatur,place=room2 temp=20,5 159345350
11 23.01.2023 Melanie Ernst – Introduction InfluxDB SCC
Query Language
InfluxQL
for the first version of InfluxDB
SQL-like query language

Flux
Since version 1.8
a functional data scripting language designed for querying, processing,
writing, analyzing, and acting on data
based on JavaScript
published by InfluxData on GitHub as an open-source project

12 23.01.2023 Melanie Ernst – Introduction InfluxDB SCC


Flux Query
A Flux query does the following:

- Retrieves a specified amount of data from a source.


- Filters data based on time or column values.
- Processes and shapes data into expected results.
- Returns the result.
from(bucket: "example-bucket")
|> range(start: -1d)
|> filter(fn: (r) => r._measurement == "example-measurement")
|> mean()
|> yield(name: "_results")

13 23.01.2023 Melanie Ernst – Introduction InfluxDB SCC


Flux Query
When querying InfluxDB with Flux, there are three primary functions:

from(): Queries data from an InfluxDB bucket.

range(): Filters data based on time bounds. Flux requires


“bounded” queries - queries limited to a specific time range.

filter(): Filters data based on column values.


multiple filters possible

More functions: https://docs.influxdata.com/flux/v0.x/stdlib

14 23.01.2023 Melanie Ernst – Introduction InfluxDB SCC


Examples of time ranges
Query a time range relative to now

from(bucket: "example-bucket")
|> range(start: -12h)

Query an absolute time range


from(bucket: "example-bucket")
|> range(start: 2021-05-22T23:30:00Z, stop: 2021-05-23T00:00:00Z)

Query an absolute time range using Unix timestamps


from(bucket: "example-bucket")
|> range(start: 1621726200, stop: 1621728000)

15 23.01.2023 Melanie Ernst – Introduction InfluxDB SCC


Links
https://www.influxdata.com/products/influxdb-overview/

Dokumentation:
https://docs.influxdata.com/influxdb/v2.6/

Free courses:
https://university.influxdata.com/catalog/

InfluxData community
https://community.influxdata.com

16 23.01.2023 Melanie Ernst – Introduction InfluxDB SCC

You might also like