From 5f64d4ebb1f145528c95caace465112f243af7f5 Mon Sep 17 00:00:00 2001 From: acocalypso Date: Thu, 8 Jul 2021 22:29:55 +0200 Subject: [PATCH 1/2] Fix device Dashboard Fixed device total uptime in grafana 8 --- grafana/dashboards/device_dashboard.json | 3408 +--------------------- 1 file changed, 86 insertions(+), 3322 deletions(-) diff --git a/grafana/dashboards/device_dashboard.json b/grafana/dashboards/device_dashboard.json index 4e22e38..6ac8232 100644 --- a/grafana/dashboards/device_dashboard.json +++ b/grafana/dashboards/device_dashboard.json @@ -15,3351 +15,99 @@ "editable": true, "gnetId": null, "graphTooltip": 0, - "iteration": 1580387736814, + "id": 82, + "iteration": 1625776119645, "links": [], "panels": [ { - "cacheTimeout": null, - "datasource": null, - "gridPos": { - "h": 4, - "w": 4, - "x": 12, - "y": 0 - }, - "id": 80, - "links": [], - "maxPerRow": 6, - "options": { - "colorMode": "background", - "fieldOptions": { - "calcs": [ - "last" - ], - "defaults": { - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - }, - { - "id": 1, - "op": "=", - "text": "UP", - "type": 1, - "value": "1" - }, - { - "id": 2, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "0" - } - ], - "max": 2, - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "rgb(31, 214, 77)", - "value": 0.5 - } - ] - }, - "title": "$device", - "unit": "none" - }, - "overrides": [], - "values": false - }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal" - }, - "pluginVersion": "6.6.0", - "repeat": null, - "repeatDirection": "h", - "repeatIteration": 1580387736814, - "repeatPanelId": 2, - "scopedVars": { - "device": { - "selected": false, - "text": "moto08", - "value": "moto08" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": false, - "rawSql": "SELECT\n timestamp AS \"time\",\n value\nFROM device_data\nWHERE\n $__timeFilter(timestamp) AND\n device = $device\nORDER BY timestamp", - "refId": "A", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "column" - } - ] - ], - "table": "device_data", - "timeColumn": "timestamp", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - }, - { - "datatype": "varchar", - "name": "", - "params": [ - "device", - "=", - "$device" - ], - "type": "expression" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": null, - "gridPos": { - "h": 4, - "w": 4, - "x": 16, - "y": 0 - }, - "id": 81, - "links": [], - "maxPerRow": 6, - "options": { - "colorMode": "background", - "fieldOptions": { - "calcs": [ - "last" - ], - "defaults": { - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - }, - { - "id": 1, - "op": "=", - "text": "UP", - "type": 1, - "value": "1" - }, - { - "id": 2, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "0" - } - ], - "max": 2, - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "rgb(31, 214, 77)", - "value": 0.5 - } - ] - }, - "title": "$device", - "unit": "none" - }, - "overrides": [], - "values": false - }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal" - }, - "pluginVersion": "6.6.0", - "repeat": null, - "repeatDirection": "h", - "repeatIteration": 1580387736814, - "repeatPanelId": 2, - "scopedVars": { - "device": { - "selected": false, - "text": "s7", - "value": "s7" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": false, - "rawSql": "SELECT\n timestamp AS \"time\",\n value\nFROM device_data\nWHERE\n $__timeFilter(timestamp) AND\n device = $device\nORDER BY timestamp", - "refId": "A", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "column" - } - ] - ], - "table": "device_data", - "timeColumn": "timestamp", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - }, - { - "datatype": "varchar", - "name": "", - "params": [ - "device", - "=", - "$device" - ], - "type": "expression" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": null, - "gridPos": { - "h": 4, - "w": 4, - "x": 20, - "y": 0 - }, - "id": 82, - "links": [], - "maxPerRow": 6, - "options": { - "colorMode": "background", - "fieldOptions": { - "calcs": [ - "last" - ], - "defaults": { - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - }, - { - "id": 1, - "op": "=", - "text": "UP", - "type": 1, - "value": "1" - }, - { - "id": 2, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "0" - } - ], - "max": 2, - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "rgb(31, 214, 77)", - "value": 0.5 - } - ] - }, - "title": "$device", - "unit": "none" - }, - "overrides": [], - "values": false - }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal" - }, - "pluginVersion": "6.6.0", - "repeat": null, - "repeatDirection": "h", - "repeatIteration": 1580387736814, - "repeatPanelId": 2, - "scopedVars": { - "device": { - "selected": false, - "text": "s71", - "value": "s71" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": false, - "rawSql": "SELECT\n timestamp AS \"time\",\n value\nFROM device_data\nWHERE\n $__timeFilter(timestamp) AND\n device = $device\nORDER BY timestamp", - "refId": "A", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "column" - } - ] - ], - "table": "device_data", - "timeColumn": "timestamp", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - }, - { - "datatype": "varchar", - "name": "", - "params": [ - "device", - "=", - "$device" - ], - "type": "expression" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "stat" - }, - { - "collapsed": false, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 4 - }, - "id": 52, - "panels": [], - "title": "Devices", - "type": "row" - }, - { - "cacheTimeout": null, - "datasource": null, - "gridPos": { - "h": 4, - "w": 4, - "x": 0, - "y": 5 - }, - "id": 2, - "links": [], - "maxPerRow": 6, - "options": { - "colorMode": "background", - "fieldOptions": { - "calcs": [ - "last" - ], - "defaults": { - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - }, - { - "id": 1, - "op": "=", - "text": "UP", - "type": 1, - "value": "1" - }, - { - "id": 2, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "0" - } - ], - "max": 2, - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "rgb(31, 214, 77)", - "value": 0.5 - } - ] - }, - "title": "$device", - "unit": "none" - }, - "overrides": [], - "values": false - }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal" - }, - "pluginVersion": "6.6.0", - "repeat": "device", - "repeatDirection": "h", - "scopedVars": { - "device": { - "selected": false, - "text": "g2", - "value": "g2" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": false, - "rawSql": "SELECT\n timestamp AS \"time\",\n value\nFROM device_data\nWHERE\n $__timeFilter(timestamp) AND\n device = $device\nORDER BY timestamp", - "refId": "A", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "column" - } - ] - ], - "table": "device_data", - "timeColumn": "timestamp", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - }, - { - "datatype": "varchar", - "name": "", - "params": [ - "device", - "=", - "$device" - ], - "type": "expression" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": null, - "gridPos": { - "h": 4, - "w": 4, - "x": 4, - "y": 5 - }, - "id": 103, - "links": [], - "maxPerRow": 6, - "options": { - "colorMode": "background", - "fieldOptions": { - "calcs": [ - "last" - ], - "defaults": { - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - }, - { - "id": 1, - "op": "=", - "text": "UP", - "type": 1, - "value": "1" - }, - { - "id": 2, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "0" - } - ], - "max": 2, - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "rgb(31, 214, 77)", - "value": 0.5 - } - ] - }, - "title": "$device", - "unit": "none" - }, - "overrides": [], - "values": false - }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal" - }, - "pluginVersion": "6.6.0", - "repeat": null, - "repeatDirection": "h", - "repeatIteration": 1580387736814, - "repeatPanelId": 2, - "scopedVars": { - "device": { - "selected": false, - "text": "moto02", - "value": "moto02" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": false, - "rawSql": "SELECT\n timestamp AS \"time\",\n value\nFROM device_data\nWHERE\n $__timeFilter(timestamp) AND\n device = $device\nORDER BY timestamp", - "refId": "A", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "column" - } - ] - ], - "table": "device_data", - "timeColumn": "timestamp", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - }, - { - "datatype": "varchar", - "name": "", - "params": [ - "device", - "=", - "$device" - ], - "type": "expression" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": null, - "gridPos": { - "h": 4, - "w": 4, - "x": 8, - "y": 5 - }, - "id": 104, - "links": [], - "maxPerRow": 6, - "options": { - "colorMode": "background", - "fieldOptions": { - "calcs": [ - "last" - ], - "defaults": { - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - }, - { - "id": 1, - "op": "=", - "text": "UP", - "type": 1, - "value": "1" - }, - { - "id": 2, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "0" - } - ], - "max": 2, - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "rgb(31, 214, 77)", - "value": 0.5 - } - ] - }, - "title": "$device", - "unit": "none" - }, - "overrides": [], - "values": false - }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal" - }, - "pluginVersion": "6.6.0", - "repeat": null, - "repeatDirection": "h", - "repeatIteration": 1580387736814, - "repeatPanelId": 2, - "scopedVars": { - "device": { - "selected": false, - "text": "moto07", - "value": "moto07" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": false, - "rawSql": "SELECT\n timestamp AS \"time\",\n value\nFROM device_data\nWHERE\n $__timeFilter(timestamp) AND\n device = $device\nORDER BY timestamp", - "refId": "A", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "column" - } - ] - ], - "table": "device_data", - "timeColumn": "timestamp", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - }, - { - "datatype": "varchar", - "name": "", - "params": [ - "device", - "=", - "$device" - ], - "type": "expression" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": null, - "gridPos": { - "h": 4, - "w": 4, - "x": 12, - "y": 5 - }, - "id": 105, - "links": [], - "maxPerRow": 6, - "options": { - "colorMode": "background", - "fieldOptions": { - "calcs": [ - "last" - ], - "defaults": { - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - }, - { - "id": 1, - "op": "=", - "text": "UP", - "type": 1, - "value": "1" - }, - { - "id": 2, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "0" - } - ], - "max": 2, - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "rgb(31, 214, 77)", - "value": 0.5 - } - ] - }, - "title": "$device", - "unit": "none" - }, - "overrides": [], - "values": false - }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal" - }, - "pluginVersion": "6.6.0", - "repeat": null, - "repeatDirection": "h", - "repeatIteration": 1580387736814, - "repeatPanelId": 2, - "scopedVars": { - "device": { - "selected": false, - "text": "moto08", - "value": "moto08" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": false, - "rawSql": "SELECT\n timestamp AS \"time\",\n value\nFROM device_data\nWHERE\n $__timeFilter(timestamp) AND\n device = $device\nORDER BY timestamp", - "refId": "A", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "column" - } - ] - ], - "table": "device_data", - "timeColumn": "timestamp", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - }, - { - "datatype": "varchar", - "name": "", - "params": [ - "device", - "=", - "$device" - ], - "type": "expression" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": null, - "gridPos": { - "h": 4, - "w": 4, - "x": 16, - "y": 5 - }, - "id": 106, - "links": [], - "maxPerRow": 6, - "options": { - "colorMode": "background", - "fieldOptions": { - "calcs": [ - "last" - ], - "defaults": { - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - }, - { - "id": 1, - "op": "=", - "text": "UP", - "type": 1, - "value": "1" - }, - { - "id": 2, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "0" - } - ], - "max": 2, - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "rgb(31, 214, 77)", - "value": 0.5 - } - ] - }, - "title": "$device", - "unit": "none" - }, - "overrides": [], - "values": false - }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal" - }, - "pluginVersion": "6.6.0", - "repeat": null, - "repeatDirection": "h", - "repeatIteration": 1580387736814, - "repeatPanelId": 2, - "scopedVars": { - "device": { - "selected": false, - "text": "s7", - "value": "s7" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": false, - "rawSql": "SELECT\n timestamp AS \"time\",\n value\nFROM device_data\nWHERE\n $__timeFilter(timestamp) AND\n device = $device\nORDER BY timestamp", - "refId": "A", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "column" - } - ] - ], - "table": "device_data", - "timeColumn": "timestamp", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - }, - { - "datatype": "varchar", - "name": "", - "params": [ - "device", - "=", - "$device" - ], - "type": "expression" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": null, - "gridPos": { - "h": 4, - "w": 4, - "x": 20, - "y": 5 - }, - "id": 107, - "links": [], - "maxPerRow": 6, - "options": { - "colorMode": "background", - "fieldOptions": { - "calcs": [ - "last" - ], - "defaults": { - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - }, - { - "id": 1, - "op": "=", - "text": "UP", - "type": 1, - "value": "1" - }, - { - "id": 2, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "0" - } - ], - "max": 2, - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "rgb(31, 214, 77)", - "value": 0.5 - } - ] - }, - "title": "$device", - "unit": "none" - }, - "overrides": [], - "values": false - }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal" - }, - "pluginVersion": "6.6.0", - "repeat": null, - "repeatDirection": "h", - "repeatIteration": 1580387736814, - "repeatPanelId": 2, - "scopedVars": { - "device": { - "selected": false, - "text": "s71", - "value": "s71" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": false, - "rawSql": "SELECT\n timestamp AS \"time\",\n value\nFROM device_data\nWHERE\n $__timeFilter(timestamp) AND\n device = $device\nORDER BY timestamp", - "refId": "A", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "column" - } - ] - ], - "table": "device_data", - "timeColumn": "timestamp", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - }, - { - "datatype": "varchar", - "name": "", - "params": [ - "device", - "=", - "$device" - ], - "type": "expression" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": null, - "gridPos": { - "h": 4, - "w": 4, - "x": 0, - "y": 9 - }, - "id": 108, - "links": [], - "maxPerRow": 6, - "options": { - "colorMode": "background", - "fieldOptions": { - "calcs": [ - "last" - ], - "defaults": { - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - }, - { - "id": 1, - "op": "=", - "text": "UP", - "type": 1, - "value": "1" - }, - { - "id": 2, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "0" - } - ], - "max": 2, - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "rgb(31, 214, 77)", - "value": 0.5 - } - ] - }, - "title": "$device", - "unit": "none" - }, - "overrides": [], - "values": false - }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal" - }, - "pluginVersion": "6.6.0", - "repeat": null, - "repeatDirection": "h", - "repeatIteration": 1580387736814, - "repeatPanelId": 2, - "scopedVars": { - "device": { - "selected": false, - "text": "s72", - "value": "s72" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": false, - "rawSql": "SELECT\n timestamp AS \"time\",\n value\nFROM device_data\nWHERE\n $__timeFilter(timestamp) AND\n device = $device\nORDER BY timestamp", - "refId": "A", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "column" - } - ] - ], - "table": "device_data", - "timeColumn": "timestamp", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - }, - { - "datatype": "varchar", - "name": "", - "params": [ - "device", - "=", - "$device" - ], - "type": "expression" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": null, - "gridPos": { - "h": 4, - "w": 4, - "x": 4, - "y": 9 - }, - "id": 109, - "links": [], - "maxPerRow": 6, - "options": { - "colorMode": "background", - "fieldOptions": { - "calcs": [ - "last" - ], - "defaults": { - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - }, - { - "id": 1, - "op": "=", - "text": "UP", - "type": 1, - "value": "1" - }, - { - "id": 2, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "0" - } - ], - "max": 2, - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "rgb(31, 214, 77)", - "value": 0.5 - } - ] - }, - "title": "$device", - "unit": "none" - }, - "overrides": [], - "values": false - }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal" - }, - "pluginVersion": "6.6.0", - "repeat": null, - "repeatDirection": "h", - "repeatIteration": 1580387736814, - "repeatPanelId": 2, - "scopedVars": { - "device": { - "selected": false, - "text": "samsung00", - "value": "samsung00" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": false, - "rawSql": "SELECT\n timestamp AS \"time\",\n value\nFROM device_data\nWHERE\n $__timeFilter(timestamp) AND\n device = $device\nORDER BY timestamp", - "refId": "A", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "column" - } - ] - ], - "table": "device_data", - "timeColumn": "timestamp", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - }, - { - "datatype": "varchar", - "name": "", - "params": [ - "device", - "=", - "$device" - ], - "type": "expression" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": null, - "gridPos": { - "h": 4, - "w": 4, - "x": 8, - "y": 9 - }, - "id": 110, - "links": [], - "maxPerRow": 6, - "options": { - "colorMode": "background", - "fieldOptions": { - "calcs": [ - "last" - ], - "defaults": { - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - }, - { - "id": 1, - "op": "=", - "text": "UP", - "type": 1, - "value": "1" - }, - { - "id": 2, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "0" - } - ], - "max": 2, - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "rgb(31, 214, 77)", - "value": 0.5 - } - ] - }, - "title": "$device", - "unit": "none" - }, - "overrides": [], - "values": false - }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal" - }, - "pluginVersion": "6.6.0", - "repeat": null, - "repeatDirection": "h", - "repeatIteration": 1580387736814, - "repeatPanelId": 2, - "scopedVars": { - "device": { - "selected": false, - "text": "samsung01", - "value": "samsung01" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": false, - "rawSql": "SELECT\n timestamp AS \"time\",\n value\nFROM device_data\nWHERE\n $__timeFilter(timestamp) AND\n device = $device\nORDER BY timestamp", - "refId": "A", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "column" - } - ] - ], - "table": "device_data", - "timeColumn": "timestamp", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - }, - { - "datatype": "varchar", - "name": "", - "params": [ - "device", - "=", - "$device" - ], - "type": "expression" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": null, - "gridPos": { - "h": 4, - "w": 4, - "x": 12, - "y": 9 - }, - "id": 111, - "links": [], - "maxPerRow": 6, - "options": { - "colorMode": "background", - "fieldOptions": { - "calcs": [ - "last" - ], - "defaults": { - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - }, - { - "id": 1, - "op": "=", - "text": "UP", - "type": 1, - "value": "1" - }, - { - "id": 2, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "0" - } - ], - "max": 2, - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "rgb(31, 214, 77)", - "value": 0.5 - } - ] - }, - "title": "$device", - "unit": "none" - }, - "overrides": [], - "values": false - }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal" - }, - "pluginVersion": "6.6.0", - "repeat": null, - "repeatDirection": "h", - "repeatIteration": 1580387736814, - "repeatPanelId": 2, - "scopedVars": { - "device": { - "selected": false, - "text": "samsung02", - "value": "samsung02" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": false, - "rawSql": "SELECT\n timestamp AS \"time\",\n value\nFROM device_data\nWHERE\n $__timeFilter(timestamp) AND\n device = $device\nORDER BY timestamp", - "refId": "A", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "column" - } - ] - ], - "table": "device_data", - "timeColumn": "timestamp", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - }, - { - "datatype": "varchar", - "name": "", - "params": [ - "device", - "=", - "$device" - ], - "type": "expression" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": null, - "gridPos": { - "h": 4, - "w": 4, - "x": 16, - "y": 9 - }, - "id": 112, - "links": [], - "maxPerRow": 6, - "options": { - "colorMode": "background", - "fieldOptions": { - "calcs": [ - "last" - ], - "defaults": { - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - }, - { - "id": 1, - "op": "=", - "text": "UP", - "type": 1, - "value": "1" - }, - { - "id": 2, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "0" - } - ], - "max": 2, - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "rgb(31, 214, 77)", - "value": 0.5 - } - ] - }, - "title": "$device", - "unit": "none" - }, - "overrides": [], - "values": false - }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal" - }, - "pluginVersion": "6.6.0", - "repeat": null, - "repeatDirection": "h", - "repeatIteration": 1580387736814, - "repeatPanelId": 2, - "scopedVars": { - "device": { - "selected": false, - "text": "samsung03", - "value": "samsung03" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": false, - "rawSql": "SELECT\n timestamp AS \"time\",\n value\nFROM device_data\nWHERE\n $__timeFilter(timestamp) AND\n device = $device\nORDER BY timestamp", - "refId": "A", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "column" - } - ] - ], - "table": "device_data", - "timeColumn": "timestamp", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - }, - { - "datatype": "varchar", - "name": "", - "params": [ - "device", - "=", - "$device" - ], - "type": "expression" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": null, - "gridPos": { - "h": 4, - "w": 4, - "x": 20, - "y": 9 - }, - "id": 113, - "links": [], - "maxPerRow": 6, - "options": { - "colorMode": "background", - "fieldOptions": { - "calcs": [ - "last" - ], - "defaults": { - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - }, - { - "id": 1, - "op": "=", - "text": "UP", - "type": 1, - "value": "1" - }, - { - "id": 2, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "0" - } - ], - "max": 2, - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "rgb(31, 214, 77)", - "value": 0.5 - } - ] - }, - "title": "$device", - "unit": "none" - }, - "overrides": [], - "values": false - }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal" - }, - "pluginVersion": "6.6.0", - "repeat": null, - "repeatDirection": "h", - "repeatIteration": 1580387736814, - "repeatPanelId": 2, - "scopedVars": { - "device": { - "selected": false, - "text": "tv01", - "value": "tv01" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": false, - "rawSql": "SELECT\n timestamp AS \"time\",\n value\nFROM device_data\nWHERE\n $__timeFilter(timestamp) AND\n device = $device\nORDER BY timestamp", - "refId": "A", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "column" - } - ] - ], - "table": "device_data", - "timeColumn": "timestamp", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - }, - { - "datatype": "varchar", - "name": "", - "params": [ - "device", - "=", - "$device" - ], - "type": "expression" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": null, - "gridPos": { - "h": 4, - "w": 4, - "x": 0, - "y": 13 - }, - "id": 114, - "links": [], - "maxPerRow": 6, - "options": { - "colorMode": "background", - "fieldOptions": { - "calcs": [ - "last" - ], - "defaults": { - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - }, - { - "id": 1, - "op": "=", - "text": "UP", - "type": 1, - "value": "1" - }, - { - "id": 2, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "0" - } - ], - "max": 2, - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "rgb(31, 214, 77)", - "value": 0.5 - } - ] - }, - "title": "$device", - "unit": "none" - }, - "overrides": [], - "values": false - }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal" - }, - "pluginVersion": "6.6.0", - "repeat": null, - "repeatDirection": "h", - "repeatIteration": 1580387736814, - "repeatPanelId": 2, - "scopedVars": { - "device": { - "selected": false, - "text": "tv02", - "value": "tv02" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": false, - "rawSql": "SELECT\n timestamp AS \"time\",\n value\nFROM device_data\nWHERE\n $__timeFilter(timestamp) AND\n device = $device\nORDER BY timestamp", - "refId": "A", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "column" - } - ] - ], - "table": "device_data", - "timeColumn": "timestamp", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - }, - { - "datatype": "varchar", - "name": "", - "params": [ - "device", - "=", - "$device" - ], - "type": "expression" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": null, - "gridPos": { - "h": 4, - "w": 4, - "x": 4, - "y": 13 - }, - "id": 115, - "links": [], - "maxPerRow": 6, - "options": { - "colorMode": "background", - "fieldOptions": { - "calcs": [ - "last" - ], - "defaults": { - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - }, - { - "id": 1, - "op": "=", - "text": "UP", - "type": 1, - "value": "1" - }, - { - "id": 2, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "0" - } - ], - "max": 2, - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "rgb(31, 214, 77)", - "value": 0.5 - } - ] - }, - "title": "$device", - "unit": "none" - }, - "overrides": [], - "values": false - }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal" - }, - "pluginVersion": "6.6.0", - "repeat": null, - "repeatDirection": "h", - "repeatIteration": 1580387736814, - "repeatPanelId": 2, - "scopedVars": { - "device": { - "selected": false, - "text": "tv03", - "value": "tv03" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": false, - "rawSql": "SELECT\n timestamp AS \"time\",\n value\nFROM device_data\nWHERE\n $__timeFilter(timestamp) AND\n device = $device\nORDER BY timestamp", - "refId": "A", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "column" - } - ] - ], - "table": "device_data", - "timeColumn": "timestamp", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - }, - { - "datatype": "varchar", - "name": "", - "params": [ - "device", - "=", - "$device" - ], - "type": "expression" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": null, - "gridPos": { - "h": 4, - "w": 4, - "x": 8, - "y": 13 - }, - "id": 116, - "links": [], - "maxPerRow": 6, - "options": { - "colorMode": "background", - "fieldOptions": { - "calcs": [ - "last" - ], - "defaults": { - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - }, - { - "id": 1, - "op": "=", - "text": "UP", - "type": 1, - "value": "1" - }, - { - "id": 2, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "0" - } - ], - "max": 2, - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "rgb(31, 214, 77)", - "value": 0.5 - } - ] - }, - "title": "$device", - "unit": "none" - }, - "overrides": [], - "values": false - }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal" - }, - "pluginVersion": "6.6.0", - "repeat": null, - "repeatDirection": "h", - "repeatIteration": 1580387736814, - "repeatPanelId": 2, - "scopedVars": { - "device": { - "selected": false, - "text": "tv04", - "value": "tv04" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": false, - "rawSql": "SELECT\n timestamp AS \"time\",\n value\nFROM device_data\nWHERE\n $__timeFilter(timestamp) AND\n device = $device\nORDER BY timestamp", - "refId": "A", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "column" - } - ] - ], - "table": "device_data", - "timeColumn": "timestamp", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - }, - { - "datatype": "varchar", - "name": "", - "params": [ - "device", - "=", - "$device" - ], - "type": "expression" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": null, - "gridPos": { - "h": 4, - "w": 4, - "x": 12, - "y": 13 - }, - "id": 117, - "links": [], - "maxPerRow": 6, - "options": { - "colorMode": "background", - "fieldOptions": { - "calcs": [ - "last" - ], - "defaults": { - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - }, - { - "id": 1, - "op": "=", - "text": "UP", - "type": 1, - "value": "1" - }, - { - "id": 2, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "0" - } - ], - "max": 2, - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "rgb(31, 214, 77)", - "value": 0.5 - } - ] - }, - "title": "$device", - "unit": "none" - }, - "overrides": [], - "values": false - }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal" - }, - "pluginVersion": "6.6.0", - "repeat": null, - "repeatDirection": "h", - "repeatIteration": 1580387736814, - "repeatPanelId": 2, - "scopedVars": { - "device": { - "selected": false, - "text": "tv05", - "value": "tv05" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": false, - "rawSql": "SELECT\n timestamp AS \"time\",\n value\nFROM device_data\nWHERE\n $__timeFilter(timestamp) AND\n device = $device\nORDER BY timestamp", - "refId": "A", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "column" - } - ] - ], - "table": "device_data", - "timeColumn": "timestamp", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - }, - { - "datatype": "varchar", - "name": "", - "params": [ - "device", - "=", - "$device" - ], - "type": "expression" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": null, - "gridPos": { - "h": 4, - "w": 4, - "x": 16, - "y": 13 - }, - "id": 118, - "links": [], - "maxPerRow": 6, - "options": { - "colorMode": "background", - "fieldOptions": { - "calcs": [ - "last" - ], - "defaults": { - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - }, - { - "id": 1, - "op": "=", - "text": "UP", - "type": 1, - "value": "1" - }, - { - "id": 2, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "0" - } - ], - "max": 2, - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "rgb(31, 214, 77)", - "value": 0.5 - } - ] - }, - "title": "$device", - "unit": "none" - }, - "overrides": [], - "values": false - }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal" - }, - "pluginVersion": "6.6.0", - "repeat": null, - "repeatDirection": "h", - "repeatIteration": 1580387736814, - "repeatPanelId": 2, - "scopedVars": { - "device": { - "selected": false, - "text": "tv06", - "value": "tv06" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": false, - "rawSql": "SELECT\n timestamp AS \"time\",\n value\nFROM device_data\nWHERE\n $__timeFilter(timestamp) AND\n device = $device\nORDER BY timestamp", - "refId": "A", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "column" - } - ] - ], - "table": "device_data", - "timeColumn": "timestamp", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - }, - { - "datatype": "varchar", - "name": "", - "params": [ - "device", - "=", - "$device" - ], - "type": "expression" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": null, - "gridPos": { - "h": 4, - "w": 4, - "x": 20, - "y": 13 - }, - "id": 119, - "links": [], - "maxPerRow": 6, - "options": { - "colorMode": "background", - "fieldOptions": { - "calcs": [ - "last" - ], - "defaults": { - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - }, - { - "id": 1, - "op": "=", - "text": "UP", - "type": 1, - "value": "1" - }, - { - "id": 2, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "0" - } - ], - "max": 2, - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "rgb(31, 214, 77)", - "value": 0.5 - } - ] - }, - "title": "$device", - "unit": "none" - }, - "overrides": [], - "values": false - }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal" - }, - "pluginVersion": "6.6.0", - "repeat": null, - "repeatDirection": "h", - "repeatIteration": 1580387736814, - "repeatPanelId": 2, - "scopedVars": { - "device": { - "selected": false, - "text": "tv07", - "value": "tv07" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": false, - "rawSql": "SELECT\n timestamp AS \"time\",\n value\nFROM device_data\nWHERE\n $__timeFilter(timestamp) AND\n device = $device\nORDER BY timestamp", - "refId": "A", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "column" - } - ] - ], - "table": "device_data", - "timeColumn": "timestamp", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - }, - { - "datatype": "varchar", - "name": "", - "params": [ - "device", - "=", - "$device" - ], - "type": "expression" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": null, - "gridPos": { - "h": 4, - "w": 4, - "x": 0, - "y": 17 - }, - "id": 120, - "links": [], - "maxPerRow": 6, - "options": { - "colorMode": "background", - "fieldOptions": { - "calcs": [ - "last" - ], - "defaults": { - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - }, - { - "id": 1, - "op": "=", - "text": "UP", - "type": 1, - "value": "1" - }, - { - "id": 2, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "0" - } - ], - "max": 2, - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "rgb(31, 214, 77)", - "value": 0.5 - } - ] - }, - "title": "$device", - "unit": "none" - }, - "overrides": [], - "values": false - }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal" - }, - "pluginVersion": "6.6.0", - "repeat": null, - "repeatDirection": "h", - "repeatIteration": 1580387736814, - "repeatPanelId": 2, - "scopedVars": { - "device": { - "selected": false, - "text": "tv08", - "value": "tv08" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": false, - "rawSql": "SELECT\n timestamp AS \"time\",\n value\nFROM device_data\nWHERE\n $__timeFilter(timestamp) AND\n device = $device\nORDER BY timestamp", - "refId": "A", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "column" - } - ] - ], - "table": "device_data", - "timeColumn": "timestamp", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - }, - { - "datatype": "varchar", - "name": "", - "params": [ - "device", - "=", - "$device" - ], - "type": "expression" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": null, - "gridPos": { - "h": 4, - "w": 4, - "x": 4, - "y": 17 - }, - "id": 121, - "links": [], - "maxPerRow": 6, - "options": { - "colorMode": "background", - "fieldOptions": { - "calcs": [ - "last" - ], - "defaults": { - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - }, - { - "id": 1, - "op": "=", - "text": "UP", - "type": 1, - "value": "1" - }, - { - "id": 2, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "0" - } - ], - "max": 2, - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "rgb(31, 214, 77)", - "value": 0.5 - } - ] - }, - "title": "$device", - "unit": "none" - }, - "overrides": [], - "values": false - }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal" - }, - "pluginVersion": "6.6.0", - "repeat": null, - "repeatDirection": "h", - "repeatIteration": 1580387736814, - "repeatPanelId": 2, - "scopedVars": { - "device": { - "selected": false, - "text": "tv15", - "value": "tv15" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": false, - "rawSql": "SELECT\n timestamp AS \"time\",\n value\nFROM device_data\nWHERE\n $__timeFilter(timestamp) AND\n device = $device\nORDER BY timestamp", - "refId": "A", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "column" - } - ] - ], - "table": "device_data", - "timeColumn": "timestamp", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - }, - { - "datatype": "varchar", - "name": "", - "params": [ - "device", - "=", - "$device" - ], - "type": "expression" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "stat" - }, - { - "cacheTimeout": null, + "collapsed": false, "datasource": null, "gridPos": { - "h": 4, - "w": 4, - "x": 8, - "y": 17 - }, - "id": 122, - "links": [], - "maxPerRow": 6, - "options": { - "colorMode": "background", - "fieldOptions": { - "calcs": [ - "last" - ], - "defaults": { - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - }, - { - "id": 1, - "op": "=", - "text": "UP", - "type": 1, - "value": "1" - }, - { - "id": 2, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "0" - } - ], - "max": 2, - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "rgb(31, 214, 77)", - "value": 0.5 - } - ] - }, - "title": "$device", - "unit": "none" - }, - "overrides": [], - "values": false - }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal" - }, - "pluginVersion": "6.6.0", - "repeat": null, - "repeatDirection": "h", - "repeatIteration": 1580387736814, - "repeatPanelId": 2, - "scopedVars": { - "device": { - "selected": false, - "text": "tv16", - "value": "tv16" - } + "h": 1, + "w": 24, + "x": 0, + "y": 0 }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": false, - "rawSql": "SELECT\n timestamp AS \"time\",\n value\nFROM device_data\nWHERE\n $__timeFilter(timestamp) AND\n device = $device\nORDER BY timestamp", - "refId": "A", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "column" - } - ] - ], - "table": "device_data", - "timeColumn": "timestamp", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - }, - { - "datatype": "varchar", - "name": "", - "params": [ - "device", - "=", - "$device" - ], - "type": "expression" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "stat" + "id": 52, + "panels": [], + "title": "Devices", + "type": "row" }, { "cacheTimeout": null, "datasource": null, - "gridPos": { - "h": 4, - "w": 4, - "x": 12, - "y": 17 - }, - "id": 123, - "links": [], - "maxPerRow": 6, - "options": { - "colorMode": "background", - "fieldOptions": { - "calcs": [ - "last" + "fieldConfig": { + "defaults": { + "displayName": "$device", + "mappings": [ + { + "id": 0, + "op": "=", + "text": "N/A", + "type": 1, + "value": "null" + }, + { + "id": 1, + "op": "=", + "text": "UP", + "type": 1, + "value": "1" + }, + { + "id": 2, + "op": "=", + "text": "DOWN", + "type": 1, + "value": "0" + } ], - "defaults": { - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - }, + "max": 2, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ { - "id": 1, - "op": "=", - "text": "UP", - "type": 1, - "value": "1" + "color": "dark-red", + "value": null }, { - "id": 2, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "0" + "color": "rgb(31, 214, 77)", + "value": 0.5 } - ], - "max": 2, - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "rgb(31, 214, 77)", - "value": 0.5 - } - ] - }, - "title": "$device", - "unit": "none" + ] }, - "overrides": [], - "values": false + "unit": "none" }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal" - }, - "pluginVersion": "6.6.0", - "repeat": null, - "repeatDirection": "h", - "repeatIteration": 1580387736814, - "repeatPanelId": 2, - "scopedVars": { - "device": { - "selected": false, - "text": "tv17", - "value": "tv17" - } + "overrides": [] }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": false, - "rawSql": "SELECT\n timestamp AS \"time\",\n value\nFROM device_data\nWHERE\n $__timeFilter(timestamp) AND\n device = $device\nORDER BY timestamp", - "refId": "A", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "column" - } - ] - ], - "table": "device_data", - "timeColumn": "timestamp", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - }, - { - "datatype": "varchar", - "name": "", - "params": [ - "device", - "=", - "$device" - ], - "type": "expression" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": null, "gridPos": { "h": 4, "w": 4, - "x": 16, - "y": 17 + "x": 0, + "y": 1 }, - "id": 124, + "id": 2, "links": [], "maxPerRow": 6, "options": { "colorMode": "background", - "fieldOptions": { - "calcs": [ - "last" - ], - "defaults": { - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - }, - { - "id": 1, - "op": "=", - "text": "UP", - "type": 1, - "value": "1" - }, - { - "id": 2, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "0" - } - ], - "max": 2, - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "rgb(31, 214, 77)", - "value": 0.5 - } - ] - }, - "title": "$device", - "unit": "none" - }, - "overrides": [], - "values": false - }, "graphMode": "area", "justifyMode": "auto", - "orientation": "horizontal" - }, - "pluginVersion": "6.6.0", - "repeat": null, - "repeatDirection": "h", - "repeatIteration": 1580387736814, - "repeatPanelId": 2, - "scopedVars": { - "device": { - "selected": false, - "text": "tv18", - "value": "tv18" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": false, - "rawSql": "SELECT\n timestamp AS \"time\",\n value\nFROM device_data\nWHERE\n $__timeFilter(timestamp) AND\n device = $device\nORDER BY timestamp", - "refId": "A", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "column" - } - ] - ], - "table": "device_data", - "timeColumn": "timestamp", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - }, - { - "datatype": "varchar", - "name": "", - "params": [ - "device", - "=", - "$device" - ], - "type": "expression" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": null, - "gridPos": { - "h": 4, - "w": 4, - "x": 20, - "y": 17 - }, - "id": 125, - "links": [], - "maxPerRow": 6, - "options": { - "colorMode": "background", - "fieldOptions": { + "orientation": "horizontal", + "reduceOptions": { "calcs": [ "last" ], - "defaults": { - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - }, - { - "id": 1, - "op": "=", - "text": "UP", - "type": 1, - "value": "1" - }, - { - "id": 2, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "0" - } - ], - "max": 2, - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "rgb(31, 214, 77)", - "value": 0.5 - } - ] - }, - "title": "$device", - "unit": "none" - }, - "overrides": [], + "fields": "", "values": false }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal" + "text": {}, + "textMode": "auto" }, - "pluginVersion": "6.6.0", - "repeat": null, + "pluginVersion": "8.0.5", + "repeat": "device", "repeatDirection": "h", - "repeatIteration": 1580387736814, - "repeatPanelId": 2, - "scopedVars": { - "device": { - "selected": false, - "text": "tv19", - "value": "tv19" - } - }, "targets": [ { "format": "time_series", @@ -3402,7 +150,6 @@ ], "timeFrom": null, "timeShift": null, - "title": "", "type": "stat" }, { @@ -3412,7 +159,7 @@ "h": 1, "w": 24, "x": 0, - "y": 21 + "y": 13 }, "id": 77, "panels": [], @@ -3426,13 +173,19 @@ "dashes": false, "datasource": null, "decimals": 0, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 9, "w": 24, "x": 0, - "y": 22 + "y": 14 }, "hiddenSeries": false, "id": 27, @@ -3451,9 +204,10 @@ "linewidth": 1, "nullPointMode": "null", "options": { - "dataLinks": [] + "alertThreshold": true }, "percentage": false, + "pluginVersion": "8.0.5", "pointradius": 2, "points": false, "renderer": "flot", @@ -3547,13 +301,19 @@ "dashes": false, "datasource": null, "description": "Count of timestamps where the device was marked as UP.", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 11, "w": 24, "x": 0, - "y": 31 + "y": 23 }, "hiddenSeries": false, "id": 102, @@ -3576,10 +336,10 @@ "linewidth": 1, "nullPointMode": "null", "options": { - "dataLinks": [] + "alertThreshold": true }, "percentage": false, - "pluginVersion": "6.6.0", + "pluginVersion": "8.0.5", "pointradius": 2, "points": false, "renderer": "flot", @@ -3600,7 +360,7 @@ ], "metricColumn": "device", "rawQuery": true, - "rawSql": "SELECT\n timestamp AS \"time\",\n device AS metric,\n SUM(value=\"1\") AS \"value\"\nFROM device_data\nWHERE\n $__timeFilter(timestamp)\nGROUP BY device,2\nORDER BY device", + "rawSql": "SELECT\n timestamp AS \"time\",\n device AS metric,\n SUM(value=\"1\") AS \"value\"\nFROM device_data\nWHERE\n $__timeFilter(timestamp)\nGROUP BY device,2\nORDER BY time asc", "refId": "A", "select": [ [ @@ -3685,7 +445,7 @@ } ], "refresh": "1m", - "schemaVersion": 22, + "schemaVersion": 30, "style": "dark", "tags": [], "templating": { @@ -3693,13 +453,18 @@ { "allValue": null, "current": { - "text": "All", + "selected": true, + "text": [ + "All" + ], "value": [ "$__all" ] }, "datasource": "MySQL", "definition": "SELECT DISTINCT device FROM device_data;", + "description": null, + "error": null, "hide": 2, "includeAll": true, "label": null, @@ -3712,7 +477,6 @@ "skipUrlSync": false, "sort": 1, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false @@ -3740,5 +504,5 @@ "timezone": "", "title": "Device Status", "uid": "wKjPiEsWk", - "version": 6 + "version": 1 } From f4ae60c789e06b217fd476c3ed8fb8540ee97a58 Mon Sep 17 00:00:00 2001 From: acocalypso Date: Thu, 8 Jul 2021 22:33:31 +0200 Subject: [PATCH 2/2] Fix Dashboard Add Grafana 8 value mapping for devices --- grafana/dashboards/device_dashboard.json | 34 +++++++++--------------- 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/grafana/dashboards/device_dashboard.json b/grafana/dashboards/device_dashboard.json index 6ac8232..5fb92a9 100644 --- a/grafana/dashboards/device_dashboard.json +++ b/grafana/dashboards/device_dashboard.json @@ -15,8 +15,7 @@ "editable": true, "gnetId": null, "graphTooltip": 0, - "id": 82, - "iteration": 1625776119645, + "iteration": 1625776119649, "links": [], "panels": [ { @@ -30,6 +29,7 @@ }, "id": 52, "panels": [], + "repeat": null, "title": "Devices", "type": "row" }, @@ -41,25 +41,17 @@ "displayName": "$device", "mappings": [ { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - }, - { - "id": 1, - "op": "=", - "text": "UP", - "type": 1, - "value": "1" - }, - { - "id": 2, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "0" + "options": { + "0": { + "index": 1, + "text": "OFFLINE" + }, + "1": { + "index": 0, + "text": "ONLINE" + } + }, + "type": "value" } ], "max": 2,