InfluxDB

Influxdb - 简单介绍

2019-09-17  本文已影响0人  红薯爱帅

1. 时序数据库TSDB

1.1. 时序数据

image.png

1.2. 时序数据库

image.png
image.png

2. Influxdb介绍

2.1. 优势

2.2. 哪些公司在使用

image.png

2.3. Evolution and Thinks

Evolution

Some Thinks

2.4. Goal:高效写入,高压缩比

删除功能,不能只根据tag删除,须携带timestamp筛选删除
更新功能,不支持update,可以通过insert相同timestamp的数据点

2.5. Terms

image.png image.png

2.6. Functions

image.png

2.7. Continuous Queries and Retention Policies

2.8. Test Case

数据

以10秒的间隔,来追踪餐厅通过电话和网站订购食品的订单数量。我们会把这些数据存在food_data数据库里,其measurement为orders,fields分别为phone和website,如图所示。


image.png

问题

假定在长时间的运行中,我们只关心每三十分钟通过手机和网站订购的平均数量,我们希望用RPs和CQs实现下面的需求:

Answer

CREATE DATABASE "food_data"
CREATE RETENTION POLICY "two_hours" ON "food_data" DURATION 2h REPLICATION 1 DEFAULT
CREATE RETENTION POLICY "a_year" ON "food_data" DURATION 52w REPLICATION 1
CREATE CONTINUOUS QUERY "cq_30m" ON "food_data" BEGIN
SELECT mean("website") AS "mean_website",mean("phone") AS "mean_phone"
INTO "a_year"."downsampled_orders"
FROM "orders"
GROUP BY time(30m)
END
INSERT orders phone=10,website=30   ...

在orders里面是10秒钟间隔的裸数据,保存时间为2小时
在downsampled_orders里面是30分钟的聚合数据,保存时间为52周

2.9. Hardware sizing guidelines

image.png

3. The eco-system for InfluxDB

TICK

3.1. Telegraf

Telegraf is the open source server agent to help you collect metrics from your stacks, sensors and systems.

3.2. StatsD

A network daemon that runs on the Node.js platform and listens for statistics, like counters and timers, sent over UDP or TCP and sends aggregates to one or more pluggable backend services (e.g., Graphite).

3.3. Chronograf

Chronograf is the user interface and administrative component of the InfluxDB 1.x platform.

image.png image.png

3.4. Grafana

The open platform for beautiful analytics and monitoring.

4. Refers

上一篇 下一篇

猜你喜欢

热点阅读