Grafana dashboard: Golani Dashboard
Description: Tesco monitoring


{
  "__inputs": [
    {
      "name": "DS_INFLUXDB",
      "label": "InfluxDB",
      "description": "",
      "type": "datasource",
      "pluginId": "influxdb",
      "pluginName": "InfluxDB"
    },
    {
      "name": "VAR_DATASOURCE",
      "type": "constant",
      "label": "Data Source",
      "value": "InfluxDB-tesco",
      "description": ""
    },
    {
      "name": "VAR_DB",
      "type": "constant",
      "label": "DB",
      "value": "tesco",
      "description": ""
    },
    {
      "name": "VAR_TABLE",
      "type": "constant",
      "label": "table",
      "value": "events",
      "description": ""
    }
  ],
  "__elements": {},
  "__requires": [
    {
      "type": "panel",
      "id": "bargauge",
      "name": "Bar gauge",
      "version": ""
    },
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "9.2.3-997144b7"
    },
    {
      "type": "datasource",
      "id": "influxdb",
      "name": "InfluxDB",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "piechart",
      "name": "Pie chart",
      "version": ""
    },
    {
      "type": "panel",
      "id": "stat",
      "name": "Stat",
      "version": ""
    },
    {
      "type": "panel",
      "id": "table",
      "name": "Table",
      "version": ""
    },
    {
      "type": "panel",
      "id": "timeseries",
      "name": "Time series",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": {
          "type": "datasource",
          "uid": "grafana"
        },
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "limit": 100,
        "name": "Annotations & Alerts",
        "showIn": 0,
        "target": {
          "limit": 100,
          "matchAny": false,
          "tags": [],
          "type": "dashboard"
        },
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 0,
  "id": null,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "datasource": {
        "type": "influxdb",
        "uid": "$dataSource"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "links": [],
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "string"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 11,
        "x": 0,
        "y": 0
      },
      "id": 46,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "textMode": "auto"
      },
      "pluginVersion": "9.2.3-997144b7",
      "targets": [
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB}"
          },
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "tagId"
              ],
              "type": "tag"
            },
            {
              "params": [
                "previous"
              ],
              "type": "fill"
            }
          ],
          "measurement": "events",
          "orderByTime": "ASC",
          "policy": "autogen",
          "query": "SELECT COUNT(val)\nFROM (select time, timestamp, eventName, gatewayId, last(value)/value as val from $table where $timeFilter  AND (gatewayId =~ /A8E56767E248/ OR gatewayId =~ /5B73EBBD768A/) group by tagId)",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "first"
              }
            ]
          ],
          "tags": []
        }
      ],
      "title": "Dagenham Tagging Bridges - Pixels ",
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "confidence": true,
              "eventName": true,
              "eventValue": true,
              "latitude": true,
              "longitude": true,
              "timestamp": true,
              "value": false
            },
            "indexByName": {
              "Time": 0,
              "confidence": 5,
              "eventName": 1,
              "eventValue": 6,
              "gatewayId": 3,
              "latitude": 7,
              "longitude": 8,
              "tagId": 2,
              "timestamp": 9,
              "value": 4
            },
            "renameByName": {
              "confidence": "Confidence",
              "eventName": "Event",
              "gatewayId": "Gateway/Bridge",
              "latitude": "Latitude",
              "longitude": "Longitude",
              "tagId": "Pixel ID",
              "value": "Value"
            }
          }
        }
      ],
      "type": "stat"
    },
    {
      "datasource": {
        "type": "influxdb",
        "uid": "$dataSource"
      },
      "fieldConfig": {
        "defaults": {
          "displayName": "$__cell_1",
          "links": [
            {
              "title": "Details",
              "url": "https://wiliot.grafana.net/d/iyLxNxNGk?var-gateway=${__data.fields.gatewayId}﻿"
            }
          ],
          "mappings": [],
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 9,
        "x": 11,
        "y": 0
      },
      "id": 48,
      "options": {
        "displayMode": "basic",
        "minVizHeight": 10,
        "minVizWidth": 0,
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "count"
          ],
          "fields": "",
          "values": true
        },
        "showUnfilled": true,
        "text": {}
      },
      "pluginVersion": "9.2.3-997144b7",
      "targets": [
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB}"
          },
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "hide": false,
          "measurement": "events",
          "orderByTime": "ASC",
          "policy": "$table",
          "query": "select count(\"last\") from (SELECT last(\"value\"),\"tagId\", \"gatewayId\" FROM $table WHERE $timeFilter AND (gatewayId =~ /A8E56767E248/ OR gatewayId=~/5B73EBBD768A/ ) group by \"tagId\") group by \"gatewayId\"",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "tags": [
            {
              "key": "tagId =~ /^$tagprefix/",
              "operator": "=",
              "value": "select tag value"
            }
          ]
        }
      ],
      "title": "Pixels per Tagging Bridge",
      "transformations": [],
      "type": "bargauge"
    },
    {
      "collapsed": false,
      "datasource": {
        "type": "datasource",
        "uid": "grafana"
      },
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 7
      },
      "id": 4,
      "panels": [],
      "targets": [
        {
          "datasource": {
            "type": "datasource",
            "uid": "grafana"
          },
          "refId": "A"
        }
      ],
      "title": "Aggregate",
      "type": "row"
    },
    {
      "datasource": {
        "type": "datasource",
        "uid": "-- Dashboard --"
      },
      "fieldConfig": {
        "defaults": {
          "mappings": [],
          "noValue": "0",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 3,
        "x": 0,
        "y": 8
      },
      "id": 20,
      "options": {
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "distinctCount"
          ],
          "fields": "/^gatewayId$/",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "9.2.3-997144b7",
      "targets": [
        {
          "datasource": {
            "type": "datasource",
            "uid": "-- Dashboard --"
          },
          "panelId": 30,
          "refId": "A"
        }
      ],
      "title": "Gateways/Bridges",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "influxdb",
        "uid": "$dataSource"
      },
      "fieldConfig": {
        "defaults": {
          "displayName": "$__cell_1",
          "links": [
            {
              "title": "Details",
              "url": "https://wiliot.grafana.net/d/iyLxNxNGk?var-gateway=${__data.fields.gatewayId}﻿"
            }
          ],
          "mappings": [],
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 7,
        "x": 3,
        "y": 8
      },
      "id": 30,
      "options": {
        "displayMode": "basic",
        "minVizHeight": 10,
        "minVizWidth": 0,
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "count"
          ],
          "fields": "",
          "values": true
        },
        "showUnfilled": true,
        "text": {}
      },
      "pluginVersion": "9.2.3-997144b7",
      "targets": [
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB}"
          },
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "hide": false,
          "measurement": "events",
          "orderByTime": "ASC",
          "policy": "$table",
          "query": "select count(\"last\") from (SELECT last(\"value\"),\"tagId\", \"gatewayId\" FROM $table WHERE  $timeFilter  group by \"tagId\") group by \"gatewayId\"",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "tags": [
            {
              "key": "tagId =~ /^$tagprefix/",
              "operator": "=",
              "value": "select tag value"
            }
          ]
        }
      ],
      "title": "Pixels per Gateway/Bridge",
      "transformations": [],
      "type": "bargauge"
    },
    {
      "datasource": {
        "type": "influxdb",
        "uid": "$dataSource"
      },
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": "auto",
            "displayMode": "auto",
            "filterable": false,
            "inspect": false
          },
          "links": [],
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "string"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "value"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 1
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 7,
        "w": 11,
        "x": 10,
        "y": 8
      },
      "id": 36,
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "showHeader": true,
        "sortBy": [
          {
            "desc": true,
            "displayName": "Tag Id"
          }
        ]
      },
      "pluginVersion": "9.2.3-997144b7",
      "targets": [
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB}"
          },
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "tagId"
              ],
              "type": "tag"
            },
            {
              "params": [
                "previous"
              ],
              "type": "fill"
            }
          ],
          "measurement": "events",
          "orderByTime": "ASC",
          "policy": "autogen",
          "query": "SELECT *  FROM $table  WHERE  $timeFilter AND tagId != 'null' GROUP BY \"tagId\"  LIMIT 1",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "first"
              }
            ]
          ],
          "tags": []
        }
      ],
      "title": "Reported Pixels",
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "confidence": true,
              "eventName": true,
              "eventValue": true,
              "latitude": true,
              "longitude": true,
              "timestamp": true,
              "value": true
            },
            "indexByName": {
              "Time": 0,
              "confidence": 5,
              "eventName": 1,
              "eventValue": 6,
              "gatewayId": 3,
              "latitude": 7,
              "longitude": 8,
              "tagId": 2,
              "timestamp": 9,
              "value": 4
            },
            "renameByName": {
              "confidence": "Confidence",
              "eventName": "Event",
              "gatewayId": "Gateway/Bridge",
              "latitude": "Latitude",
              "longitude": "Longitude",
              "tagId": "Pixel ID",
              "value": "Value"
            }
          }
        }
      ],
      "type": "table"
    },
    {
      "datasource": {
        "type": "datasource",
        "uid": "-- Dashboard --"
      },
      "fieldConfig": {
        "defaults": {
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 3,
        "x": 21,
        "y": 8
      },
      "id": 41,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "count"
          ],
          "fields": "/^value$/",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "9.2.3-997144b7",
      "targets": [
        {
          "datasource": {
            "type": "datasource",
            "uid": "-- Dashboard --"
          },
          "panelId": 36,
          "refId": "A"
        }
      ],
      "title": "Active Pixels General",
      "type": "stat"
    },
    {
      "collapsed": false,
      "datasource": {
        "type": "datasource",
        "uid": "grafana"
      },
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 15
      },
      "id": 32,
      "panels": [],
      "targets": [
        {
          "datasource": {
            "type": "datasource",
            "uid": "grafana"
          },
          "refId": "A"
        }
      ],
      "title": "Selected Pixel(s)",
      "type": "row"
    },
    {
      "datasource": {
        "type": "influxdb",
        "uid": "$dataSource"
      },
      "description": "Shows the distribution of event types for pixel ID $tag",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            }
          },
          "mappings": [],
          "unit": "percent"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 4,
        "x": 0,
        "y": 16
      },
      "id": 10,
      "links": [],
      "maxDataPoints": 1,
      "options": {
        "legend": {
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "pieType": "pie",
        "reduceOptions": {
          "calcs": [
            "mean"
          ],
          "fields": "",
          "values": false
        },
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "pluginVersion": "7.0.3",
      "targets": [
        {
          "alias": "$tag_eventName",
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB}"
          },
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT count(\"value\") FROM $table WHERE $timeFilter  AND \"tagId\" =~ /^$tag$/ AND (\"eventName\" =~ /^$event$/)  GROUP BY \"eventName\"",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "tags": []
        }
      ],
      "title": "Events Distribution for Pixel(s)",
      "type": "piechart"
    },
    {
      "datasource": {
        "type": "influxdb",
        "uid": "$dataSource"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": "auto",
            "displayMode": "auto",
            "filterable": false,
            "inspect": false
          },
          "decimals": 1,
          "mappings": [
            {
              "options": {
                "19": {
                  "text": ""
                },
                "": {
                  "text": ""
                }
              },
              "type": "value"
            }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "string"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "eventName"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Event"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "tagId"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Tag Id"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Tag Id"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 106
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Event"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 96
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "value"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 66
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "confidence"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 99
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 11,
        "w": 14,
        "x": 4,
        "y": 16
      },
      "id": 12,
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "showHeader": true,
        "sortBy": [
          {
            "desc": true,
            "displayName": "Time"
          }
        ]
      },
      "pluginVersion": "9.2.3-997144b7",
      "targets": [
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB}"
          },
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "eventName"
              ],
              "type": "tag"
            },
            {
              "params": [
                "eventValue"
              ],
              "type": "tag"
            }
          ],
          "measurement": "events",
          "orderByTime": "ASC",
          "policy": "autogen",
          "query": "SELECT * FROM $table WHERE  (\"tagId\" =~ /^$tag$/) AND (\"eventName\" =~ /^$event$/)  AND $timeFilter ",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              }
            ]
          ],
          "tags": [
            {
              "key": "tagId",
              "operator": "=~",
              "value": "/^$tag$/"
            }
          ]
        }
      ],
      "title": "Selected Pixel(s) Events",
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "latitude": true,
              "longitude": true,
              "tagId": true,
              "timestamp": true,
              "value": true
            },
            "indexByName": {
              "Time": 0,
              "confidence": 4,
              "eventName": 1,
              "eventValue": 3,
              "gatewayId": 2,
              "latitude": 6,
              "longitude": 7,
              "tagId": 5,
              "timestamp": 8,
              "value": 9
            },
            "renameByName": {
              "confidence": "Confidence",
              "eventName": "Event",
              "eventValue": "Value",
              "gatewayId": "Gateway/Bridge"
            }
          }
        }
      ],
      "type": "table"
    },
    {
      "datasource": {
        "type": "influxdb",
        "uid": "$dataSource"
      },
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": "auto",
            "displayMode": "auto",
            "filterable": false,
            "inspect": false
          },
          "links": [],
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "gatewayId"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Gateway Id"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Time"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Last Event"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "last"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 1
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 11,
        "w": 6,
        "x": 18,
        "y": 16
      },
      "id": 22,
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "showHeader": true,
        "sortBy": [
          {
            "desc": false,
            "displayName": "first"
          }
        ]
      },
      "pluginVersion": "9.2.3-997144b7",
      "targets": [
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB}"
          },
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "tagId"
              ],
              "type": "tag"
            },
            {
              "params": [
                "previous"
              ],
              "type": "fill"
            }
          ],
          "measurement": "events",
          "orderByTime": "ASC",
          "policy": "autogen",
          "query": "SELECT last(\"value\") FROM $table  WHERE  $timeFilter  AND (\"tagId\" =~ /^$tag$/) GROUP BY \"gatewayId\"",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "first"
              }
            ]
          ],
          "tags": []
        }
      ],
      "title": "Gateways reporting PIxel",
      "type": "table"
    },
    {
      "datasource": {
        "type": "influxdb",
        "uid": "$dataSource"
      },
      "fieldConfig": {
        "defaults": {
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green"
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "celsius"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 4,
        "x": 0,
        "y": 23
      },
      "id": 8,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "mean"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "9.2.3-997144b7",
      "targets": [
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB}"
          },
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "orderByTime": "ASC",
          "policy": "autogen",
          "query": "SELECT last(\"value\") as temp FROM $db.\"autogen\".\"events\" WHERE $timeFilter and \"eventName\" = 'TEMP_C' and (\"tagId\" =~ /^$tag$/)",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "tags": []
        }
      ],
      "title": "Temp (C)",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "influxdb",
        "uid": "${DS_INFLUXDB}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "max": 40,
          "min": -10,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green"
              }
            ]
          },
          "unit": "celsius"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 6,
        "w": 24,
        "x": 0,
        "y": 27
      },
      "id": 43,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "targets": [
        {
          "alias": "$tag_tagId",
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB}"
          },
          "query": "SELECT value FROM events WHERE $timeFilter AND eventName = 'TEMP_C' AND tagId =~ /^$tag$/ GROUP BY tagId fill(previous)",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "time_series"
        }
      ],
      "title": "Pixel(s) Temperature over Time",
      "type": "timeseries"
    },
    {
      "collapsed": false,
      "datasource": {
        "type": "datasource",
        "uid": "grafana"
      },
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 33
      },
      "id": 34,
      "panels": [],
      "targets": [
        {
          "datasource": {
            "type": "datasource",
            "uid": "grafana"
          },
          "refId": "A"
        }
      ],
      "title": "Selected Gateway/Bridge: $gateway",
      "type": "row"
    },
    {
      "datasource": {
        "type": "influxdb",
        "uid": "$dataSource"
      },
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": "auto",
            "displayMode": "auto",
            "filterable": false,
            "inspect": false
          },
          "links": [],
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green"
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "string"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Last Event"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 164
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 6,
        "w": 8,
        "x": 0,
        "y": 34
      },
      "id": 28,
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "showHeader": true,
        "sortBy": [
          {
            "desc": true,
            "displayName": "Last Event"
          }
        ]
      },
      "pluginVersion": "9.2.3-997144b7",
      "targets": [
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB}"
          },
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "tagId"
              ],
              "type": "tag"
            },
            {
              "params": [
                "previous"
              ],
              "type": "fill"
            }
          ],
          "measurement": "events",
          "orderByTime": "ASC",
          "policy": "autogen",
          "query": "SELECT last(\"value\") as value FROM $table  WHERE  $timeFilter AND (\"gatewayId\" =~ /^$gateway$/) AND tagId !='null' GROUP BY \"tagId\"",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "first"
              }
            ]
          ],
          "tags": []
        }
      ],
      "title": "Tags reported by Gateway/Bridge",
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "value": true
            },
            "indexByName": {},
            "renameByName": {
              "tagId": "Pixel ID",
              "value": ""
            }
          }
        }
      ],
      "type": "table"
    },
    {
      "datasource": {
        "type": "datasource",
        "uid": "-- Dashboard --"
      },
      "fieldConfig": {
        "defaults": {
          "mappings": [],
          "noValue": "0",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green"
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 6,
        "w": 4,
        "x": 8,
        "y": 34
      },
      "id": 18,
      "options": {
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "distinctCount"
          ],
          "fields": "/^tagId$/",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "9.2.3-997144b7",
      "targets": [
        {
          "datasource": {
            "type": "datasource",
            "uid": "-- Dashboard --"
          },
          "panelId": 28,
          "refId": "A"
        }
      ],
      "title": "# Active Pixels",
      "type": "stat"
    }
  ],
  "refresh": "10s",
  "schemaVersion": 37,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "hide": 2,
        "label": "Data Source",
        "name": "dataSource",
        "query": "${VAR_DATASOURCE}",
        "skipUrlSync": false,
        "type": "constant",
        "current": {
          "value": "${VAR_DATASOURCE}",
          "text": "${VAR_DATASOURCE}",
          "selected": false
        },
        "options": [
          {
            "value": "${VAR_DATASOURCE}",
            "text": "${VAR_DATASOURCE}",
            "selected": false
          }
        ]
      },
      {
        "hide": 2,
        "label": "DB",
        "name": "db",
        "query": "${VAR_DB}",
        "skipUrlSync": false,
        "type": "constant",
        "current": {
          "value": "${VAR_DB}",
          "text": "${VAR_DB}",
          "selected": false
        },
        "options": [
          {
            "value": "${VAR_DB}",
            "text": "${VAR_DB}",
            "selected": false
          }
        ]
      },
      {
        "hide": 2,
        "name": "table",
        "query": "${VAR_TABLE}",
        "skipUrlSync": false,
        "type": "constant",
        "current": {
          "value": "${VAR_TABLE}",
          "text": "${VAR_TABLE}",
          "selected": false
        },
        "options": [
          {
            "value": "${VAR_TABLE}",
            "text": "${VAR_TABLE}",
            "selected": false
          }
        ]
      },
      {
        "current": {},
        "datasource": {
          "type": "influxdb",
          "uid": "${DS_INFLUXDB}"
        },
        "definition": "SHOW TAG VALUES ON $db  WITH KEY = \"tagId\"",
        "hide": 0,
        "includeAll": true,
        "label": "Pixel",
        "multi": true,
        "name": "tag",
        "options": [],
        "query": "SHOW TAG VALUES ON $db  WITH KEY = \"tagId\"",
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "current": {},
        "datasource": {
          "type": "influxdb",
          "uid": "${DS_INFLUXDB}"
        },
        "definition": "SHOW TAG VALUES ON $db  WITH KEY = \"eventName\"",
        "hide": 0,
        "includeAll": true,
        "label": "Event",
        "multi": true,
        "name": "event",
        "options": [],
        "query": "SHOW TAG VALUES ON $db  WITH KEY = \"eventName\"",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "current": {},
        "datasource": {
          "type": "influxdb",
          "uid": "${DS_INFLUXDB}"
        },
        "definition": "SHOW TAG VALUES ON $db  WITH KEY = \"gatewayId\"",
        "hide": 0,
        "includeAll": true,
        "label": "Gateway/Bridge",
        "multi": true,
        "name": "gateway",
        "options": [],
        "query": "SHOW TAG VALUES ON $db  WITH KEY = \"gatewayId\"",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "current": {},
        "datasource": {
          "type": "datasource",
          "uid": "grafana"
        },
        "definition": "",
        "hide": 0,
        "includeAll": false,
        "multi": false,
        "name": "query0",
        "options": [],
        "query": "",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "type": "query"
      }
    ]
  },
  "time": {
    "from": "now-1h",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ]
  },
  "timezone": "",
  "title": "Golani Dashboard",
  "uid": "2wZOIHHVz",
  "version": 9,
  "weekStart": "",
  "gnetId": 17365,
  "description": "Tesco monitoring"
}