· 6 years ago · Oct 12, 2019, 06:10 PM
1{
2 "annotations": {
3 "list": [
4 {
5 "builtIn": 1,
6 "datasource": "-- Grafana --",
7 "enable": true,
8 "hide": true,
9 "iconColor": "rgba(0, 211, 255, 1)",
10 "name": "Annotations & Alerts",
11 "type": "dashboard"
12 }
13 ]
14 },
15 "editable": true,
16 "gnetId": null,
17 "graphTooltip": 0,
18 "links": [],
19 "panels": [
20 {
21 "alert": {
22 "conditions": [
23 {
24 "evaluator": {
25 "params": [
26 800
27 ],
28 "type": "gt"
29 },
30 "operator": {
31 "type": "and"
32 },
33 "query": {
34 "params": [
35 "B",
36 "5m",
37 "now"
38 ]
39 },
40 "reducer": {
41 "params": [],
42 "type": "count"
43 },
44 "type": "query"
45 }
46 ],
47 "executionErrorState": "alerting",
48 "for": "5m",
49 "frequency": "1m",
50 "handler": 1,
51 "message": "3c71bfffa9c4",
52 "name": "api",
53 "noDataState": "no_data",
54 "notifications": [
55 {
56 "uid": "3c71bfffa9c4"
57 },
58 {
59 "uid": "api"
60 }
61 ]
62 },
63 "aliasColors": {
64 "not_present": "red"
65 },
66 "bars": false,
67 "dashLength": 10,
68 "dashes": false,
69 "description": "",
70 "fill": 1,
71 "gridPos": {
72 "h": 12,
73 "w": 24,
74 "x": 0,
75 "y": 0
76 },
77 "id": 2,
78 "legend": {
79 "avg": false,
80 "current": false,
81 "max": false,
82 "min": false,
83 "show": true,
84 "total": false,
85 "values": false
86 },
87 "lines": true,
88 "linewidth": 1,
89 "links": [],
90 "nullPointMode": "connected",
91 "options": {},
92 "percentage": false,
93 "pointradius": 2,
94 "points": false,
95 "renderer": "flot",
96 "seriesOverrides": [],
97 "spaceLength": 10,
98 "stack": false,
99 "steppedLine": false,
100 "targets": [
101 {
102 "alias": "present",
103 "groupBy": [
104 {
105 "params": [
106 "$__interval"
107 ],
108 "type": "time"
109 },
110 {
111 "params": [
112 "none"
113 ],
114 "type": "fill"
115 }
116 ],
117 "measurement": "metrics",
118 "orderByTime": "ASC",
119 "policy": "default",
120 "query": "SELECT count(\"co2\") FROM \"metrics\" WHERE (\"mac\" = '\"3c71bfffa9c4\"' AND \"present\" = '\"1\"') AND $timeFilter GROUP BY time($__interval) fill(linear)",
121 "rawQuery": false,
122 "refId": "A",
123 "resultFormat": "time_series",
124 "select": [
125 [
126 {
127 "params": [
128 "value"
129 ],
130 "type": "field"
131 },
132 {
133 "params": [],
134 "type": "last"
135 }
136 ]
137 ],
138 "tags": [
139 {
140 "key": "mac",
141 "operator": "=",
142 "value": "3c71bfffa9c4"
143 },
144 {
145 "condition": "AND",
146 "key": "present",
147 "operator": "=",
148 "value": "1"
149 }
150 ]
151 },
152 {
153 "alias": "not_present",
154 "groupBy": [
155 {
156 "params": [
157 "$__interval"
158 ],
159 "type": "time"
160 },
161 {
162 "params": [
163 "linear"
164 ],
165 "type": "fill"
166 }
167 ],
168 "measurement": "metrics",
169 "orderByTime": "ASC",
170 "policy": "default",
171 "refId": "B",
172 "resultFormat": "time_series",
173 "select": [
174 [
175 {
176 "params": [
177 "value"
178 ],
179 "type": "field"
180 },
181 {
182 "params": [],
183 "type": "last"
184 }
185 ]
186 ],
187 "tags": [
188 {
189 "key": "mac",
190 "operator": "=",
191 "value": "3c71bfffa9c4"
192 },
193 {
194 "condition": "AND",
195 "key": "present",
196 "operator": "=",
197 "value": "0"
198 }
199 ]
200 }
201 ],
202 "thresholds": [
203 {
204 "colorMode": "critical",
205 "fill": true,
206 "line": true,
207 "op": "gt",
208 "value": 800,
209 "yaxis": "left"
210 }
211 ],
212 "timeFrom": null,
213 "timeRegions": [],
214 "timeShift": null,
215 "title": "Device 3c71bfffa9c4",
216 "tooltip": {
217 "shared": true,
218 "sort": 0,
219 "value_type": "individual"
220 },
221 "type": "graph",
222 "xaxis": {
223 "buckets": null,
224 "mode": "time",
225 "name": null,
226 "show": true,
227 "values": []
228 },
229 "yaxes": [
230 {
231 "format": "ppm",
232 "label": "CO2",
233 "logBase": 1,
234 "max": null,
235 "min": null,
236 "show": true
237 },
238 {
239 "format": "short",
240 "label": "",
241 "logBase": 1,
242 "max": null,
243 "min": null,
244 "show": true
245 }
246 ],
247 "yaxis": {
248 "align": false,
249 "alignLevel": null
250 }
251 }
252 ],
253 "refresh": "5s",
254 "schemaVersion": 18,
255 "style": "dark",
256 "tags": [],
257 "templating": {
258 "list": []
259 },
260 "time": {
261 "from": "now-5m",
262 "to": "now"
263 },
264 "timepicker": {
265 "refresh_intervals": [
266 "5s",
267 "10s",
268 "30s",
269 "1m",
270 "5m",
271 "15m",
272 "30m",
273 "1h",
274 "2h",
275 "1d"
276 ],
277 "time_options": [
278 "5m",
279 "15m",
280 "1h",
281 "6h",
282 "12h",
283 "24h",
284 "2d",
285 "7d",
286 "30d"
287 ]
288 },
289 "timezone": "",
290 "title": "3c71bfffa9c4",
291 "uid": "3c71bfffa9c4",
292 "version": 1
293}