其他分享
首页 > 其他分享> > Influx DB first explore

Influx DB first explore

作者:互联网

Key characters:

   Store time series data:  

Serial data is more important than single data point:

Schemaless

Key concept:

Measurement:

Tag:

Field:

Retention policy:

Series:

The collection of data in the InfluxDB data structure that share a measurement, tag set, and retention policy. (not including fields)

Shard:

Special Features:

Continuous query:

Recommendation:

Limitations:

Installation:

version: '3.3'

services:
influxdb:
image: 'influxdb:1.7.8-alpine'
environment:
INFLUXDB_DB: monitordb
INFLUXDB_HTTP_AUTH_ENABLED: 'true'
INFLUXDB_ADMIN_USER: admin
INFLUXDB_ADMIN_PASSWORD: password
INFLUXDB_USER: influxuser
INFLUXDB_USER_PASSWORD: password

ports:
- "8086:8086"
- "8088:8088"

volumes:
- /opt/volumes/influxdb/data:/var/lib/influxdb

networks:
layer0:
aliases:
- 'influxdb'

labels:
- "dev.description=transaction monitoring influx db"

networks:
layer0:

Commandline:  
./usr/bin/influx -username 'admin' -password 'password'

Issues:

If data point's time is before retention policy's valid time range, inserting it will show error:  "partial write: points beyond retention policy dropped=1"

If data point is inserted with retention policy, querying the data should also set retention policy. Eg  "select * from ninetyday.test1", otherwise, no record will be found 

Batch processing uses a separate thread pool and data is send to server if data is accumulated until flush duration (1s) or buffer limit exceeded (10000 records).   Need to call InfluxDB.close after batch processing to ensure proper resource reclamation 

max-values-per-tag limit exceeded (100000/100000):   /etc/influxdb/influxdb.conf  max-values-per-tag = 0    or docker environment variable:  INFLUXDB_DATA_MAX_VALUES_PER_TAG: 0

Performance: 

Insertion: 

Query:

Insertion:

Query: 

标签:test1,ninetyday,takes,DB,explore,select,time,data,Influx
来源: https://blog.51cto.com/shadowisper/2462002