From 84dbaa1604f53d0e71941a3e53fdf68c420d719b Mon Sep 17 00:00:00 2001 From: Skillet Date: Tue, 2 May 2023 12:17:43 -0400 Subject: [PATCH] initial commit of grafana boards --- Layer Statistics.json | 467 +++++++++++ Leaderboards.json | 348 ++++++++ Match info.json | 1136 ++++++++++++++++++++++++++ Player Statistics.json | 1739 ++++++++++++++++++++++++++++++++++++++++ Players Online.json | 441 ++++++++++ Seeding Board.json | 278 +++++++ Server Overview.json | 701 ++++++++++++++++ seeding stats.json | 205 +++++ 8 files changed, 5315 insertions(+) create mode 100644 Layer Statistics.json create mode 100644 Leaderboards.json create mode 100644 Match info.json create mode 100644 Player Statistics.json create mode 100644 Players Online.json create mode 100644 Seeding Board.json create mode 100644 Server Overview.json create mode 100644 seeding stats.json diff --git a/Layer Statistics.json b/Layer Statistics.json new file mode 100644 index 0000000..22b53ea --- /dev/null +++ b/Layer Statistics.json @@ -0,0 +1,467 @@ +{ + "__inputs": [ + { + "name": "DS_MYSQL", + "label": "MySQL", + "description": "", + "type": "datasource", + "pluginId": "mysql", + "pluginName": "MySQL" + } + ], + "__elements": {}, + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "9.4.7" + }, + { + "type": "datasource", + "id": "mysql", + "name": "MySQL", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "piechart", + "name": "Pie chart", + "version": "" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 13, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 2, + "options": { + "footer": { + "countRows": false, + "enablePagination": true, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [ + { + "desc": false, + "displayName": "layer" + } + ] + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT layer, winner as \"faction\", ((wins / matchcnt) * 100) as \"win percent\", wins as \"number of wins\", matchcnt as \"number of matches\"\nFROM (SELECT layer, winner, count(*) AS \"wins\",\n (\n SELECT count(*)\n FROM (\n SELECT mat.id, mat.layerClassname, mat.map, mat.layer, mat.startTime, mat.endTime, mat.winner, mat.server,\n (select avg(pc.players)\n from DBLog_PlayerCounts as pc\n where\n pc.`match`=mat.id\n ) as playercnt\n from DBLog_Matches as mat\n ) as mcdbm\n WHERE\n mcdbm.layer = dbm.layer and\n playercnt>50\n GROUP BY mcdbm.layer\n ) as \"matchcnt\"\nFROM (\n SELECT mat.id, mat.layerClassname, mat.map, mat.layer, mat.startTime, mat.endTime, mat.winner, mat.server,\n (select avg(pc.players)\n from DBLog_PlayerCounts as pc\n where\n pc.`match`=mat.id\n ) as playercnt\n from DBLog_Matches as mat\n ) as dbm\nWHERE\n dbm.layer IS NOT NULL AND\n dbm.winner IS NOT NULL AND\n not dbm.map=\"Jensen\\'s\" and\n not dbm.layerClassname REGEXP \".*_Seed_.*\" and\n playercnt>50 and\n dbm.server = $SERVER\nGROUP BY layer, winner\nORDER BY wins desc) AS winraw\nORDER BY `win percent` DESC, `number of matches` DESC", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Layer Info", + "type": "table" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [] + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 4, + "x": 0, + "y": 13 + }, + "id": 4, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "/^matches$/", + "values": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT dbmat.map, count(*) as \"matches\"\nFROM (\n SELECT mat.id, mat.layerClassname, mat.map, mat.layer, mat.startTime, mat.endTime, mat.winner, mat.server,\n (select avg(pc.players)\n from DBLog_PlayerCounts as pc\n where\n pc.`match`=mat.id\n ) as playercnt\n from DBLog_Matches as mat\n ) as dbmat\nwhere\n layer is not null and\n winner is not null and\n not map=\"Jensen\\'s\" AND\n not layerClassname regexp \".*_Seed_.*\" and\n playercnt>50 and\n server = $SERVER\ngroup by map\norder by matches", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Maps Played", + "type": "piechart" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false, + "width": 100 + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "layer" + }, + "properties": [ + { + "id": "custom.width" + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 7, + "x": 4, + "y": 13 + }, + "id": 6, + "options": { + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "select layer, substring_index(substring_index(layerClassname,'_',2),'_',-1) as gamemode,avg(time_to_sec(timediff(endTime, startTime)))/3600 as avgTime\nfrom (SELECT mat.id, mat.layerClassname, mat.map, mat.layer, mat.startTime, mat.endTime, mat.winner, mat.server,\n (select avg(pc.players)\n from DBLog_PlayerCounts as pc\n where\n pc.`match`=mat.id\n ) as playercnt\nfrom DBLog_Matches as mat where mat.layer is not null) as mt\nwhere playercnt > 50 and server = $SERVER\ngroup by layer\norder by avgTime desc", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "average lengths", + "type": "table" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 7, + "x": 11, + "y": 13 + }, + "id": 7, + "options": { + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "select substring_index(substring_index(layerClassname,'_',2),'_',-1) as gamemode,avg(time_to_sec(timediff(endTime, startTime)))/3600 as avgTime\nfrom (SELECT mat.id, mat.layerClassname, mat.map, mat.layer, mat.startTime, mat.endTime, mat.winner, mat.server,\n (select avg(pc.players)\n from DBLog_PlayerCounts as pc\n where\n pc.`match`=mat.id\n ) as playercnt\nfrom DBLog_Matches as mat where mat.layer is not null) as mt\nwhere playercnt > 50 and server = $SERVER and layerClassname not regexp \"Seed\"\ngroup by gamemode\norder by avgTime desc", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "average lengths", + "type": "table" + } + ], + "refresh": "5m", + "revision": 1, + "schemaVersion": 38, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": {}, + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "definition": "SELECT id as __value, trim(leading '[ASG] Asgard Eternal | ' from name) as __text\nFROM DBLog_Servers", + "hide": 0, + "includeAll": false, + "multi": false, + "name": "SERVER", + "options": [], + "query": "SELECT id as __value, trim(leading '[ASG] Asgard Eternal | ' from name) as __text\nFROM DBLog_Servers", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": { + "hidden": true + }, + "timezone": "", + "title": "Layer Statistics", + "uid": "ayrMxLA4k", + "version": 13, + "weekStart": "" +} \ No newline at end of file diff --git a/Leaderboards.json b/Leaderboards.json new file mode 100644 index 0000000..5d8cf24 --- /dev/null +++ b/Leaderboards.json @@ -0,0 +1,348 @@ +{ + "__inputs": [ + { + "name": "DS_MYSQL", + "label": "MySQL", + "description": "", + "type": "datasource", + "pluginId": "mysql", + "pluginName": "MySQL" + } + ], + "__elements": {}, + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "9.4.7" + }, + { + "type": "datasource", + "id": "mysql", + "name": "MySQL", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": false, + "inspect": false, + "width": 150 + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Player" + }, + "properties": [ + { + "id": "custom.filterable", + "value": true + }, + { + "id": "custom.width", + "value": 265 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "steamID" + }, + "properties": [ + { + "id": "custom.width", + "value": 162 + } + ] + } + ] + }, + "gridPos": { + "h": 23, + "w": 9, + "x": 0, + "y": 0 + }, + "id": 2, + "options": { + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "select\r\n lastName as Player,\r\n teamkills as 'Team Kills'\r\nfrom\r\n (\r\n select\r\n attacker as steamid,\r\n count(*) as teamkills\r\n from\r\n DBLog_Wounds\r\n join DBLog_Matches DLM on DBLog_Wounds.`match` = DLM.id\r\n where\r\n mapClassname not regexp \"Jensens_Range\"\r\n ${seed:value}\r\n and attacker != DBLog_Wounds.victim\r\n and teamkill = 1\r\n and DBLog_Wounds.server != 3\r\n group by\r\n attacker\r\n ) as tks\r\n join DBLog_SteamUsers DLSU on tks.steamid = DLSU.steamID\r\norder by\r\n `Team Kills` desc", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Team Kills", + "type": "table" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": false, + "inspect": false, + "width": 150 + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Player" + }, + "properties": [ + { + "id": "custom.filterable", + "value": true + }, + { + "id": "custom.width", + "value": 272 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "steamID" + }, + "properties": [ + { + "id": "custom.width", + "value": 158 + } + ] + } + ] + }, + "gridPos": { + "h": 23, + "w": 9, + "x": 9, + "y": 0 + }, + "id": 3, + "options": { + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "select\r\n lastName as Player,\r\n kills as 'Kills'\r\nfrom\r\n (\r\n select\r\n attacker as steamid,\r\n count(*) as kills\r\n from\r\n DBLog_Deaths\r\n join DBLog_Matches DLM on DBLog_Deaths.`match` = DLM.id\r\n where\r\n mapClassname not regexp \"Jensens_Range\"\r\n ${seed:value}\r\n and attacker != DBLog_Deaths.victim\r\n and teamkill = 0\r\n and DBLog_Deaths.server != 3\r\n group by\r\n attacker\r\n ) as tks\r\n join DBLog_SteamUsers DLSU on tks.steamid = DLSU.steamID\r\norder by\r\n `Kills` desc", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Kills", + "type": "table" + } + ], + "refresh": "", + "revision": 1, + "schemaVersion": 38, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": { + "selected": true, + "text": "no", + "value": "and layerClassname not regexp '_Seed_'" + }, + "hide": 0, + "includeAll": false, + "label": "Include Seeding", + "multi": false, + "name": "seed", + "options": [ + { + "selected": true, + "text": "no", + "value": "and layerClassname not regexp '_Seed_'" + }, + { + "selected": false, + "text": "yes", + "value": "and layerClassname is not null" + } + ], + "query": "no : and layerClassname not regexp '_Seed_', yes : and layerClassname is not null", + "queryValue": "", + "skipUrlSync": false, + "type": "custom" + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": { + "hidden": true + }, + "timezone": "", + "title": "Leaderboards", + "uid": "2n6lw-1Vz", + "version": 15, + "weekStart": "" +} \ No newline at end of file diff --git a/Match info.json b/Match info.json new file mode 100644 index 0000000..8c9535a --- /dev/null +++ b/Match info.json @@ -0,0 +1,1136 @@ +{ + "__inputs": [ + { + "name": "DS_MYSQL", + "label": "MySQL", + "description": "", + "type": "datasource", + "pluginId": "mysql", + "pluginName": "MySQL" + } + ], + "__elements": {}, + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "9.4.7" + }, + { + "type": "datasource", + "id": "mysql", + "name": "MySQL", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "piechart", + "name": "Pie chart", + "version": "" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byType", + "options": "number" + }, + "properties": [ + { + "id": "custom.width", + "value": 100 + } + ] + } + ] + }, + "gridPos": { + "h": 4, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 6, + "options": { + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT startTime, map, layer, time_to_sec(timediff(endTime, startTime))/3600 as Length,\n (SELECT AVG(players)\n FROM DBLog_PlayerCounts as pc\n WHERE\n pc.`server` = $SERVER AND\n pc.`match` = $MATCH) as \"player count\",\n (SELECT AVG(publicQueue)\n FROM DBLog_PlayerCounts as pc\n WHERE\n pc.`server` = $SERVER AND\n pc.`match` = $MATCH) as \"queue count\",\n winner\nFROM DBLog_Matches\nWHERE\n`server` = $SERVER AND\n`id` = $MATCH", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Match Details", + "type": "table" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 4 + }, + "id": 12, + "panels": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [] + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 5 + }, + "id": 9, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT COUNT(*) AS \"Team 1\"\nFROM DBLog_Revives\nWHERE \n`server` = $SERVER AND\n`match` = $MATCH AND\nvictimTeamID = 1;", + "refId": "Team 1", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT COUNT(*) AS \"Team 2\"\nFROM DBLog_Revives\nWHERE \n`server` = $SERVER AND\n`match` = $MATCH AND\nvictimTeamID = 2;", + "refId": "Team 2", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Revives", + "type": "piechart" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [] + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 5 + }, + "id": 10, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT COUNT(*) AS \"Team 1\"\nFROM DBLog_Wounds\nWHERE \n`server` = $SERVER AND\n`match` = $MATCH AND\nteamkill = 0 AND\nvictimTeamID = 1;", + "refId": "Team 1", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT COUNT(*) AS \"Team 2\"\nFROM DBLog_Wounds\nWHERE \n`server` = $SERVER AND\n`match` = $MATCH AND\nteamkill = 0 AND\nvictimTeamID = 2;", + "refId": "Team 2", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Wounded", + "type": "piechart" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [] + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 13 + }, + "id": 4, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT COUNT(*) AS \"Team 1 Deaths\"\nFROM DBLog_Deaths\nWHERE \n`server` = $SERVER AND\n`match` = $MATCH AND\nvictimTeamID = 1;", + "refId": "Team 1 Deaths", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT COUNT(*) AS \"Team 1 Revives\"\nFROM DBLog_Revives\nWHERE\n`server` = $SERVER AND\n`match` = $MATCH AND\nvictimTeamID = 1;", + "refId": "Team 1 Revives", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Team 1 Revives and Deaths", + "type": "piechart" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [] + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 13 + }, + "id": 2, + "options": { + "displayLabels": [], + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true, + "values": [] + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [], + "fields": "/.*/", + "values": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "dataset": "squadjs", + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT COUNT(*) AS \"Team 1 Kills\"\nFROM DBLog_Deaths\nWHERE `server` = $SERVER AND\n `match` = $MATCH AND\n teamkill = 0 AND\n attackerTeamID = 1", + "refId": "Kills", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT COUNT(*) AS \"Team 1 Wounds\"\nFROM DBLog_Revives\nWHERE `server` = $SERVER AND\n `match` = $MATCH AND\n teamkill = 0 AND\n victimTeamID = 2", + "refId": "Incaps", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Team 1 Kills and Incaps", + "type": "piechart" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [] + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 21 + }, + "id": 7, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT COUNT(*) AS \"Team 2 Deaths\"\nFROM DBLog_Deaths\nWHERE \n`server` = $SERVER AND\n`match` = $MATCH AND\nvictimTeamID = 2;", + "refId": "Team 2 Deaths", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT COUNT(*) AS \"Team 2 Revives\"\nFROM DBLog_Revives\nWHERE\n`server` = $SERVER AND\n`match` = $MATCH AND\nvictimTeamID = 2;", + "refId": "Team 2 Revives", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Team 2 Revives and Deaths", + "type": "piechart" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [] + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 21 + }, + "id": 8, + "options": { + "displayLabels": [], + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true, + "values": [] + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [], + "fields": "/.*/", + "values": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "dataset": "squadjs", + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT COUNT(*) AS \"Team 2 Kills\"\nFROM DBLog_Deaths\nWHERE `server` = $SERVER AND\n `match` = $MATCH AND\n teamkill = 0 AND\n attackerTeamID = 2", + "refId": "Kills", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT COUNT(*) AS \"Team 2 Wounds\"\nFROM DBLog_Revives\nWHERE `server` = $SERVER AND\n `match` = $MATCH AND\n teamkill = 0 AND\n victimTeamID = 1", + "refId": "Incaps", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Team 2 Kills and Incaps", + "type": "piechart" + } + ], + "title": "Match Stats", + "type": "row" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 5 + }, + "id": 14, + "panels": [], + "title": "Score Board", + "type": "row" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "color-text" + }, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "text", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "squadID" + }, + "properties": [ + { + "id": "custom.align", + "value": "left" + }, + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byType", + "options": "number" + }, + "properties": [ + { + "id": "custom.width", + "value": 100 + } + ] + } + ] + }, + "gridPos": { + "h": 15, + "w": 12, + "x": 0, + "y": 6 + }, + "id": 17, + "options": { + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "select lastName, killt.squadID, kills, deaths, incaps\nfrom (\n select attacker, attackerTeamID as teamID, attackerSquadID as squadID, count(*) as kills\n from DBLog_Deaths\n where `match`=$MATCH and teamkill != 1\n group by attacker\n) as killt join (\n select victim, attackerTeamID as teamID, attackerSquadID as squadID, count(*) as deaths\n from DBLog_Deaths\n where `match`=$MATCH and teamkill != 1\n group by victim\n) as deatht on killt.attacker=deatht.victim join (\n select attacker, attackerTeamID as teamID, attackerSquadID as squadID, count(*) as incaps\n from DBLog_Wounds\n where `match`=$MATCH and teamkill != 1\n group by attacker\n) as woundt on killt.attacker=woundt.attacker join DBLog_SteamUsers on killt.attacker=DBLog_SteamUsers.steamID\nwhere killt.teamID=1\norder by squadID, kills desc, lastName", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Team 1", + "type": "table" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "color-text" + }, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "text", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "squadID" + }, + "properties": [ + { + "id": "custom.align", + "value": "left" + }, + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byType", + "options": "number" + }, + "properties": [ + { + "id": "custom.width", + "value": 100 + } + ] + } + ] + }, + "gridPos": { + "h": 15, + "w": 12, + "x": 12, + "y": 6 + }, + "id": 18, + "options": { + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "select lastName, killt.squadID, kills, deaths, incaps\nfrom (\n select attacker, attackerTeamID as teamID, attackerSquadID as squadID, count(*) as kills\n from DBLog_Deaths\n where `match`=$MATCH and teamkill != 1\n group by attacker\n) as killt join (\n select victim, attackerTeamID as teamID, attackerSquadID as squadID, count(*) as deaths\n from DBLog_Deaths\n where `match`=$MATCH and teamkill != 1\n group by victim\n) as deatht on killt.attacker=deatht.victim join (\n select attacker, attackerTeamID as teamID, attackerSquadID as squadID, count(*) as incaps\n from DBLog_Wounds\n where `match`=$MATCH and teamkill != 1\n group by attacker\n) as woundt on killt.attacker=woundt.attacker join DBLog_SteamUsers on killt.attacker=DBLog_SteamUsers.steamID\nwhere killt.teamID=2\norder by squadID, kills desc, lastName", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Team 2", + "type": "table" + } + ], + "refresh": "", + "revision": 1, + "schemaVersion": 38, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": {}, + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "definition": "SELECT id as __value, trim(leading '[ASG] Asgard Eternal | ' from name) as __text\nFROM DBLog_Servers", + "hide": 0, + "includeAll": false, + "label": "Server Name", + "multi": false, + "name": "SERVER", + "options": [], + "query": "SELECT id as __value, trim(leading '[ASG] Asgard Eternal | ' from name) as __text\nFROM DBLog_Servers", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 3, + "type": "query" + }, + { + "current": {}, + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "definition": "SELECT dbmat.id\nFROM (\n SELECT mat.id, mat.layerClassname, mat.map, mat.layer, mat.startTime, mat.endTime, mat.winner, mat.server,\n (select avg(pc.players)\n from DBLog_PlayerCounts as pc\n where\n pc.`match`=mat.id\n ) as playercnt\n from DBLog_Matches as mat\n ) as dbmat\nWHERE server=$SERVER and playercnt>50 and winner is not null;", + "hide": 0, + "includeAll": false, + "label": "Match ID", + "multi": false, + "name": "MATCH", + "options": [], + "query": "SELECT dbmat.id\nFROM (\n SELECT mat.id, mat.layerClassname, mat.map, mat.layer, mat.startTime, mat.endTime, mat.winner, mat.server,\n (select avg(pc.players)\n from DBLog_PlayerCounts as pc\n where\n pc.`match`=mat.id\n ) as playercnt\n from DBLog_Matches as mat\n ) as dbmat\nWHERE server=$SERVER and playercnt>50 and winner is not null;", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 4, + "type": "query" + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Match info", + "uid": "fCqwVL04z", + "version": 18, + "weekStart": "" +} \ No newline at end of file diff --git a/Player Statistics.json b/Player Statistics.json new file mode 100644 index 0000000..8391df0 --- /dev/null +++ b/Player Statistics.json @@ -0,0 +1,1739 @@ +{ + "__inputs": [ + { + "name": "DS_MYSQL", + "label": "MySQL", + "description": "", + "type": "datasource", + "pluginId": "mysql", + "pluginName": "MySQL" + }, + { + "name": "DS_EXPRESSION", + "label": "Expression", + "description": "", + "type": "datasource", + "pluginId": "__expr__" + } + ], + "__elements": {}, + "__requires": [ + { + "type": "datasource", + "id": "__expr__", + "version": "1.0.0" + }, + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "9.4.7" + }, + { + "type": "datasource", + "id": "mysql", + "name": "MySQL", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "piechart", + "name": "Pie chart", + "version": "" + }, + { + "type": "panel", + "id": "stat", + "name": "Stat", + "version": "" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "description": "", + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 29, + "panels": [], + "title": "Standard Stats", + "type": "row" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 4, + "x": 0, + "y": 1 + }, + "id": 21, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "/.*/", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "select lastName as 'Player Name', steamID as 'Steam ID'\nfrom DBLog_SteamUsers\nwhere steamID = $PLAYERID ", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Player ID", + "type": "stat" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 20, + "x": 4, + "y": 1 + }, + "id": 2, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "vertical", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "/.*/", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "select count(*) as Incaps\n from DBLog_Wounds\n join DBLog_Matches DLM on DBLog_Wounds.`match` = DLM.id\n where attacker = $PLAYERID\n and victim != $PLAYERID\n and teamkill = 0\n and DBLog_Wounds.server != 3\n and map != 'Jensen\\'s'\n ${seed:value}", + "refId": "Incaps", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "select count(*) as Kills\n from DBLog_Deaths\n join DBLog_Matches DLM on DBLog_Deaths.`match` = DLM.id\n where attacker = $PLAYERID\n and victim != $PLAYERID\n and teamkill = 0\n and DBLog_Deaths.server != 3\n and map != 'Jensen\\'s'\n ${seed:value}", + "refId": "Kills", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "select count(*) as Fallen\n from DBLog_Wounds\n join DBLog_Matches DLM on DBLog_Wounds.`match` = DLM.id\n where victim = $PLAYERID\n and attacker != $PLAYERID\n and teamkill = 0\n and DBLog_Wounds.server != 3\n and map != 'Jensen\\'s'\n ${seed:value}", + "refId": "Fallen", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "select count(*) as Deaths\n from DBLog_Deaths\n join DBLog_Matches DLM on DBLog_Deaths.`match` = DLM.id\n where victim = $PLAYERID\n and attacker != $PLAYERID\n and teamkill = 0\n and DBLog_Deaths.server != 3\n and map != 'Jensen\\'s'\n ${seed:value}", + "refId": "Deaths", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "__expr__", + "uid": "${DS_EXPRESSION}" + }, + "expression": "$Incaps/$Fallen", + "hide": false, + "refId": "IPF", + "type": "math" + }, + { + "datasource": { + "type": "__expr__", + "uid": "${DS_EXPRESSION}" + }, + "expression": "$Incaps/$Deaths", + "hide": false, + "refId": "IPD", + "type": "math" + }, + { + "datasource": { + "type": "__expr__", + "uid": "${DS_EXPRESSION}" + }, + "expression": "$Kills/$Deaths", + "hide": false, + "refId": "KDR", + "type": "math" + } + ], + "title": "Kills and Deaths", + "type": "stat" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [] + }, + "overrides": [] + }, + "gridPos": { + "h": 13, + "w": 4, + "x": 0, + "y": 5 + }, + "id": 4, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "/^Incaps$/", + "limit": 25, + "values": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "select weapon as 'Weapon', count(*) as 'Incaps'\nfrom DBLog_Wounds join DBLog_Matches DLM on DBLog_Wounds.`match` = DLM.id\nwhere attacker = $PLAYERID\n and teamkill = 0\n and DBLog_Wounds.server != 3\n and map != 'Jensen\\'s'\n ${seed:value}\ngroup by weapon\norder by Incaps desc", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Weapon Usage (Incaps) (Top 25)", + "type": "piechart" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 12, + "x": 4, + "y": 5 + }, + "id": 6, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "select incaps/matches as 'Incaps', kills/matches as 'Kills', downed/matches as 'Fallen', deaths/matches as 'Deaths'\nfrom (select lastname,\n steamID,\n (select count(*)\n from DBLog_Wounds\n join DBLog_Matches DLM on DBLog_Wounds.`match` = DLM.id\n where attacker = $PLAYERID\n and victim != $PLAYERID\n and teamkill = 0\n and DBLog_Wounds.server != 3\n and map != 'Jensen\\'s'\n ${seed:value}) as incaps,\n (select count(*)\n from DBLog_Deaths\n join DBLog_Matches DLM on DBLog_Deaths.`match` = DLM.id\n where attacker = $PLAYERID\n and victim != $PLAYERID\n and teamkill = 0\n and DBLog_Deaths.server != 3\n and map != 'Jensen\\'s'\n ${seed:value}) as kills,\n (select count(*)\n from DBLog_Wounds\n join DBLog_Matches DLM on DBLog_Wounds.`match` = DLM.id\n where victim = $PLAYERID\n and attacker != $PLAYERID\n and teamkill = 0\n and DBLog_Wounds.server != 3\n and map != 'Jensen\\'s'\n ${seed:value}) as downed,\n (select count(*)\n from DBLog_Deaths\n join DBLog_Matches DLM on DBLog_Deaths.`match` = DLM.id\n where victim = $PLAYERID\n and attacker != $PLAYERID\n and teamkill = 0\n and DBLog_Deaths.server != 3\n and map != 'Jensen\\'s'\n ${seed:value}) as deaths,\n (select count(*)\n from (select D.id\n from DBLog_Wounds join DBLog_Matches D on DBLog_Wounds.`match` = D.id\n where (victim = $PLAYERID or attacker = $PLAYERID)\n and D.server != 3\n and map != 'Jensen\\'s'\n ${seed:value}\n group by D.id) as matches\n ) as matches\n from DBLog_SteamUsers\n where steamID = $PLAYERID\n ) as psr", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Kills and Deaths per Match", + "type": "stat" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "blue", + "value": null + }, + { + "color": "green", + "value": 100 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 8, + "x": 16, + "y": 5 + }, + "id": 19, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "vertical", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "select count(*) as Matches\n from (select D.id\n from DBLog_Wounds join DBLog_Matches D on DBLog_Wounds.`match` = D.id\n where (victim = $PLAYERID or attacker = $PLAYERID)\n and D.server != 3\n and map != 'Jensen\\'s'\n ${seed:value}\n group by D.id) as matches", + "refId": "B", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "select sum(time_to_sec(timediff(ifnull(endTime,now()),startTime))/3600) as 'Total Hours'\nfrom DBLog_PlayerTimes\nwhere server != 3 \n and player = $PLAYERID\nlimit 1", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "__expr__", + "uid": "${DS_EXPRESSION}" + }, + "expression": "$A/$B", + "hide": false, + "refId": "HPM", + "type": "math" + } + ], + "title": "Amount Played", + "type": "stat" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 18, + "x": 4, + "y": 9 + }, + "id": 8, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "select revives as 'Revives', revived as 'Revived', (revives/deaths) as 'Revives per Death', (revived/deaths) as 'Revived per Death', revives/matches as 'Revives per Match', revived/matches as 'Revived per Match'\nfrom (select lastname,\n steamID,\n (select count(*)\n from DBLog_Revives join DBLog_Matches DLM on DBLog_Revives.`match` = DLM.id\n where reviver = $PLAYERID\n and teamkill = 0\n and DLM.server != 3\n and map != 'Jensen\\'s'\n ${seed:value}) as revives,\n (select count(*)\n from DBLog_Revives join DBLog_Matches DLM on DBLog_Revives.`match` = DLM.id\n where victim = $PLAYERID\n and teamkill = 0\n and DLM.server != 3\n and map != 'Jensen\\'s'\n ${seed:value}) as revived,\n (select count(*)\n from DBLog_Deaths\n join DBLog_Matches DLM on DBLog_Deaths.`match` = DLM.id\n where victim = $PLAYERID\n and attacker != $PLAYERID\n and teamkill = 0\n and DBLog_Deaths.server != 3\n and map != 'Jensen\\'s'\n ${seed:value}) as deaths,\n (select count(*)\n from (select D.id\n from DBLog_Wounds join DBLog_Matches D on DBLog_Wounds.`match` = D.id\n where (victim = 76561198221715432 or attacker = 76561198221715432)\n and D.server != 3\n and map != 'Jensen\\'s'\n ${seed:value}\n group by D.id) as matches\n ) as matches\n from DBLog_SteamUsers\n where steamID = $PLAYERID\n ) as psr", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Revives and Deaths", + "type": "stat" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 18, + "x": 4, + "y": 13 + }, + "id": 10, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "select tks as 'TKs', tked as 'TKed', (tks/deaths) as 'TKs per Death', (tked/deaths) as 'TKed per Death', tks/matches as 'TKs per Match', tked/matches as 'TKed per Match'\nfrom (select lastname,\n steamID,\n (select count(*)\n from DBLog_Wounds join DBLog_Matches DLM on DBLog_Wounds.`match` = DLM.id\n where attacker = $PLAYERID\n and victim != $PLAYERID\n and teamkill = 1\n and DLM.server != 3\n and map != 'Jensen\\'s'\n ${seed:value}) as tks,\n (select count(*)\n from DBLog_Wounds join DBLog_Matches DLM on DBLog_Wounds.`match` = DLM.id\n where victim = $PLAYERID\n and attacker != $PLAYERID\n and teamkill = 1\n and DLM.server != 3\n and map != 'Jensen\\'s'\n ${seed:value}) as tked,\n (select count(*)\n from DBLog_Deaths\n join DBLog_Matches DLM on DBLog_Deaths.`match` = DLM.id\n where victim = $PLAYERID\n and teamkill = 0\n and DBLog_Deaths.server != 3\n and map != 'Jensen\\'s'\n ${seed:value}) as deaths,\n (select count(*)\n from (select D.id\n from DBLog_Wounds join DBLog_Matches D on DBLog_Wounds.`match` = D.id\n where (victim = 76561198221715432 or attacker = 76561198221715432)\n and D.server != 3\n and map != 'Jensen\\'s'\n ${seed:value}\n group by D.id) as matches\n ) as matches\n from DBLog_SteamUsers\n where steamID = $PLAYERID\n ) as psr", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "TKs", + "type": "stat" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 18 + }, + "id": 23, + "panels": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [] + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 4, + "x": 0, + "y": 2 + }, + "id": 12, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "select victimName as 'Player', count(*) as 'Incaps'\nfrom DBLog_Wounds join DBLog_Matches DLM on DBLog_Wounds.`match` = DLM.id\nwhere attacker = $PLAYERID \n and victim is not null\n and victim != $PLAYERID \n and teamkill = 0\n and DBLog_Wounds.server != 3\n and map != 'Jensen\\'s'\n ${seed:value}\ngroup by victim\norder by Incaps desc", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Incaps (Top 25)", + "type": "piechart" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [] + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 4, + "x": 4, + "y": 2 + }, + "id": 13, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "select victimName as 'Player', count(*) as 'Kills'\nfrom DBLog_Deaths join DBLog_Matches DLM on DBLog_Deaths.`match` = DLM.id\nwhere attacker = $PLAYERID\n and victim is not null\n and victim != $PLAYERID\n and teamkill = 0\n and DLM.server != 3\n and map != 'Jensen\\'s'\n ${seed:value}\ngroup by victim\norder by Kills desc", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Kills (Top 25)", + "type": "piechart" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [] + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 4, + "x": 8, + "y": 2 + }, + "id": 14, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "select attackerName as 'Player', count(*) as 'Fallen'\nfrom DBLog_Wounds join DBLog_Matches DLM on DBLog_Wounds.`match` = DLM.id\nwhere victim = $PLAYERID\n and attacker != $PLAYERID\n and teamkill = 0\n and DLM.server != 3\n and map != 'Jensen\\'s'\n ${seed:value}\ngroup by attacker\norder by Fallen desc", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Fallen (Top 25)", + "type": "piechart" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [] + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 4, + "x": 12, + "y": 2 + }, + "id": 15, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "select attackerName as 'Player', count(*) as 'Kills'\nfrom DBLog_Deaths join DBLog_Matches DLM on DBLog_Deaths.`match` = DLM.id\nwhere victim = $PLAYERID\n and attacker != $PLAYERID\n and teamkill = 0\n and DLM.server != 3\n and map != 'Jensen\\'s'\n ${seed:value}\ngroup by attacker\norder by Kills desc", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Deaths (Top 25)", + "type": "piechart" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [] + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 4, + "x": 0, + "y": 11 + }, + "id": 24, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "select victimName as 'Player', count(*) as 'Revives'\nfrom DBLog_Revives join DBLog_Matches DLM on DBLog_Revives.`match` = DLM.id\nwhere victim != $PLAYERID \n and reviver = $PLAYERID \n and teamkill != 1\n and DLM.server != 3\n and map != 'Jensen\\'s'\n ${seed:value}\ngroup by victim\norder by Revives desc", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Revives (Top 25)", + "type": "piechart" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [] + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 4, + "x": 4, + "y": 11 + }, + "id": 25, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "select reviverName as 'Player', count(*) as 'Revived'\nfrom DBLog_Revives join DBLog_Matches DLM on DBLog_Revives.`match` = DLM.id\nwhere victim = $PLAYERID \n and reviver != $PLAYERID \n and teamkill != 1\n and DLM.server != 3\n and map != 'Jensen\\'s'\n ${seed:value}\ngroup by reviver\norder by Revived desc", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Revived (Top 25)", + "type": "piechart" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [] + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 4, + "x": 8, + "y": 11 + }, + "id": 17, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "select victimName as 'Player', count(*) as 'TKs'\nfrom DBLog_Wounds join DBLog_Matches DLM on DBLog_Wounds.`match` = DLM.id\nwhere victim != $PLAYERID \n and attacker = $PLAYERID \n and teamkill = 1\n and DLM.server != 3\n and map != 'Jensen\\'s'\n ${seed:value}\ngroup by victim\norder by TKs desc", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "TKs (Top 25)", + "type": "piechart" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [] + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 4, + "x": 12, + "y": 11 + }, + "id": 16, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "select attackerName as 'Player', count(*) as 'TKed'\nfrom DBLog_Wounds join DBLog_Matches DLM on DBLog_Wounds.`match` = DLM.id\nwhere victim = $PLAYERID \n and attacker != $PLAYERID \n and teamkill = 1\n and DLM.server != 3\n and map != 'Jensen\\'s'\n ${seed:value}\ngroup by attacker\norder by TKed desc", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "TKed (Top 25)", + "type": "piechart" + } + ], + "title": "Pie Charts", + "type": "row" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 19 + }, + "id": 31, + "panels": [], + "title": "Time Graphs", + "type": "row" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "scheme", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "#EAB839", + "value": 1 + }, + { + "color": "#6ED0E0", + "value": 2 + }, + { + "color": "green", + "value": 3 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "kills" + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": false, + "tooltip": false, + "viz": true + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "deaths" + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": false, + "tooltip": false, + "viz": true + } + } + ] + } + ] + }, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 20 + }, + "id": 27, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "select time, kills/deaths as KDR\nfrom (\nselect time, sum(deaths) over (order by time) as deaths, sum(kills) over (order by time) as kills\nfrom\n(select DBLog_Deaths.time,\n if(victim = $PLAYERID, 1, 0) as deaths,\n if(attacker = $PLAYERID, 1, 0) as kills\n from DBLog_Deaths\n join DBLog_Matches DLM on DBLog_Deaths.`match` = DLM.id\n where ((attacker != $PLAYERID \n and victim = $PLAYERID) or\n (attacker = $PLAYERID \n and victim != $PLAYERID))\n and teamkill = 0\n and DBLog_Deaths.server != 3\n and map != 'Jensen\\'s') as kdtime) as kdsum", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "select time, kills/deaths as IPF\nfrom (\nselect time, sum(deaths) over (order by time) as deaths, sum(kills) over (order by time) as kills\nfrom\n(select DBLog_Wounds.time,\n if(victim = $PLAYERID, 1, 0) as deaths,\n if(attacker = $PLAYERID, 1, 0) as kills\n from DBLog_Wounds\n join DBLog_Matches DLM on DBLog_Wounds.`match` = DLM.id\n where ((attacker != $PLAYERID \n and victim = $PLAYERID) or\n (attacker = $PLAYERID \n and victim != $PLAYERID))\n and teamkill = 0\n and DBLog_Wounds.server != 3\n and map != 'Jensen\\'s') as kdtime) as kdsum", + "refId": "B", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "KDR / IPF", + "transformations": [], + "type": "timeseries" + } + ], + "refresh": "", + "revision": 1, + "schemaVersion": 38, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": {}, + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "definition": "select steamID as __value, lastName as __text\nfrom DBLog_SteamUsers", + "hide": 0, + "includeAll": false, + "label": "Player Name", + "multi": false, + "name": "PLAYERID", + "options": [], + "query": "select steamID as __value, lastName as __text\nfrom DBLog_SteamUsers", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "type": "query" + }, + { + "current": { + "selected": false, + "text": "no", + "value": "and layerClassname not regexp '_Seed_'" + }, + "hide": 0, + "includeAll": false, + "label": "Include Seeding", + "multi": false, + "name": "seed", + "options": [ + { + "selected": true, + "text": "no", + "value": "and layerClassname not regexp '_Seed_'" + }, + { + "selected": false, + "text": "yes", + "value": "and layerClassname is not null" + } + ], + "query": "no : and layerClassname not regexp '_Seed_', yes : and layerClassname is not null", + "queryValue": "", + "skipUrlSync": false, + "type": "custom" + } + ] + }, + "time": { + "from": "now-90d", + "to": "now" + }, + "timepicker": { + "hidden": false + }, + "timezone": "", + "title": "Player Statistics", + "uid": "TzfIX4Y4z", + "version": 33, + "weekStart": "" +} \ No newline at end of file diff --git a/Players Online.json b/Players Online.json new file mode 100644 index 0000000..899398a --- /dev/null +++ b/Players Online.json @@ -0,0 +1,441 @@ +{ + "__inputs": [ + { + "name": "DS_MYSQL", + "label": "MySQL", + "description": "", + "type": "datasource", + "pluginId": "mysql", + "pluginName": "MySQL" + } + ], + "__elements": {}, + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "9.4.7" + }, + { + "type": "datasource", + "id": "mysql", + "name": "MySQL", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 5, + "options": { + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT lastName as 'Player',\r\n player as 'Steam ID',\r\n startTime as 'Logged on at'\r\nFROM DBLog_PlayerTimes JOIN DBLog_SteamUsers on (DBLog_PlayerTimes.player = DBLog_SteamUsers.steamID)\r\nWHERE endTime is null and\r\n startTime is not null and\r\n player is not null and\r\n lastName regexp '\\\\{ASG[a,o]\\\\}.*' and\r\n server=1", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Admins Online", + "type": "table" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 6, + "options": { + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT lastName as 'Player',\r\n player as 'Steam ID',\r\n startTime as 'Logged on at'\r\nFROM DBLog_PlayerTimes JOIN DBLog_SteamUsers on (DBLog_PlayerTimes.player = DBLog_SteamUsers.steamID)\r\nWHERE endTime is null and\r\n startTime is not null and\r\n player is not null and\r\n lastName regexp '\\\\{ASG[a,o]\\\\}.*' and\r\n server=2", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Admins Online", + "type": "table" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 15, + "w": 12, + "x": 0, + "y": 7 + }, + "id": 2, + "options": { + "footer": { + "countRows": false, + "enablePagination": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT lastName as 'Player',\n player as 'Steam ID',\n startTime as 'Logged on at'\nFROM DBLog_PlayerTimes JOIN DBLog_SteamUsers on (DBLog_PlayerTimes.player = DBLog_SteamUsers.steamID)\nWHERE endTime is null and\n startTime is not null and\n player is not null and\n server=1", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Vanilla Players Online", + "type": "table" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 15, + "w": 12, + "x": 12, + "y": 7 + }, + "id": 3, + "options": { + "footer": { + "countRows": false, + "enablePagination": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT lastName as 'Player',\n player as 'Steam ID',\n startTime as 'Logged on at'\nFROM DBLog_PlayerTimes JOIN DBLog_SteamUsers on (DBLog_PlayerTimes.player = DBLog_SteamUsers.steamID)\nWHERE endTime is null and\n startTime is not null and\n player is not null and\n server=2", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "MEE Players Online", + "type": "table" + } + ], + "refresh": "10s", + "revision": 1, + "schemaVersion": 38, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": { + "hidden": true, + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "Players Online", + "uid": "8Ah5SvJVz", + "version": 15, + "weekStart": "" +} \ No newline at end of file diff --git a/Seeding Board.json b/Seeding Board.json new file mode 100644 index 0000000..107a0a2 --- /dev/null +++ b/Seeding Board.json @@ -0,0 +1,278 @@ +{ + "__inputs": [ + { + "name": "DS_MYSQL", + "label": "MySQL", + "description": "", + "type": "datasource", + "pluginId": "mysql", + "pluginName": "MySQL" + } + ], + "__elements": {}, + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "9.4.7" + }, + { + "type": "datasource", + "id": "mysql", + "name": "MySQL", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "description": "", + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": false, + "inspect": false + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "text", + "value": null + }, + { + "color": "red", + "value": 10 + }, + { + "color": "orange", + "value": 30 + }, + { + "color": "#EAB839", + "value": 50 + }, + { + "color": "blue", + "value": 60 + }, + { + "color": "green", + "value": 70 + }, + { + "color": "dark-green", + "value": 80 + }, + { + "color": "dark-purple", + "value": 90 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Player" + }, + "properties": [ + { + "id": "custom.filterable", + "value": true + } + ] + }, + { + "matcher": { + "id": "byType", + "options": "number" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "type": "color-text" + } + } + ] + } + ] + }, + "gridPos": { + "h": 22, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 2, + "options": { + "footer": { + "countRows": false, + "enablePagination": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "Seed Hours" + } + ] + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "select lastName as 'Player', player as 'Steam ID',\r\n sum(case when serverState=1 then time_to_sec(timediff(ifnull(endTime,now()), startTime))/3600 end) as 'Seed Hours',\r\n sum(time_to_sec(timediff(ifnull(endTime,now()),startTime))/3600) as 'Total Hours'\r\nfrom DBLog_PlayerTimes join DBLog_SteamUsers DLSU on DLSU.steamID = DBLog_PlayerTimes.player\r\nwhere $__timeFilter(startTime) and server != 3 and lastName ${admins:value}\r\ngroup by player\r\norder by `Seed Hours` desc\r\n", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Seeding Board", + "transformations": [ + { + "id": "configFromData", + "options": { + "applyTo": { + "id": "byName", + "options": "Seed Hours" + }, + "configRefId": "A", + "mappings": [ + { + "fieldName": "Seed Hours", + "handlerKey": "max", + "reducerId": "max" + } + ] + } + } + ], + "type": "table" + } + ], + "refresh": "", + "revision": 1, + "schemaVersion": 38, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": { + "selected": true, + "text": "yes", + "value": "is not null" + }, + "hide": 0, + "includeAll": false, + "label": "Include Admins", + "multi": false, + "name": "admins", + "options": [ + { + "selected": true, + "text": "yes", + "value": "is not null" + }, + { + "selected": false, + "text": "no", + "value": "not regexp \"\\\\{ASG[oOaAbB]\\\\}\"" + } + ], + "query": "yes : is not null ,no : not regexp \"\\\\{ASG[oOaAbB]\\\\}\"", + "queryValue": "", + "skipUrlSync": false, + "type": "custom" + } + ] + }, + "time": { + "from": "now/M", + "to": "now/M" + }, + "timepicker": { + "hidden": false + }, + "timezone": "", + "title": "Seeding Board", + "uid": "1TJJ4HJ4k", + "version": 31, + "weekStart": "" +} \ No newline at end of file diff --git a/Server Overview.json b/Server Overview.json new file mode 100644 index 0000000..0bbd44a --- /dev/null +++ b/Server Overview.json @@ -0,0 +1,701 @@ +{ + "__inputs": [ + { + "name": "DS_MYSQL", + "label": "MySQL", + "description": "", + "type": "datasource", + "pluginId": "mysql", + "pluginName": "MySQL" + } + ], + "__elements": {}, + "__requires": [ + { + "type": "panel", + "id": "gauge", + "name": "Gauge", + "version": "" + }, + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "9.4.7" + }, + { + "type": "datasource", + "id": "mysql", + "name": "MySQL", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "enable": true, + "iconColor": "red", + "mappings": { + "id": { + "source": "field", + "value": "id" + }, + "tags": { + "source": "field", + "value": "map" + }, + "text": { + "source": "field", + "value": "layerClassname" + }, + "time": { + "source": "field", + "value": "startTime" + }, + "title": { + "source": "field", + "value": "layer" + } + }, + "name": "Match Starts", + "target": { + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "select *\r\nfrom DBLog_Matches\r\nwhere server = $SERVER", + "refId": "Anno", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + } + ] + }, + "description": "", + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 2, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false, + "minWidth": 150 + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byType", + "options": "number" + }, + "properties": [ + { + "id": "custom.width", + "value": 80 + } + ] + } + ] + }, + "gridPos": { + "h": 4, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 10, + "options": { + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "select (\n select trim(leading '[ASG] Asgard Eternal | ' from name)\n from DBLog_Servers\n where DBLog_Servers.id = $SERVER\n limit 1\n ) as 'Server Name',\n layer,startTime, id, (\n select players\n from DBLog_PlayerCounts\n where DBLog_PlayerCounts.server=$SERVER\n order by DBLog_PlayerCounts.id desc\n limit 1\n ) as players, (\n select publicQueue\n from DBLog_PlayerCounts\n where DBLog_PlayerCounts.server=$SERVER\n order by DBLog_PlayerCounts.id desc\n limit 1\n ) as queue,(\n select avg(players)\n from DBLog_PlayerCounts\n where DBLog_PlayerCounts.server=$SERVER and\n `match`=DBLog_Matches.id\n ) as 'avg players',(\n select avg(publicQueue)\n from DBLog_PlayerCounts\n where DBLog_PlayerCounts.server=$SERVER and\n `match`=DBLog_Matches.id\n ) as 'avg queue'\nfrom DBLog_Matches\nwhere\n endTime is null and\n server=$SERVER", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Server Info", + "type": "table" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "max": 98, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "#EAB839", + "value": 50 + }, + { + "color": "green", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 0, + "y": 4 + }, + "id": 2, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT\r\n time,\r\n players as \"Player Count\"\r\nFROM DBLog_PlayerCounts\r\nWHERE\r\n server=$SERVER\r\nGROUP BY 1\r\nORDER BY time DESC\r\nLIMIT 1", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Player Count", + "type": "gauge" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "line" + } + }, + "mappings": [], + "max": 110, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "blue", + "value": null + }, + { + "color": "red", + "value": 50 + }, + { + "color": "#EAB839", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "public_queue" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-blue", + "mode": "fixed" + } + }, + { + "id": "custom.lineWidth", + "value": 0 + }, + { + "id": "custom.fillOpacity", + "value": 100 + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 18, + "x": 6, + "y": 4 + }, + "id": 4, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT\r\n time,\r\n players as \"player_count\",\r\n publicQueue as \"public_queue\"\r\nFROM DBLog_PlayerCounts\r\nWHERE\r\n $__timeFilter(time) AND\r\n server=$SERVER\r\nGROUP BY 1\r\nORDER BY time", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Player Count", + "type": "timeseries" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "max": 60, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "orange", + "value": 15 + }, + { + "color": "green", + "value": 20 + }, + { + "color": "dark-green", + "value": 30 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 0, + "y": 12 + }, + "id": 6, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT\r\n time,\r\n tickRate\r\nFROM DBLog_TickRates\r\nWHERE\r\n server=$SERVER\r\nORDER BY time DESC\r\nLIMIT 1", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Tick Rate", + "type": "gauge" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "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": "line" + } + }, + "mappings": [], + "max": 60, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 15 + }, + { + "color": "#EAB839", + "value": 20 + }, + { + "color": "#6ED0E0", + "value": 30 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 18, + "x": 6, + "y": 12 + }, + "id": 8, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT\r\n time,\r\n tickRate as \"tick rate\"\r\nFROM DBLog_TickRates\r\nWHERE\r\n $__timeFilter(time) and\r\n server=$SERVER\r\nORDER BY time DESC", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Panel Title", + "type": "timeseries" + } + ], + "refresh": "10s", + "revision": 1, + "schemaVersion": 38, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": {}, + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "definition": "SELECT id as __value, trim(leading '[ASG] Asgard Eternal | ' from name) as __text\nFROM DBLog_Servers", + "hide": 0, + "includeAll": false, + "multi": false, + "name": "SERVER", + "options": [], + "query": "SELECT id as __value, trim(leading '[ASG] Asgard Eternal | ' from name) as __text\nFROM DBLog_Servers", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + } + ] + }, + "time": { + "from": "now-2d", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Server Overview", + "uid": "YR5RDvJVz", + "version": 21, + "weekStart": "" +} \ No newline at end of file diff --git a/seeding stats.json b/seeding stats.json new file mode 100644 index 0000000..d2d6526 --- /dev/null +++ b/seeding stats.json @@ -0,0 +1,205 @@ +{ + "__inputs": [ + { + "name": "DS_MYSQL", + "label": "MySQL", + "description": "", + "type": "datasource", + "pluginId": "mysql", + "pluginName": "MySQL" + } + ], + "__elements": {}, + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "9.4.7" + }, + { + "type": "datasource", + "id": "mysql", + "name": "MySQL", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisGridShow": true, + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 1, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "scheme", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 0, + "pointSize": 10, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + }, + { + "color": "green", + "value": 1 + }, + { + "color": "orange", + "value": 2 + }, + { + "color": "red", + "value": 3 + }, + { + "color": "dark-red", + "value": 4 + } + ] + }, + "unit": "h" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 2, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "select startTime, seedtime\nfrom (\nselect startTime, time_to_sec(timediff(ifnull(endTime,now()), startTime))/3600 as seedtime, DBLog_Matches.server, max(players) as mplayers\nfrom DBLog_Matches join DBLog_PlayerCounts DLPC on DBLog_Matches.id = DLPC.`match`\nwhere $__timeFilter(startTime) and \n layerClassname regexp '_Seed_' and\n DBLog_Matches.server = 1\ngroup by DBLog_Matches.id\norder by mplayers desc\n) as base\nwhere mplayers > 50\norder by startTime", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Panel Title", + "type": "timeseries" + } + ], + "refresh": "", + "revision": 1, + "schemaVersion": 38, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-30d", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "seeding stats", + "uid": "UXpUNoL4z", + "version": 4, + "weekStart": "" +} \ No newline at end of file