{ "annotations": { "list": [] }, "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, "id": null, "links": [], "liveNow": false, "panels": [ { "id": 1, "type": "timeseries", "title": "Active power per device — $customer_code", "datasource": { "type": "postgres", "uid": "timescaledb" }, "gridPos": { "x": 0, "y": 0, "w": 24, "h": 9 }, "fieldConfig": { "defaults": { "unit": "kwatt", "color": { "mode": "palette-classic" }, "custom": { "drawStyle": "line", "lineWidth": 2, "fillOpacity": 10, "showPoints": "never", "spanNulls": false } } }, "options": { "tooltip": { "mode": "multi", "sort": "desc" }, "legend": { "displayMode": "list", "placement": "bottom", "showLegend": true } }, "targets": [ { "refId": "A", "datasource": { "type": "postgres", "uid": "timescaledb" }, "format": "time_series", "rawSql": "SELECT h.bucket AS time, d.\"Name\" AS metric, h.avg_kw AS value FROM fleet.hourly_per_device h JOIN fleet.\"Devices\" d ON d.\"CustomerId\" = h.\"CustomerId\" AND d.\"Id\" = h.\"DeviceId\" WHERE h.\"CustomerId\" = '$customer' AND $__timeFilter(h.bucket) ORDER BY 1" } ] }, { "id": 2, "type": "timeseries", "title": "Cumulative kWh imported per device", "datasource": { "type": "postgres", "uid": "timescaledb" }, "gridPos": { "x": 0, "y": 9, "w": 24, "h": 9 }, "fieldConfig": { "defaults": { "unit": "kwatth", "color": { "mode": "palette-classic" }, "custom": { "drawStyle": "line", "lineWidth": 2, "fillOpacity": 5, "showPoints": "never" } } }, "options": { "tooltip": { "mode": "multi", "sort": "desc" }, "legend": { "displayMode": "list", "placement": "bottom", "showLegend": true } }, "targets": [ { "refId": "A", "datasource": { "type": "postgres", "uid": "timescaledb" }, "format": "time_series", "rawSql": "SELECT m.\"Time\" AS time, d.\"Name\" AS metric, m.\"EnergyImportedKwh\" AS value FROM fleet.\"PowerMeasurements\" m JOIN fleet.\"Devices\" d ON d.\"CustomerId\" = m.\"CustomerId\" AND d.\"Id\" = m.\"DeviceId\" WHERE m.\"CustomerId\" = '$customer' AND $__timeFilter(m.\"Time\") AND m.\"EnergyImportedKwh\" IS NOT NULL ORDER BY m.\"Time\"" } ] }, { "id": 3, "type": "table", "title": "Recent ingest events", "datasource": { "type": "postgres", "uid": "timescaledb" }, "gridPos": { "x": 0, "y": 18, "w": 24, "h": 8 }, "targets": [ { "refId": "A", "datasource": { "type": "postgres", "uid": "timescaledb" }, "format": "table", "rawSql": "SELECT \"ReceivedAt\" AS \"Received\", \"BatchType\" AS \"Type\", \"RowsAccepted\" AS \"Accepted\", \"RowsRejected\" AS \"Rejected\", \"BatchBytes\" AS \"Bytes\", \"TimeSpread\" AS \"Spread\", \"Error\" AS \"Error\" FROM fleet.\"IngestEvents\" WHERE \"CustomerId\" = '$customer' ORDER BY \"ReceivedAt\" DESC LIMIT 25" } ] } ], "refresh": "30s", "schemaVersion": 38, "tags": ["fleet", "admin", "drilldown"], "templating": { "list": [ { "name": "customer", "label": "Customer", "type": "query", "datasource": { "type": "postgres", "uid": "timescaledb" }, "query": "SELECT \"Code\" || ' — ' || \"Name\" AS __text, \"Id\"::text AS __value FROM fleet.\"Customers\" ORDER BY \"Code\"", "refresh": 1, "multi": false, "includeAll": false, "current": {} }, { "name": "customer_code", "label": "Customer (display)", "type": "query", "datasource": { "type": "postgres", "uid": "timescaledb" }, "query": "SELECT \"Code\" AS __text, \"Code\" AS __value FROM fleet.\"Customers\" WHERE \"Id\"::text = '$customer'", "refresh": 2, "hide": 2, "multi": false, "includeAll": false, "current": {} } ] }, "time": { "from": "now-24h", "to": "now" }, "timepicker": {}, "timezone": "", "title": "Customer Drilldown", "uid": "customer-drilldown", "version": 1 }