3 Star 0 Fork 0

mirrors_influxdata/InfluxDB-Roadshow-Training

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
scratchpad.txt 1.72 KB
一键复制 编辑 原始数据 按行查看 历史
Jay Clifford 提交于 2022-06-30 11:10 . updated scratchpad
# InfluxDB Roadshow Training
## Step 2
docker build generator_simulator/. -t emergency-generator:latest
## Step 3
docker-compose up -d
Admin Token: edge
## Step 4
influx config create \
--config-name trainingedge \
--host-url http://localhost:8086 \
--org influxroadshow \
--token edge \
--active
## Step 5
influx bucket list
## Step 6
influx auth create --write-bucket <INSERT_BUCKET_ID>
## Step 7
Write Token:
## Step 11
Name: local
Host: http://localhost:8086
Org: influxroadshow
Token: edge
## Step 14
topics = ["emergency_generator/#"]
## Step 15
[[inputs.mqtt_consumer.json_v2]]
measurement_name = "genData"
[[inputs.mqtt_consumer.json_v2.object]]
path = "@this"
disable_prepend_keys = true
tags = ["generatorID"]
## Step 16
token = “<WRITE_TOKEN>”
## Step 17
docker container restart influxdb-roadshow-training-telegraf-1
## Step 18
influx query 'from(bucket:"generators")|>range(start:-1h)'
## Step 20
Name: downsampled
Delete data: 7 days
## Step 22
Name: downsample
Every: 1m
Offset 5s
## Step 23
import "influxdata/influxdb/tasks"
option task = {name: "downsample", every: 1m, offset: 5s}
from(bucket: "generators")
|> range(start: tasks.lastSuccess(orTime: -1h))
|> aggregateWindow(every: 1m, fn: last, createEmpty: false)
|> to(bucket: "downsampled")
## Step 25
Name: northbound
Delete data: 30 days
northbound Bucket ID:
northbound Bucket Token:
## Step 27
downsampled bucket ID:
## Step 28
influx remote create --name cloud --remote-url https://us-east-1-1.aws.cloud2.influxdata.com --remote-org-id <> --remote-api-token <>
remote-ID:
## Step 29
influx replication create --local-bucket-id <> --remote-bucket-id <> --remote-id <> --name edge_to_cloud
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors_influxdata/InfluxDB-Roadshow-Training.git
git@gitee.com:mirrors_influxdata/InfluxDB-Roadshow-Training.git
mirrors_influxdata
InfluxDB-Roadshow-Training
InfluxDB-Roadshow-Training
master

搜索帮助