InfluxDB
TSDB: Time Series Database
Golang binary
Internal "TSM engine": high ingest speed, high data compression
Continuous queries
InfluxQL is SQL-compatible
Concepts
An InfluxDB database has fields (K/V, the value is typed). Fields are NOT indexed. But we can attach tags which are indexed.
DB Example
DB: TEST | (field1) request duration | (field2) url | (tag) uuid |
---|---|---|---|
T1 | 200ms | /a?param=1 | uuid1 |
T2 | 220ms | /d | uuid2 |
T3 | 1219ms | /a | uuid1 |
Request: select from test where uuid = 'uuid1'
measurement = group of fields and tags ~ SQL DB table
series = a part of a measurement where tag and field key are constant
series example
DB: TEST | (field1) request duration | (field2) url | (tag) uuid |
---|---|---|---|
T1 | 200ms | /a?param=1 | uuid1 |
T3 | 1219ms | /a | uuid1 |
Design
- schema
- cardinality max
Setup
influxd
is the databaseinflux
is the CLI client
docker exec -it <mycontainer> influx
> create database example
> use example
> show measurements
Debug
http localhost:8080/debug/vars | jq '."database:mydatabase"'