forked from influxdata/community-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathiot_center.yml
263 lines (263 loc) · 8.64 KB
/
iot_center.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
apiVersion: influxdata.com/v2alpha1
kind: Label
metadata:
name: tender-booth-bd5001
spec:
color: '#be2ee4'
name: IoT
---
apiVersion: influxdata.com/v2alpha1
kind: Bucket
metadata:
name: inspiring-tesla-bd5001
spec:
name: iot_center
retentionRules:
- everySeconds: 2.592e+06
type: expire
---
apiVersion: influxdata.com/v2alpha1
kind: Variable
metadata:
name: suspicious-mahavira-fd5001
spec:
language: flux
name: IoT_Device
query: "import \"influxdata/influxdb/v1\"\r\nv1.tagValues(bucket: \"iot_center\",
tag: \"clientId\")"
type: query
---
apiVersion: influxdata.com/v2alpha1
kind: Dashboard
metadata:
name: elated-wescoff-7d5001
spec:
charts:
- colors:
- hex: '#00C9FF'
id: "0"
name: laser
type: min
value: -30
- hex: '#BF3D5E'
id: "1"
name: ruby
type: max
value: 60
decimalPlaces: 2
height: 5
kind: Gauge
name: Actual Temperature
queries:
- query: "from(bucket: \"iot_center\")\n |> range(start: v.timeRangeStart,
stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"]
== \"environment\")\n |> filter(fn: (r) => r[\"_field\"] == \"Temperature\")\n
\ |> filter(fn: (r) => r[\"clientId\"] == v.IoT_Device) \n |> aggregateWindow(every:
v.windowPeriod, fn: last, createEmpty: false)\n |> yield(name: \"last\")"
suffix: ' °C'
width: 5
- axes:
- base: "10"
name: x
scale: linear
- base: "10"
label: Temperature °C
name: y
scale: linear
colors:
- hex: '#31C0F6'
id: 024cd205-6cf6-4aa2-b6da-d8d052bb1f9b
name: Nineteen Eighty Four
type: scale
- hex: '#A500A5'
id: c5472a5f-6349-40a2-9374-d7eaca9864e8
name: Nineteen Eighty Four
type: scale
- hex: '#FF7E27'
id: 355ddac5-4625-49f7-aa78-00202e3e51c4
name: Nineteen Eighty Four
type: scale
geom: line
height: 4
kind: Xy
name: Temperature
position: overlaid
queries:
- query: "from(bucket: \"iot_center\")\n |> range(start: v.timeRangeStart,
stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"]
== \"environment\")\n |> filter(fn: (r) => r[\"_field\"] == \"Temperature\")\n
\ |> filter(fn: (r) => r[\"clientId\"] == v.IoT_Device) \n |> aggregateWindow(every:
v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")"
shade: true
width: 12
xCol: _time
yCol: _value
yPos: 5
- axes:
- base: "10"
name: x
scale: linear
- base: "10"
label: Humidity %
name: y
scale: linear
colors:
- hex: '#31C0F6'
id: 024cd205-6cf6-4aa2-b6da-d8d052bb1f9b
name: Nineteen Eighty Four
type: scale
- hex: '#A500A5'
id: c5472a5f-6349-40a2-9374-d7eaca9864e8
name: Nineteen Eighty Four
type: scale
- hex: '#FF7E27'
id: 355ddac5-4625-49f7-aa78-00202e3e51c4
name: Nineteen Eighty Four
type: scale
geom: line
height: 4
kind: Xy
name: Humidity
position: overlaid
queries:
- query: "from(bucket: \"iot_center\")\n |> range(start: v.timeRangeStart,
stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"]
== \"environment\")\n |> filter(fn: (r) => r[\"_field\"] == \"Humidity\")\n
\ |> filter(fn: (r) => r[\"clientId\"] == v.IoT_Device) \n |> aggregateWindow(every:
v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")"
width: 12
xCol: _time
yCol: _value
yPos: 9
- axes:
- base: "10"
name: x
scale: linear
- base: "10"
label: Pressure hPa
name: y
scale: linear
colors:
- hex: '#31C0F6'
id: 024cd205-6cf6-4aa2-b6da-d8d052bb1f9b
name: Nineteen Eighty Four
type: scale
- hex: '#A500A5'
id: c5472a5f-6349-40a2-9374-d7eaca9864e8
name: Nineteen Eighty Four
type: scale
- hex: '#FF7E27'
id: 355ddac5-4625-49f7-aa78-00202e3e51c4
name: Nineteen Eighty Four
type: scale
geom: line
height: 4
kind: Xy
name: Pressure
position: overlaid
queries:
- query: "from(bucket: \"iot_center\")\n |> range(start: v.timeRangeStart,
stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"]
== \"environment\")\n |> filter(fn: (r) => r[\"_field\"] == \"Pressure\")\n
\ |> filter(fn: (r) => r[\"clientId\"] == v.IoT_Device) \n |> aggregateWindow(every:
v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")"
width: 12
xCol: _time
yCol: _value
yPos: 13
- axes:
- base: "10"
name: x
scale: linear
- base: "10"
label: CO2 ppm
name: y
scale: linear
colors:
- hex: '#31C0F6'
id: 024cd205-6cf6-4aa2-b6da-d8d052bb1f9b
name: Nineteen Eighty Four
type: scale
- hex: '#A500A5'
id: c5472a5f-6349-40a2-9374-d7eaca9864e8
name: Nineteen Eighty Four
type: scale
- hex: '#FF7E27'
id: 355ddac5-4625-49f7-aa78-00202e3e51c4
name: Nineteen Eighty Four
type: scale
geom: line
height: 4
kind: Xy
name: CO2
position: overlaid
queries:
- query: "from(bucket: \"iot_center\")\n |> range(start: v.timeRangeStart,
stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"]
== \"environment\")\n |> filter(fn: (r) => r[\"_field\"] == \"CO2\")\n
\ |> filter(fn: (r) => r[\"clientId\"] == v.IoT_Device) \n |> aggregateWindow(every:
v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")"
width: 12
xCol: _time
yCol: _value
yPos: 17
- axes:
- base: "10"
name: x
scale: linear
- base: "10"
label: TVOC ppb
name: y
scale: linear
colors:
- hex: '#31C0F6'
id: 024cd205-6cf6-4aa2-b6da-d8d052bb1f9b
name: Nineteen Eighty Four
type: scale
- hex: '#A500A5'
id: c5472a5f-6349-40a2-9374-d7eaca9864e8
name: Nineteen Eighty Four
type: scale
- hex: '#FF7E27'
id: 355ddac5-4625-49f7-aa78-00202e3e51c4
name: Nineteen Eighty Four
type: scale
geom: line
height: 4
kind: Xy
name: TVOC
position: overlaid
queries:
- query: "from(bucket: \"iot_center\")\n |> range(start: v.timeRangeStart,
stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"]
== \"environment\")\n |> filter(fn: (r) => r[\"_field\"] == \"TVOC\")\n
\ |> filter(fn: (r) => r[\"clientId\"] == v.IoT_Device) \n |> aggregateWindow(every:
v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")"
width: 12
xCol: _time
yCol: _value
yPos: 21
- colors:
- hex: '#00C9FF'
id: "0"
name: laser
type: min
- hex: '#BF3D5E'
id: "1"
name: ruby
type: max
value: 100
decimalPlaces: 2
height: 5
kind: Gauge
name: Actual Humidity
queries:
- query: "from(bucket: \"iot_center\")\n |> range(start: v.timeRangeStart,
stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"]
== \"environment\")\n |> filter(fn: (r) => r[\"_field\"] == \"Humidity\")\n
\ |> filter(fn: (r) => r[\"clientId\"] == v.IoT_Device) \n |> aggregateWindow(every:
v.windowPeriod, fn: last, createEmpty: false)\n |> yield(name: \"last\")"
suffix: ' %'
width: 5
xPos: 5
name: IoT Center