代码拉取完成,页面将自动刷新
# 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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。