update grafana file
All checks were successful
deploy / deploy (push) Successful in 35s
Publish Docker Image / docker (push) Successful in 41s

This commit is contained in:
Lee 2024-01-03 10:39:14 +00:00
parent 0781d74067
commit 9540a03366
2 changed files with 146 additions and 21 deletions

@ -4,6 +4,12 @@ on:
push: push:
branches: branches:
- "master" - "master"
paths-ignore: # Files in here will not trigger a build
- "README.md"
- "LICENSE"
- "grafana-dashboard.json"
- "storage-tracker.sh"
- "useful-stuff.md"
jobs: jobs:
docker: docker:

@ -163,15 +163,15 @@
"id": 1, "id": 1,
"options": { "options": {
"legend": { "legend": {
"calcs": ["min", "max", "mean"], "calcs": ["min", "max", "mean", "last"],
"displayMode": "table", "displayMode": "table",
"placement": "right", "placement": "right",
"showLegend": true, "showLegend": true,
"sortBy": "Mean", "sortBy": "Last",
"sortDesc": true "sortDesc": true
}, },
"tooltip": { "tooltip": {
"mode": "single", "mode": "multi",
"sort": "none" "sort": "none"
} }
}, },
@ -301,8 +301,8 @@
"axisPlacement": "auto", "axisPlacement": "auto",
"barAlignment": 0, "barAlignment": 0,
"drawStyle": "line", "drawStyle": "line",
"fillOpacity": 0, "fillOpacity": 15,
"gradientMode": "none", "gradientMode": "opacity",
"hideFrom": { "hideFrom": {
"legend": false, "legend": false,
"tooltip": false, "tooltip": false,
@ -310,6 +310,9 @@
}, },
"insertNulls": false, "insertNulls": false,
"lineInterpolation": "linear", "lineInterpolation": "linear",
"lineStyle": {
"fill": "solid"
},
"lineWidth": 1, "lineWidth": 1,
"pointSize": 5, "pointSize": 5,
"scaleDistribution": { "scaleDistribution": {
@ -326,7 +329,6 @@
} }
}, },
"decimals": 0, "decimals": 0,
"displayName": "Players Online",
"mappings": [], "mappings": [],
"thresholds": { "thresholds": {
"mode": "absolute", "mode": "absolute",
@ -334,16 +336,109 @@
{ {
"color": "green", "color": "green",
"value": null "value": null
},
{
"color": "red",
"value": 80
} }
] ]
}, },
"unit": "locale" "unit": "locale"
}, },
"overrides": [] "overrides": [
{
"matcher": {
"id": "byName",
"options": "1dAvg"
},
"properties": [
{
"id": "displayName",
"value": "Average player count over 1 day"
},
{
"id": "custom.pointSize",
"value": 10
},
{
"id": "custom.hideFrom",
"value": {
"legend": true,
"tooltip": false,
"viz": false
}
},
{
"id": "custom.showPoints",
"value": "always"
}
]
},
{
"matcher": {
"id": "byName",
"options": "7dAvg"
},
"properties": [
{
"id": "displayName",
"value": "Average player count over 7 days"
},
{
"id": "custom.hideFrom",
"value": {
"legend": true,
"tooltip": false,
"viz": false
}
},
{
"id": "custom.pointSize",
"value": 10
},
{
"id": "custom.showPoints",
"value": "always"
}
]
},
{
"matcher": {
"id": "byName",
"options": "playerCount"
},
"properties": [
{
"id": "displayName",
"value": "Players Online"
}
]
},
{
"matcher": {
"id": "byName",
"options": "highestPlayerCount"
},
"properties": [
{
"id": "displayName",
"value": "Peak Player Count (All Time)"
},
{
"id": "custom.pointSize",
"value": 10
},
{
"id": "custom.showPoints",
"value": "always"
},
{
"id": "custom.hideFrom",
"value": {
"legend": true,
"tooltip": false,
"viz": false
}
}
]
}
]
}, },
"gridPos": { "gridPos": {
"h": 8, "h": 8,
@ -361,7 +456,7 @@
"showLegend": true "showLegend": true
}, },
"tooltip": { "tooltip": {
"mode": "single", "mode": "multi",
"sort": "none" "sort": "none"
} }
}, },
@ -373,8 +468,36 @@
"type": "influxdb", "type": "influxdb",
"uid": "face5ed9-19c5-419c-ac67-e80ed8945e49" "uid": "face5ed9-19c5-419c-ac67-e80ed8945e49"
}, },
"hide": false,
"query": "from(bucket: \"mc-tracker\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"playerCount\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"playerCount\")\r\n |> filter(fn: (r) => r[\"name\"] == \"${server}\")\r\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\r\n |> yield(name: \"mean\")", "query": "from(bucket: \"mc-tracker\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"playerCount\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"playerCount\")\r\n |> filter(fn: (r) => r[\"name\"] == \"${server}\")\r\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\r\n |> yield(name: \"mean\")",
"refId": "A" "refId": "A"
},
{
"datasource": {
"type": "influxdb",
"uid": "face5ed9-19c5-419c-ac67-e80ed8945e49"
},
"hide": false,
"query": "from(bucket: \"mc-tracker\")\r\n |> range(start: 0)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"playerCount\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"playerCount\")\r\n |> filter(fn: (r) => r[\"name\"] == \"${server}\")\r\n |> map(fn: (r) => ({r with _value: r._value, _field: \"highestPlayerCount\"}))\r\n |> max()",
"refId": "D"
},
{
"datasource": {
"type": "influxdb",
"uid": "face5ed9-19c5-419c-ac67-e80ed8945e49"
},
"hide": false,
"query": "from(bucket: \"mc-tracker\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"playerCount\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"playerCount\")\r\n |> filter(fn: (r) => r[\"name\"] == \"${server}\")\r\n |> aggregateWindow(every: 1d, fn: mean, createEmpty: false)\r\n |> map(fn: (r) => ({r with _value: r._value, _field: \"1dAvg\"}))\r\n |> yield(name: \"mean\")\r\n",
"refId": "B"
},
{
"datasource": {
"type": "influxdb",
"uid": "face5ed9-19c5-419c-ac67-e80ed8945e49"
},
"hide": false,
"query": "from(bucket: \"mc-tracker\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"playerCount\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"playerCount\")\r\n |> filter(fn: (r) => r[\"name\"] == \"${server}\")\r\n |> aggregateWindow(every: 7d, fn: mean, createEmpty: false)\r\n |> map(fn: (r) => ({r with _value: r._value, _field: \"7dAvg\"}))\r\n |> yield(name: \"mean\")",
"refId": "C"
} }
], ],
"title": "Player Count (${server})", "title": "Player Count (${server})",
@ -411,8 +534,8 @@
"axisPlacement": "auto", "axisPlacement": "auto",
"barAlignment": 0, "barAlignment": 0,
"drawStyle": "line", "drawStyle": "line",
"fillOpacity": 0, "fillOpacity": 15,
"gradientMode": "none", "gradientMode": "opacity",
"hideFrom": { "hideFrom": {
"legend": false, "legend": false,
"tooltip": false, "tooltip": false,
@ -443,10 +566,6 @@
{ {
"color": "green", "color": "green",
"value": null "value": null
},
{
"color": "red",
"value": 80
} }
] ]
}, },
@ -469,7 +588,7 @@
"showLegend": true "showLegend": true
}, },
"tooltip": { "tooltip": {
"mode": "single", "mode": "multi",
"sort": "none" "sort": "none"
} }
}, },
@ -518,13 +637,13 @@
] ]
}, },
"time": { "time": {
"from": "now-1h", "from": "now-12h",
"to": "now" "to": "now"
}, },
"timepicker": {}, "timepicker": {},
"timezone": "", "timezone": "",
"title": "Mc Tracker", "title": "Mc Tracker",
"uid": "c4d923ad-b588-4953-a302-2af1514fddd0", "uid": "c4d923ad-b588-4953-a302-2af1514fddd0",
"version": 27, "version": 39,
"weekStart": "" "weekStart": ""
} }