updated Grafana Dashboard

This commit is contained in:
Mario Voigt 2018-11-30 15:58:11 +01:00
parent 46ad3fc911
commit 974562d69b

View File

@ -5,7 +5,7 @@
"type": "grafana", "type": "grafana",
"id": "grafana", "id": "grafana",
"name": "Grafana", "name": "Grafana",
"version": "5.2.4" "version": "5.3.4"
}, },
{ {
"type": "panel", "type": "panel",
@ -19,6 +19,12 @@
"name": "Graph", "name": "Graph",
"version": "5.0.0" "version": "5.0.0"
}, },
{
"type": "datasource",
"id": "mysql",
"name": "MySQL",
"version": "5.0.0"
},
{ {
"type": "panel", "type": "panel",
"id": "singlestat", "id": "singlestat",
@ -49,7 +55,7 @@
"gnetId": null, "gnetId": null,
"graphTooltip": 0, "graphTooltip": 0,
"id": null, "id": null,
"iteration": 1538682153418, "iteration": 1543579047007,
"links": [], "links": [],
"panels": [ "panels": [
{ {
@ -971,7 +977,7 @@
}, },
"id": 12, "id": 12,
"links": [], "links": [],
"pageSize": null, "pageSize": 8,
"scroll": true, "scroll": true,
"showHeader": true, "showHeader": true,
"sort": { "sort": {
@ -1053,8 +1059,8 @@
"links": [], "links": [],
"locationData": "table", "locationData": "table",
"mapCenter": "custom", "mapCenter": "custom",
"mapCenterLatitude": "0.0000", "mapCenterLatitude": "0.0",
"mapCenterLongitude": "0.0000", "mapCenterLongitude": "0.0",
"maxDataPoints": 1, "maxDataPoints": 1,
"mouseWheelZoom": true, "mouseWheelZoom": true,
"showLegend": false, "showLegend": false,
@ -4314,7 +4320,7 @@
"type": "count" "type": "count"
} }
], ],
"rawSql": "SELECT\n @row_number:=@row_number + 1 AS \"Nr.\",\n CONCAT(DATE_FORMAT(ADDTIME(n.date, SEC_TO_TIME(s.timezoneOffset*60)),'%d.%m.%Y %H:%i:%s'),' (',DAYNAME(ADDTIME(n.date, SEC_TO_TIME(s.timezoneOffset*60))),')') AS \"Datum\", -- +2 Stunden Aufschlag, da Zeitzone anders\n CASE \n WHEN n.trigger = 0 AND n.name != \"\" THEN CONCAT(n.name, \" (User)\")\n WHEN n.trigger = 0 AND n.name = \"\" THEN \"Positionserkennung (Smartlock)\"\n WHEN n.trigger = 1 THEN \"Manuell\"\n WHEN n.trigger = 2 THEN \"Manuell (Button)\"\n WHEN n.trigger = 3 THEN \"Automatisch\"\n WHEN n.trigger = 4 THEN \"Web\"\n WHEN n.trigger = 5 THEN \"App\" \n WHEN n.trigger = 6 THEN \"Auto Lock\"\n WHEN n.trigger = 255 THEN \"Keypad\"\n ELSE CONCAT(\"[\",n.trigger,\"] - \", \" Undefiniert\")\n END \"Trigger\", \n CASE \n WHEN n.action = 1 THEN \"Aufgesperrt\"\n WHEN n.action = 2 THEN \"Zugesperrt\"\n WHEN n.action = 3 THEN \"Tür geöffnet\"\n WHEN n.action = 4 THEN \"Lock 'n' Go\"\n WHEN n.action = 5 THEN \"Lock 'n' Go + Tür geöffnet\"\n WHEN n.action = 252 THEN \"Intialisiert\"\n WHEN n.action = 253 THEN \"Kalibriert\"\n WHEN n.action = 254 THEN \"Log aktiviert\"\n WHEN n.action = 255 THEN \"Log deaktiviert\"\n ELSE CONCAT(\"[\",n.action,\"] - \", \" Undefiniert\")\n END AS \"Aktion\",\n CASE\n WHEN n.state = 0 THEN \"OK\"\n WHEN n.state = 1 THEN \"Motor blockiert\"\n WHEN n.state = 2 THEN \"Abgebrochen\"\n WHEN n.state = 3 THEN \"Zu neu\"\n WHEN n.state = 4 THEN \"Beschäftigt\"\n WHEN n.state = 5 THEN \"Batterien zu schwach\"\n WHEN n.state = 6 THEN \"Kupplungsfehler\"\n WHEN n.state = 7 THEN \"Motorstromfehler\"\n WHEN n.state = 8 THEN \"Kalibriert\"\n WHEN n.state = 254 THEN \"Anderer Fehler\"\n WHEN n.state = 255 THEN \"Unbekannter Fehler\"\n ELSE CONCAT(\"[\",n.state,\"] - \", \" Undefiniert\")\n END AS \"Status\"\n /*n.trigger AS \"Trigger\" */\n /*n.autoUnlock AS \"Auto-Unlock\" */\n /*n.smartLockId AS \"\" */\n /*n.authId */\n /*n.id */\nFROM \n SmartlockLog AS n, \n Smartlock AS s,\n (SELECT @row_number:=0) AS t\nWHERE s.name = \"$SmartlockName\" \nORDER BY n.date DESC\n;", "rawSql": "SELECT\n @row_number:=@row_number + 1 AS \"Nr.\",\n CONCAT(DATE_FORMAT(ADDTIME(n.date, SEC_TO_TIME(s.timezoneOffset*60)),'%d.%m.%Y %H:%i:%s'),' (',DAYNAME(ADDTIME(n.date, SEC_TO_TIME(s.timezoneOffset*60))),')') AS \"Datum\", -- +2 Stunden Aufschlag, da Zeitzone anders\n CASE \n WHEN n.trigger = 0 AND n.name != \"\" THEN CONCAT(n.name, \" (User)\")\n WHEN n.trigger = 0 AND n.name = \"\" THEN \"Positionserkennung (Smartlock)\"\n WHEN n.trigger = 1 THEN \"Manuell\"\n WHEN n.trigger = 2 THEN \"Manuell (Button)\"\n WHEN n.trigger = 3 THEN \"Automatisch\"\n WHEN n.trigger = 4 THEN \"Web\"\n WHEN n.trigger = 5 THEN \"App\" \n WHEN n.trigger = 6 THEN \"Auto Lock\"\n WHEN n.trigger = 255 THEN \"Keypad\"\n ELSE CONCAT(\"[\",n.trigger,\"] - \", \" Undefiniert\")\n END \"Trigger\", \n CASE \n WHEN n.action = 1 THEN \"Aufgesperrt\"\n WHEN n.action = 2 THEN \"Zugesperrt\"\n WHEN n.action = 3 THEN \"Tür geöffnet\"\n WHEN n.action = 4 THEN \"Lock 'n' Go\"\n WHEN n.action = 5 THEN \"Lock 'n' Go + Tür geöffnet\"\n WHEN n.action = 252 THEN \"Initialisiert\"\n WHEN n.action = 253 THEN \"Kalibriert\"\n WHEN n.action = 254 THEN \"Log aktiviert\"\n WHEN n.action = 255 THEN \"Log deaktiviert\"\n ELSE CONCAT(\"[\",n.action,\"] - \", \" Undefiniert\")\n END AS \"Aktion\",\n CASE\n WHEN n.state = 0 THEN \"OK\"\n WHEN n.state = 1 THEN \"Motor blockiert\"\n WHEN n.state = 2 THEN \"Abgebrochen\"\n WHEN n.state = 3 THEN \"Zu neu\"\n WHEN n.state = 4 THEN \"Beschäftigt\"\n WHEN n.state = 5 THEN \"Batterien zu schwach\"\n WHEN n.state = 6 THEN \"Kupplungsfehler\"\n WHEN n.state = 7 THEN \"Motorstromfehler\"\n WHEN n.state = 8 THEN \"Kalibriert\"\n WHEN n.state = 254 THEN \"Anderer Fehler\"\n WHEN n.state = 255 THEN \"Unbekannter Fehler\"\n ELSE CONCAT(\"[\",n.state,\"] - \", \" Undefiniert\")\n END AS \"Status\"\n /*n.trigger AS \"Trigger\" */\n /*n.autoUnlock AS \"Auto-Unlock\" */\n /*n.smartLockId AS \"\" */\n /*n.authId */\n /*n.id */\nFROM \n SmartlockLog AS n, \n Smartlock AS s,\n (SELECT @row_number:=0) AS t\nWHERE s.name = \"$SmartlockName\" \nORDER BY n.date DESC\n;",
"refId": "A", "refId": "A",
"timeField": "date" "timeField": "date"
} }
@ -4335,12 +4341,12 @@
}, },
"id": 15, "id": 15,
"links": [], "links": [],
"pageSize": null, "pageSize": 8,
"scroll": true, "scroll": true,
"showHeader": true, "showHeader": true,
"sort": { "sort": {
"col": 4, "col": 5,
"desc": true "desc": false
}, },
"styles": [ "styles": [
{ {
@ -4359,22 +4365,6 @@
"type": "date", "type": "date",
"unit": "short" "unit": "short"
}, },
{
"alias": "",
"colorMode": null,
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"dateFormat": "HH:mm:ss DD.MM.YYYY",
"decimals": 2,
"mappingType": 1,
"pattern": "Letztes Update",
"thresholds": [],
"type": "date",
"unit": "short"
},
{ {
"alias": "", "alias": "",
"colorMode": null, "colorMode": null,
@ -4444,6 +4434,54 @@
"value": "1" "value": "1"
} }
] ]
},
{
"alias": "",
"colorMode": null,
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"dateFormat": "DD.MM.YYYY HH:mm",
"decimals": 2,
"mappingType": 1,
"pattern": "Erlaubnis von",
"thresholds": [],
"type": "date",
"unit": "short"
},
{
"alias": "",
"colorMode": null,
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"dateFormat": "DD.MM.YYYY HH:mm",
"decimals": 2,
"mappingType": 1,
"pattern": "Erlaubnis bis",
"thresholds": [],
"type": "date",
"unit": "short"
},
{
"alias": "",
"colorMode": null,
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"decimals": 2,
"mappingType": 1,
"pattern": "",
"thresholds": [],
"type": "number",
"unit": "short"
} }
], ],
"targets": [ "targets": [
@ -4470,7 +4508,7 @@
"type": "count" "type": "count"
} }
], ],
"rawSql": "SELECT\n @row_number:=@row_number + 1 AS \"Nr.\",\n n.name AS \"Trigger\",\n n.enabled AS \"Aktiviert\",\n n.remoteAllowed AS \"Remotezugriff\",\n ADDTIME(n.lastActiveDate, SEC_TO_TIME(s.timezoneOffset*60)) as \"Zuletzt aktiv\", -- +2 Stunden Aufschlag, da Zeitzone anders\n /*ADDTIME(updateDate, SEC_TO_TIME(s.timezoneOffset*60)) AS \"Letztes Update\", -- +2 Stunden Aufschlag, da Zeitzone anders*/\n n.lockCount AS \"Schließzyklen\",\n n.type AS \"Typ\"\n FROM \n SmartlockAuth AS n, \n Smartlock AS s,\n (SELECT @row_number:=0) AS t\n WHERE\n s.name =\"$SmartlockName\"\n;", "rawSql": "SELECT\n @row_number:=@row_number + 1 AS \"Nr.\",\n /*n.accountUserId,*/\n n.name AS \"Trigger\",\n n.enabled AS \"Aktiviert\",\n n.remoteAllowed AS \"Remotezugriff\",\n ADDTIME(n.lastActiveDate, SEC_TO_TIME(s.timezoneOffset*60)) AS \"Zuletzt aktiv\", -- +2 Stunden Aufschlag, da Zeitzone anders\n /*ADDTIME(updateDate, SEC_TO_TIME(s.timezoneOffset*60)) AS \"Letztes Update\", -- +2 Stunden Aufschlag, da Zeitzone anders*/\n ADDTIME(n.allowedFromDate, SEC_TO_TIME(s.timezoneOffset*60)) AS \"Erlaubnis von\",\n ADDTIME(n.allowedUntilDate, SEC_TO_TIME(s.timezoneOffset*60)) AS \"Erlaubnis bis\",\n TIME_FORMAT(SEC_TO_TIME(n.allowedFromTime * 60),'%H:%i') AS \"Wiederkehrend: von\",\n TIME_FORMAT(SEC_TO_TIME(n.allowedUntilTime * 60),'%H:%i') AS \"Wiederkehrend: bis\",\n DaysFromBitMask(n.allowedWeekDays) AS \"Erlaubte Wochentage\",\n n.lockCount AS \"Schließzyklen\",\n CASE \n WHEN n.type = 0 THEN \"App\"\n WHEN n.type = 1 THEN \"Bridge\"\n WHEN n.type = 2 THEN \"FOB\"\n WHEN n.type = 3 THEN \"Keypad\"\n WHEN n.type = 13 THEN \"Keypad Code\"\n WHEN n.type = 14 THEN \"Z-Key\"\n WHEN n.type = 15 THEN \"Virtual\"\n ELSE \"Undefiniert\" \n END \"Typ\"\n FROM \n SmartlockAuth AS n, \n Smartlock AS s,\n (SELECT @row_number:=0) AS t\n WHERE\n s.name =\"$SmartlockName\"\n;",
"refId": "A", "refId": "A",
"timeField": "date" "timeField": "date"
} }
@ -5844,7 +5882,7 @@
"type": "table" "type": "table"
} }
], ],
"refresh": "30s", "refresh": false,
"schemaVersion": 16, "schemaVersion": 16,
"style": "dark", "style": "dark",
"tags": [], "tags": [],
@ -5862,6 +5900,7 @@
"query": "mysql", "query": "mysql",
"refresh": 1, "refresh": 1,
"regex": ".*nuki.*", "regex": ".*nuki.*",
"skipUrlSync": false,
"type": "datasource" "type": "datasource"
}, },
{ {
@ -5877,6 +5916,7 @@
"query": "SELECT name FROM Smartlock;", "query": "SELECT name FROM Smartlock;",
"refresh": 1, "refresh": 1,
"regex": "", "regex": "",
"skipUrlSync": false,
"sort": 4, "sort": 4,
"tagValuesQuery": "", "tagValuesQuery": "",
"tags": [], "tags": [],
@ -5897,6 +5937,7 @@
"query": "SELECT SmartlockId FROM Smartlock AS s WHERE s.name = \"$SmartlockName\";", "query": "SELECT SmartlockId FROM Smartlock AS s WHERE s.name = \"$SmartlockName\";",
"refresh": 1, "refresh": 1,
"regex": "", "regex": "",
"skipUrlSync": false,
"sort": 0, "sort": 0,
"tagValuesQuery": "", "tagValuesQuery": "",
"tags": [], "tags": [],
@ -5917,6 +5958,7 @@
"query": "SELECT name FROM BridgeInfo AS b WHERE b.nukiId = \"$SmartlockId\";", "query": "SELECT name FROM BridgeInfo AS b WHERE b.nukiId = \"$SmartlockId\";",
"refresh": 1, "refresh": 1,
"regex": "", "regex": "",
"skipUrlSync": false,
"sort": 0, "sort": 0,
"tagValuesQuery": "", "tagValuesQuery": "",
"tags": [], "tags": [],
@ -5937,6 +5979,7 @@
"query": "SELECT SUBSTRING(\"$BridgeName\",6) FROM BridgeInfo;", "query": "SELECT SUBSTRING(\"$BridgeName\",6) FROM BridgeInfo;",
"refresh": 1, "refresh": 1,
"regex": "", "regex": "",
"skipUrlSync": false,
"sort": 0, "sort": 0,
"tagValuesQuery": "", "tagValuesQuery": "",
"tags": [], "tags": [],
@ -5947,8 +5990,8 @@
] ]
}, },
"time": { "time": {
"from": "now-6h", "from": "2018-11-30T01:03:32.232Z",
"to": "now" "to": "2018-11-30T13:03:32.232Z"
}, },
"timepicker": { "timepicker": {
"hidden": false, "hidden": false,
@ -5979,5 +6022,5 @@
"timezone": "", "timezone": "",
"title": "Nuki Smartlock + Bridge (Internals)", "title": "Nuki Smartlock + Bridge (Internals)",
"uid": "yEqqGFggz", "uid": "yEqqGFggz",
"version": 168 "version": 175
} }