diff --git a/dashboards/iot/airgradient.json b/dashboards/iot/airgradient.json index f1bc4ac..13120e4 100644 --- a/dashboards/iot/airgradient.json +++ b/dashboards/iot/airgradient.json @@ -18,19 +18,6 @@ "editable": false, "graphTooltip": 0, "panels": [ - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 6, - "panels": [], - "title": "", - "type": "row" - }, { "datasource": { "type": "prometheus", @@ -45,14 +32,15 @@ "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", + "axisGridShow": false, "axisLabel": "", "axisPlacement": "auto", - "axisSoftMax": 30, - "axisSoftMin": 20, + "axisSoftMax": 35, + "axisSoftMin": 10, "barAlignment": 0, "barWidthFactor": 0.6, "drawStyle": "line", - "fillOpacity": 10, + "fillOpacity": 0, "gradientMode": "opacity", "hideFrom": { "legend": false, @@ -61,7 +49,7 @@ }, "insertNulls": false, "lineInterpolation": "smooth", - "lineWidth": 2, + "lineWidth": 4, "pointSize": 5, "scaleDistribution": { "type": "linear" @@ -73,10 +61,12 @@ "mode": "none" }, "thresholdsStyle": { - "mode": "off" + "mode": "area" } }, "mappings": [], + "max": 35, + "min": 10, "thresholds": { "mode": "absolute", "steps": [ @@ -99,9 +89,9 @@ }, "gridPos": { "h": 8, - "w": 12, + "w": 9, "x": 0, - "y": 1 + "y": 0 }, "id": 2, "options": { @@ -127,7 +117,7 @@ "editorMode": "code", "expr": "avg_over_time(atmp{id=\"$id\"}[$__interval])", "instant": false, - "legendFormat": "{{sensor_location}}", + "legendFormat": "{{id}}", "range": true, "refId": "A" } @@ -135,6 +125,149 @@ "title": "Temperature", "type": "timeseries" }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "max": 35, + "min": 10, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "blue" + }, + { + "color": "green", + "value": 15 + }, + { + "color": "red", + "value": 30 + } + ] + }, + "unit": "celsius" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 3, + "x": 9, + "y": 0 + }, + "id": 7, + "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "auto", + "reduceOptions": { + "calcs": ["lastNotNull"], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "sizing": "auto" + }, + "pluginVersion": "12.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "avg_over_time(atmp{id=\"$id\"}[$__interval])", + "instant": false, + "legendFormat": "{{sensor_location}}", + "range": true, + "refId": "A" + } + ], + "title": "Temperature", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [], + "max": 70, + "min": 20, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "blue" + }, + { + "color": "green", + "value": 30 + }, + { + "color": "red", + "value": 60 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 3, + "x": 12, + "y": 0 + }, + "id": 8, + "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "auto", + "reduceOptions": { + "calcs": ["lastNotNull"], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "sizing": "auto" + }, + "pluginVersion": "12.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "avg_over_time(rhum{id=\"$id\"}[$__interval])", + "instant": false, + "legendFormat": "{{sensor_location}}", + "range": true, + "refId": "A" + } + ], + "title": "Relative Humidity", + "type": "gauge" + }, { "datasource": { "type": "prometheus", @@ -149,15 +282,16 @@ "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", + "axisGridShow": false, "axisLabel": "", "axisPlacement": "auto", - "axisSoftMax": 60, - "axisSoftMin": 30, + "axisSoftMax": 70, + "axisSoftMin": 20, "barAlignment": 0, "barWidthFactor": 0.6, "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "opacity", + "fillOpacity": 0, + "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, @@ -165,7 +299,7 @@ }, "insertNulls": false, "lineInterpolation": "smooth", - "lineWidth": 2, + "lineWidth": 4, "pointSize": 5, "scaleDistribution": { "type": "linear" @@ -177,9 +311,10 @@ "mode": "none" }, "thresholdsStyle": { - "mode": "off" + "mode": "area" } }, + "decimals": 0, "mappings": [], "thresholds": { "mode": "absolute", @@ -203,9 +338,9 @@ }, "gridPos": { "h": 8, - "w": 12, - "x": 12, - "y": 1 + "w": 9, + "x": 15, + "y": 0 }, "id": 5, "options": { @@ -231,7 +366,7 @@ "editorMode": "code", "expr": "avg_over_time(rhum{id=\"$id\"}[$__interval])", "instant": false, - "legendFormat": "{{sensor_location}}", + "legendFormat": "{{id}}", "range": true, "refId": "A" } @@ -254,14 +389,15 @@ "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", + "axisGridShow": false, "axisLabel": "", "axisPlacement": "auto", - "axisSoftMax": 2500, - "axisSoftMin": 100, + "axisSoftMax": 3000, + "axisSoftMin": 0, "barAlignment": 0, "barWidthFactor": 0.6, "drawStyle": "line", - "fillOpacity": 10, + "fillOpacity": 0, "gradientMode": "opacity", "hideFrom": { "legend": false, @@ -270,7 +406,7 @@ }, "insertNulls": false, "lineInterpolation": "smooth", - "lineWidth": 2, + "lineWidth": 4, "pointSize": 5, "scaleDistribution": { "type": "linear" @@ -282,10 +418,12 @@ "mode": "none" }, "thresholdsStyle": { - "mode": "line" + "mode": "area" } }, "mappings": [], + "max": 3000, + "min": 0, "thresholds": { "mode": "absolute", "steps": [ @@ -320,9 +458,9 @@ }, "gridPos": { "h": 8, - "w": 12, + "w": 9, "x": 0, - "y": 9 + "y": 8 }, "id": 1, "options": { @@ -348,7 +486,7 @@ "editorMode": "code", "expr": "rco2{id=\"$id\"}", "instant": false, - "legendFormat": "{{sensor_location}}", + "legendFormat": "{{id}}", "range": true, "refId": "A" } @@ -356,6 +494,90 @@ "title": "CO2 PPM", "type": "timeseries" }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "max": 3000, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green" + }, + { + "color": "green", + "value": 100 + }, + { + "color": "yellow", + "value": 450 + }, + { + "color": "orange", + "value": 650 + }, + { + "color": "dark-orange", + "value": 800 + }, + { + "color": "semi-dark-red", + "value": 1000 + } + ] + }, + "unit": "ppm" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 3, + "x": 9, + "y": 8 + }, + "id": 10, + "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "auto", + "reduceOptions": { + "calcs": ["lastNotNull"], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "sizing": "auto" + }, + "pluginVersion": "12.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rco2{id=\"$id\"}", + "instant": false, + "legendFormat": "{{sensor_location}}", + "range": true, + "refId": "A" + } + ], + "title": "CO2 PPM", + "type": "gauge" + }, { "datasource": { "type": "prometheus", @@ -365,45 +587,11 @@ "fieldConfig": { "defaults": { "color": { - "mode": "thresholds", - "seriesBy": "last" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "axisSoftMax": 20, - "axisSoftMin": 0, - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "smooth", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "line" - } + "mode": "thresholds" }, "mappings": [], + "max": 20, + "min": 0, "thresholds": { "mode": "absolute", "steps": [ @@ -434,9 +622,131 @@ }, "gridPos": { "h": 8, - "w": 12, + "w": 3, "x": 12, - "y": 9 + "y": 8 + }, + "id": 9, + "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "auto", + "reduceOptions": { + "calcs": ["lastNotNull"], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "sizing": "auto" + }, + "pluginVersion": "12.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "clamp_min(pm02{id=\"$id\"}, 0)", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "{{id}}", + "range": true, + "refId": "A", + "useBackend": false + } + ], + "title": "Particulate Matter", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "PM2.5 describes fine inhalable particles, with diameters that are generally 2.5 micrometers and smaller.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds", + "seriesBy": "last" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisGridShow": false, + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 20, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 4, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "area" + } + }, + "decimals": 0, + "mappings": [], + "max": 20, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "dark-green", + "value": 0 + }, + { + "color": "dark-yellow", + "value": 5 + }, + { + "color": "dark-orange", + "value": 15 + }, + { + "color": "dark-red", + "value": 30 + } + ] + }, + "unit": "conμgm3" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 9, + "x": 15, + "y": 8 }, "id": 3, "options": { @@ -459,12 +769,16 @@ "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "editorMode": "code", - "expr": "pm02{id=\"$id\"}", + "disableTextWrap": false, + "editorMode": "builder", + "expr": "clamp_min(pm02{id=\"$id\"}, 0)", + "fullMetaSearch": false, + "includeNullMetadata": true, "instant": false, - "legendFormat": "{{sensor_location}}", + "legendFormat": "{{id}}", "range": true, - "refId": "A" + "refId": "A", + "useBackend": false } ], "title": "Particulate Matter",