Monitoring (#3251)

* Add more plugin metrics

* Update dashboard to account for changed labels in upstream library and new plugin metrics
This commit is contained in:
Sebastian Göls
2024-07-14 21:11:07 +02:00
committed by GitHub
parent f87b63d6ee
commit 38ae309285
3 changed files with 563 additions and 400 deletions

View File

@@ -23,6 +23,7 @@
using System; using System;
using System.Collections.Concurrent; using System.Collections.Concurrent;
using System.Collections.Frozen;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.Composition; using System.Composition;
@@ -69,6 +70,8 @@ internal sealed class MonitoringPlugin : OfficialPlugin, IDisposable, IOfficialG
private static bool Enabled => ASF.GlobalConfig?.IPC ?? GlobalConfig.DefaultIPC; private static bool Enabled => ASF.GlobalConfig?.IPC ?? GlobalConfig.DefaultIPC;
private static FrozenSet<Measurement<int>>? PluginMeasurements;
[JsonInclude] [JsonInclude]
[Required] [Required]
public override string Name => nameof(MonitoringPlugin); public override string Name => nameof(MonitoringPlugin);
@@ -136,6 +139,12 @@ internal sealed class MonitoringPlugin : OfficialPlugin, IDisposable, IOfficialG
return; return;
} }
PluginMeasurements = new[] {
new Measurement<int>(PluginsCore.ActivePlugins.Count),
new Measurement<int>(PluginsCore.ActivePlugins.Count(static plugin => plugin is OfficialPlugin), new KeyValuePair<string, object?>(TagNames.PluginType, "official")),
new Measurement<int>(PluginsCore.ActivePlugins.Count(static plugin => plugin is not OfficialPlugin), new KeyValuePair<string, object?>(TagNames.PluginType, "custom"))
}.ToFrozenSet();
Meter = new Meter(MeterName, Version.ToString()); Meter = new Meter(MeterName, Version.ToString());
Meter.CreateObservableGauge( Meter.CreateObservableGauge(
@@ -158,7 +167,7 @@ internal sealed class MonitoringPlugin : OfficialPlugin, IDisposable, IOfficialG
Meter.CreateObservableGauge( Meter.CreateObservableGauge(
$"{MetricNamePrefix}_active_plugins", $"{MetricNamePrefix}_active_plugins",
static () => PluginsCore.ActivePlugins.Count, static () => PluginMeasurements,
description: "Number of plugins currently loaded in ASF" description: "Number of plugins currently loaded in ASF"
); );

View File

@@ -29,6 +29,7 @@ internal static class TagNames {
internal const string CurrencyCode = "currency"; internal const string CurrencyCode = "currency";
internal const string Framework = "framework"; internal const string Framework = "framework";
internal const string OS = "operating_system"; internal const string OS = "operating_system";
internal const string PluginType = "type";
internal const string Runtime = "runtime"; internal const string Runtime = "runtime";
internal const string SteamID = "steamid"; internal const string SteamID = "steamid";
internal const string TradeOfferResult = "result"; internal const string TradeOfferResult = "result";

View File

@@ -21,7 +21,7 @@
"type": "grafana", "type": "grafana",
"id": "grafana", "id": "grafana",
"name": "Grafana", "name": "Grafana",
"version": "10.4.1" "version": "11.1.0"
}, },
{ {
"type": "datasource", "type": "datasource",
@@ -68,7 +68,56 @@
"fiscalYearStartMonth": 0, "fiscalYearStartMonth": 0,
"graphTooltip": 0, "graphTooltip": 0,
"id": null, "id": null,
"links": [], "links": [
{
"asDropdown": false,
"icon": "info",
"includeVars": false,
"keepTime": false,
"tags": [],
"targetBlank": true,
"title": "GitHub",
"tooltip": "",
"type": "link",
"url": "https://github.com/JustArchiNET/ArchiSteamFarm"
},
{
"asDropdown": false,
"icon": "doc",
"includeVars": false,
"keepTime": false,
"tags": [],
"targetBlank": true,
"title": "Wiki",
"tooltip": "",
"type": "link",
"url": "https://github.com/JustArchiNET/ArchiSteamFarm/wiki/MonitoringPlugin"
},
{
"asDropdown": false,
"icon": "question",
"includeVars": false,
"keepTime": false,
"tags": [],
"targetBlank": true,
"title": "Support",
"tooltip": "",
"type": "link",
"url": "https://github.com/JustArchiNET/ArchiSteamFarm/discussions"
},
{
"asDropdown": false,
"icon": "external link",
"includeVars": false,
"keepTime": false,
"tags": [],
"targetBlank": true,
"title": "Grafana",
"tooltip": "",
"type": "link",
"url": "https://grafana.com/grafana/dashboards/20888-archisteamfarm/"
}
],
"panels": [ "panels": [
{ {
"datasource": { "datasource": {
@@ -109,6 +158,7 @@
"graphMode": "area", "graphMode": "area",
"justifyMode": "auto", "justifyMode": "auto",
"orientation": "auto", "orientation": "auto",
"percentChangeColorMode": "standard",
"reduceOptions": { "reduceOptions": {
"calcs": [ "calcs": [
"lastNotNull" "lastNotNull"
@@ -120,7 +170,7 @@
"textMode": "name", "textMode": "name",
"wideLayout": true "wideLayout": true
}, },
"pluginVersion": "10.4.1", "pluginVersion": "11.1.0",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -178,6 +228,7 @@
"graphMode": "area", "graphMode": "area",
"justifyMode": "auto", "justifyMode": "auto",
"orientation": "auto", "orientation": "auto",
"percentChangeColorMode": "standard",
"reduceOptions": { "reduceOptions": {
"calcs": [ "calcs": [
"lastNotNull" "lastNotNull"
@@ -189,7 +240,7 @@
"textMode": "name", "textMode": "name",
"wideLayout": true "wideLayout": true
}, },
"pluginVersion": "10.4.1", "pluginVersion": "11.1.0",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -247,6 +298,7 @@
"graphMode": "area", "graphMode": "area",
"justifyMode": "auto", "justifyMode": "auto",
"orientation": "auto", "orientation": "auto",
"percentChangeColorMode": "standard",
"reduceOptions": { "reduceOptions": {
"calcs": [ "calcs": [
"lastNotNull" "lastNotNull"
@@ -258,7 +310,7 @@
"textMode": "name", "textMode": "name",
"wideLayout": true "wideLayout": true
}, },
"pluginVersion": "10.4.1", "pluginVersion": "11.1.0",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -316,6 +368,7 @@
"graphMode": "area", "graphMode": "area",
"justifyMode": "auto", "justifyMode": "auto",
"orientation": "auto", "orientation": "auto",
"percentChangeColorMode": "standard",
"reduceOptions": { "reduceOptions": {
"calcs": [ "calcs": [
"lastNotNull" "lastNotNull"
@@ -327,7 +380,7 @@
"textMode": "name", "textMode": "name",
"wideLayout": true "wideLayout": true
}, },
"pluginVersion": "10.4.1", "pluginVersion": "11.1.0",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -385,6 +438,7 @@
"graphMode": "area", "graphMode": "area",
"justifyMode": "auto", "justifyMode": "auto",
"orientation": "auto", "orientation": "auto",
"percentChangeColorMode": "standard",
"reduceOptions": { "reduceOptions": {
"calcs": [ "calcs": [
"lastNotNull" "lastNotNull"
@@ -396,7 +450,7 @@
"textMode": "name", "textMode": "name",
"wideLayout": true "wideLayout": true
}, },
"pluginVersion": "10.4.1", "pluginVersion": "11.1.0",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -416,7 +470,7 @@
"type": "stat" "type": "stat"
}, },
{ {
"collapsed": true, "collapsed": false,
"gridPos": { "gridPos": {
"h": 1, "h": 1,
"w": 24, "w": 24,
@@ -424,7 +478,10 @@
"y": 3 "y": 3
}, },
"id": 13, "id": 13,
"panels": [ "panels": [],
"title": "Global statistics",
"type": "row"
},
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
@@ -440,7 +497,8 @@
"mode": "absolute", "mode": "absolute",
"steps": [ "steps": [
{ {
"color": "green" "color": "green",
"value": null
}, },
{ {
"color": "red", "color": "red",
@@ -463,6 +521,7 @@
"graphMode": "none", "graphMode": "none",
"justifyMode": "center", "justifyMode": "center",
"orientation": "auto", "orientation": "auto",
"percentChangeColorMode": "standard",
"reduceOptions": { "reduceOptions": {
"calcs": [ "calcs": [
"lastNotNull" "lastNotNull"
@@ -474,7 +533,7 @@
"textMode": "auto", "textMode": "auto",
"wideLayout": true "wideLayout": true
}, },
"pluginVersion": "10.4.1", "pluginVersion": "11.1.0",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -482,7 +541,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "asf_bots{job=\"$job\", instance=\"$instance\", state=\"configured\"}", "expr": "avg(asf_bots{job=\"$job\", instance=\"$instance\", state=\"configured\"}) by (job, instance)",
"instant": false, "instant": false,
"legendFormat": "configured", "legendFormat": "configured",
"range": true, "range": true,
@@ -506,7 +565,8 @@
"mode": "absolute", "mode": "absolute",
"steps": [ "steps": [
{ {
"color": "green" "color": "green",
"value": null
} }
] ]
}, },
@@ -526,6 +586,7 @@
"graphMode": "none", "graphMode": "none",
"justifyMode": "center", "justifyMode": "center",
"orientation": "auto", "orientation": "auto",
"percentChangeColorMode": "standard",
"reduceOptions": { "reduceOptions": {
"calcs": [ "calcs": [
"lastNotNull" "lastNotNull"
@@ -537,7 +598,7 @@
"textMode": "auto", "textMode": "auto",
"wideLayout": true "wideLayout": true
}, },
"pluginVersion": "10.4.1", "pluginVersion": "11.1.0",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -545,7 +606,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "asf_bots{job=\"$job\", instance=\"$instance\", state!=\"configured\", state!=\"farming\"}", "expr": "avg(asf_bots{job=\"$job\", instance=\"$instance\", state!=\"configured\", state!=\"farming\"}) by (job, instance, state)",
"instant": false, "instant": false,
"legendFormat": "{{state}}", "legendFormat": "{{state}}",
"range": true, "range": true,
@@ -569,7 +630,8 @@
"mode": "absolute", "mode": "absolute",
"steps": [ "steps": [
{ {
"color": "green" "color": "green",
"value": null
}, },
{ {
"color": "red", "color": "red",
@@ -592,6 +654,7 @@
"graphMode": "none", "graphMode": "none",
"justifyMode": "center", "justifyMode": "center",
"orientation": "auto", "orientation": "auto",
"percentChangeColorMode": "standard",
"reduceOptions": { "reduceOptions": {
"calcs": [ "calcs": [
"lastNotNull" "lastNotNull"
@@ -603,7 +666,7 @@
"textMode": "auto", "textMode": "auto",
"wideLayout": true "wideLayout": true
}, },
"pluginVersion": "10.4.1", "pluginVersion": "11.1.0",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -611,7 +674,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "asf_bots{job=\"$job\", instance=\"$instance\", state=\"farming\"}", "expr": "avg(asf_bots{job=\"$job\", instance=\"$instance\", state=\"farming\"}) by (job, instance)",
"instant": false, "instant": false,
"legendFormat": "farming", "legendFormat": "farming",
"range": true, "range": true,
@@ -636,7 +699,8 @@
"mode": "absolute", "mode": "absolute",
"steps": [ "steps": [
{ {
"color": "green" "color": "green",
"value": null
}, },
{ {
"color": "red", "color": "red",
@@ -659,6 +723,7 @@
"graphMode": "none", "graphMode": "none",
"justifyMode": "center", "justifyMode": "center",
"orientation": "auto", "orientation": "auto",
"percentChangeColorMode": "standard",
"reduceOptions": { "reduceOptions": {
"calcs": [ "calcs": [
"lastNotNull" "lastNotNull"
@@ -670,7 +735,7 @@
"textMode": "auto", "textMode": "auto",
"wideLayout": true "wideLayout": true
}, },
"pluginVersion": "10.4.1", "pluginVersion": "11.1.0",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -678,7 +743,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "asf_active_plugins{job=\"$job\", instance=\"$instance\"}", "expr": "avg(asf_active_plugins{job=\"$job\", instance=\"$instance\", type=\"\"}) by (job, instance)",
"instant": false, "instant": false,
"legendFormat": "Plugins", "legendFormat": "Plugins",
"range": true, "range": true,
@@ -687,6 +752,89 @@
], ],
"type": "stat" "type": "stat"
}, },
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 10
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 6,
"x": 15,
"y": 4
},
"id": 63,
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "center",
"orientation": "auto",
"percentChangeColorMode": "standard",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showPercentChange": false,
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "11.1.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "avg(asf_active_plugins{job=\"$job\", instance=\"$instance\", type=\"official\"}) by (job, instance)",
"hide": false,
"instant": false,
"legendFormat": "Official Plugins",
"range": true,
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "avg(asf_active_plugins{job=\"$job\", instance=\"$instance\", type=\"custom\"}) by (job, instance)",
"hide": false,
"instant": false,
"legendFormat": "Custom Plugins",
"range": true,
"refId": "B"
}
],
"type": "stat"
},
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
@@ -704,7 +852,8 @@
"mode": "absolute", "mode": "absolute",
"steps": [ "steps": [
{ {
"color": "green" "color": "green",
"value": null
}, },
{ {
"color": "red", "color": "red",
@@ -717,8 +866,8 @@
}, },
"gridPos": { "gridPos": {
"h": 6, "h": 6,
"w": 9, "w": 3,
"x": 15, "x": 21,
"y": 4 "y": 4
}, },
"id": 52, "id": 52,
@@ -727,6 +876,7 @@
"graphMode": "area", "graphMode": "area",
"justifyMode": "center", "justifyMode": "center",
"orientation": "auto", "orientation": "auto",
"percentChangeColorMode": "standard",
"reduceOptions": { "reduceOptions": {
"calcs": [ "calcs": [
"lastNotNull" "lastNotNull"
@@ -739,7 +889,7 @@
"textMode": "value", "textMode": "value",
"wideLayout": true "wideLayout": true
}, },
"pluginVersion": "10.4.1", "pluginVersion": "11.1.0",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -748,7 +898,7 @@
}, },
"editorMode": "code", "editorMode": "code",
"exemplar": false, "exemplar": false,
"expr": "asf_ipc_banned_ips{job=\"$job\", instance=\"$instance\"}", "expr": "avg(asf_ipc_banned_ips{job=\"$job\", instance=\"$instance\"}) by (job, instance)",
"instant": false, "instant": false,
"legendFormat": "__auto", "legendFormat": "__auto",
"range": true, "range": true,
@@ -757,10 +907,6 @@
], ],
"title": "IPC banned IPs", "title": "IPC banned IPs",
"type": "stat" "type": "stat"
}
],
"title": "Global statistics",
"type": "row"
}, },
{ {
"collapsed": true, "collapsed": true,
@@ -768,7 +914,7 @@
"h": 1, "h": 1,
"w": 24, "w": 24,
"x": 0, "x": 0,
"y": 4 "y": 10
}, },
"id": 8, "id": 8,
"panels": [ "panels": [
@@ -821,7 +967,8 @@
"mode": "absolute", "mode": "absolute",
"steps": [ "steps": [
{ {
"color": "green" "color": "green",
"value": null
}, },
{ {
"color": "red", "color": "red",
@@ -837,7 +984,7 @@
"h": 7, "h": 7,
"w": 12, "w": 12,
"x": 0, "x": 0,
"y": 5 "y": 11
}, },
"id": 7, "id": 7,
"options": { "options": {
@@ -860,7 +1007,7 @@
}, },
"disableTextWrap": false, "disableTextWrap": false,
"editorMode": "code", "editorMode": "code",
"expr": "asf_bot_farming_time_remaining_minutes{job=\"$job\", instance=\"$instance\", bot=~\"$bots\", steamid=~\"$steamids\", steamid!=\"0\"}", "expr": "avg(asf_bot_farming_time_remaining_minutes{job=\"$job\", instance=\"$instance\", bot=~\"$bots\", steamid=~\"$steamids\", steamid!=\"0\"}) by (job, instance, bot, steamid)",
"fullMetaSearch": false, "fullMetaSearch": false,
"includeNullMetadata": true, "includeNullMetadata": true,
"instant": false, "instant": false,
@@ -922,7 +1069,8 @@
"mode": "absolute", "mode": "absolute",
"steps": [ "steps": [
{ {
"color": "green" "color": "green",
"value": null
}, },
{ {
"color": "red", "color": "red",
@@ -937,7 +1085,7 @@
"h": 7, "h": 7,
"w": 12, "w": 12,
"x": 12, "x": 12,
"y": 5 "y": 11
}, },
"id": 4, "id": 4,
"options": { "options": {
@@ -960,7 +1108,7 @@
}, },
"editorMode": "code", "editorMode": "code",
"exemplar": false, "exemplar": false,
"expr": "asf_bot_wallet_balance{job=\"$job\", instance=\"$instance\", bot=~\"$bots\", steamid=~\"$steamids\", steamid!=\"0\", currency!~\"CNY|KWD|VND\"} / 100", "expr": "avg(asf_bot_wallet_balance{job=\"$job\", instance=\"$instance\", bot=~\"$bots\", steamid=~\"$steamids\", steamid!=\"0\", currency!~\"CNY|KWD|VND\"} / 100) by (job, instance, bot, steamid, currency)",
"hide": false, "hide": false,
"instant": false, "instant": false,
"legendFormat": "{{bot}} ({{currency}})", "legendFormat": "{{bot}} ({{currency}})",
@@ -973,7 +1121,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "asf_bot_wallet_balance{job=\"$job\", instance=\"$instance\", bot=~\"$bots\", steamid=~\"$steamids\", steamid!=\"0\", currency=~\"CNY|VND\"} / 10", "expr": "avg(asf_bot_wallet_balance{job=\"$job\", instance=\"$instance\", bot=~\"$bots\", steamid=~\"$steamids\", steamid!=\"0\", currency=~\"CNY|VND\"} / 10) by (job, instance, bot, steamid, currency)",
"hide": false, "hide": false,
"instant": false, "instant": false,
"interval": "", "interval": "",
@@ -987,7 +1135,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "asf_bot_wallet_balance{job=\"$job\", instance=\"$instance\", bot=~\"$bots\", steamid=~\"$steamids\", steamid!=\"0\", currency=~\"KWD\"} / 1000", "expr": "avg(asf_bot_wallet_balance{job=\"$job\", instance=\"$instance\", bot=~\"$bots\", steamid=~\"$steamids\", steamid!=\"0\", currency=~\"KWD\"} / 1000) by (job, instance, bot, steamid, currency)",
"hide": false, "hide": false,
"instant": false, "instant": false,
"interval": "", "interval": "",
@@ -1016,7 +1164,8 @@
"mode": "absolute", "mode": "absolute",
"steps": [ "steps": [
{ {
"color": "green" "color": "green",
"value": null
}, },
{ {
"color": "red", "color": "red",
@@ -1031,7 +1180,7 @@
"h": 6, "h": 6,
"w": 12, "w": 12,
"x": 0, "x": 0,
"y": 12 "y": 18
}, },
"id": 9, "id": 9,
"options": { "options": {
@@ -1050,7 +1199,7 @@
"sizing": "auto", "sizing": "auto",
"text": {} "text": {}
}, },
"pluginVersion": "10.4.1", "pluginVersion": "11.1.0",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -1058,7 +1207,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "asf_bot_bgr_keys_remaining{job=\"$job\", instance=\"$instance\", bot=~\"$bots\", steamid=~\"$steamids\", steamid!=\"0\"}", "expr": "avg(asf_bot_bgr_keys_remaining{job=\"$job\", instance=\"$instance\", bot=~\"$bots\", steamid=~\"$steamids\", steamid!=\"0\"}) by (job, instance, bot, steamid)",
"instant": false, "instant": false,
"legendFormat": "{{bot}}", "legendFormat": "{{bot}}",
"range": true, "range": true,
@@ -1085,7 +1234,8 @@
"mode": "absolute", "mode": "absolute",
"steps": [ "steps": [
{ {
"color": "green" "color": "green",
"value": null
}, },
{ {
"color": "red", "color": "red",
@@ -1100,7 +1250,7 @@
"h": 6, "h": 6,
"w": 12, "w": 12,
"x": 12, "x": 12,
"y": 12 "y": 18
}, },
"id": 10, "id": 10,
"options": { "options": {
@@ -1119,7 +1269,7 @@
"sizing": "auto", "sizing": "auto",
"text": {} "text": {}
}, },
"pluginVersion": "10.4.1", "pluginVersion": "11.1.0",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -1127,7 +1277,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "asf_bot_heartbeat_failures{job=\"$job\", instance=\"$instance\", bot=~\"$bots\", steamid=~\"$steamids\", steamid!=\"0\"}", "expr": "avg(asf_bot_heartbeat_failures{job=\"$job\", instance=\"$instance\", bot=~\"$bots\", steamid=~\"$steamids\", steamid!=\"0\"}) by (job, instance, bot, steamid)",
"instant": false, "instant": false,
"legendFormat": "{{bot}}", "legendFormat": "{{bot}}",
"range": true, "range": true,
@@ -1165,7 +1315,7 @@
"h": 6, "h": 6,
"w": 12, "w": 12,
"x": 0, "x": 0,
"y": 18 "y": 24
}, },
"id": 6, "id": 6,
"options": { "options": {
@@ -1173,6 +1323,7 @@
"graphMode": "none", "graphMode": "none",
"justifyMode": "center", "justifyMode": "center",
"orientation": "auto", "orientation": "auto",
"percentChangeColorMode": "standard",
"reduceOptions": { "reduceOptions": {
"calcs": [ "calcs": [
"lastNotNull" "lastNotNull"
@@ -1184,7 +1335,7 @@
"textMode": "auto", "textMode": "auto",
"wideLayout": true "wideLayout": true
}, },
"pluginVersion": "10.4.1", "pluginVersion": "11.1.0",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -1192,7 +1343,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "asf_bot_friends{job=\"$job\", instance=\"$instance\", bot=~\"$bots\", steamid=~\"$steamids\", steamid!=\"0\"}", "expr": "avg(asf_bot_friends{job=\"$job\", instance=\"$instance\", bot=~\"$bots\", steamid=~\"$steamids\", steamid!=\"0\"}) by (job, instance, bot, steamid)",
"instant": false, "instant": false,
"legendFormat": "{{bot}}", "legendFormat": "{{bot}}",
"range": true, "range": true,
@@ -1234,7 +1385,7 @@
"h": 6, "h": 6,
"w": 12, "w": 12,
"x": 12, "x": 12,
"y": 18 "y": 24
}, },
"id": 5, "id": 5,
"options": { "options": {
@@ -1242,6 +1393,7 @@
"graphMode": "none", "graphMode": "none",
"justifyMode": "center", "justifyMode": "center",
"orientation": "auto", "orientation": "auto",
"percentChangeColorMode": "standard",
"reduceOptions": { "reduceOptions": {
"calcs": [ "calcs": [
"lastNotNull" "lastNotNull"
@@ -1253,7 +1405,7 @@
"textMode": "auto", "textMode": "auto",
"wideLayout": true "wideLayout": true
}, },
"pluginVersion": "10.4.1", "pluginVersion": "11.1.0",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -1261,7 +1413,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "asf_bot_clans{job=\"$job\", instance=\"$instance\", bot=~\"$bots\", steamid=~\"$steamids\", steamid!=\"0\"}", "expr": "avg(asf_bot_clans{job=\"$job\", instance=\"$instance\", bot=~\"$bots\", steamid=~\"$steamids\", steamid!=\"0\"}) by (job, instance, bot, steamid)",
"instant": false, "instant": false,
"legendFormat": "{{bot}}", "legendFormat": "{{bot}}",
"range": true, "range": true,
@@ -1281,7 +1433,7 @@
"h": 1, "h": 1,
"w": 24, "w": 24,
"x": 0, "x": 0,
"y": 5 "y": 11
}, },
"id": 36, "id": 36,
"panels": [ "panels": [
@@ -1373,7 +1525,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "max_over_time(process_runtime_dotnet_gc_committed_memory_size_bytes{job=\"$job\", instance=\"$instance\"}[$__rate_interval])", "expr": "avg(max_over_time(process_runtime_dotnet_gc_committed_memory_size_bytes{job=\"$job\", instance=\"$instance\"}[$__rate_interval])) by (job, instance)",
"hide": false, "hide": false,
"instant": false, "instant": false,
"legendFormat": "GC Commited Memory Size", "legendFormat": "GC Commited Memory Size",
@@ -1386,7 +1538,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "max_over_time(process_runtime_dotnet_gc_objects_size_bytes{job=\"$job\", instance=\"$instance\"}[$__rate_interval])", "expr": "avg(max_over_time(process_runtime_dotnet_gc_objects_size_bytes{job=\"$job\", instance=\"$instance\"}[$__rate_interval])) by (job, instance)",
"hide": false, "hide": false,
"instant": false, "instant": false,
"legendFormat": "GC Objects size", "legendFormat": "GC Objects size",
@@ -1399,7 +1551,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "rate(process_runtime_dotnet_gc_allocations_size_bytes{job=\"$job\", instance=\"$instance\"}[$__rate_interval])", "expr": "avg(rate(process_runtime_dotnet_gc_allocations_size_bytes{job=\"$job\", instance=\"$instance\"}[$__rate_interval])) by (job, instance)",
"hide": false, "hide": false,
"instant": false, "instant": false,
"legendFormat": "GC Allocation Size", "legendFormat": "GC Allocation Size",
@@ -1497,7 +1649,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "max_over_time(process_runtime_dotnet_gc_heap_size_bytes{job=\"$job\", instance=\"$instance\"}[$__rate_interval])", "expr": "avg(max_over_time(process_runtime_dotnet_gc_heap_size_bytes{job=\"$job\", instance=\"$instance\"}[$__rate_interval])) by (job, instance, generation)",
"instant": false, "instant": false,
"legendFormat": "{{generation}}", "legendFormat": "{{generation}}",
"range": true, "range": true,
@@ -1594,7 +1746,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "max_over_time(process_runtime_dotnet_gc_heap_fragmentation_size_bytes{job=\"$job\", instance=\"$instance\"}[$__rate_interval])", "expr": "avg(max_over_time(process_runtime_dotnet_gc_heap_fragmentation_size_bytes{job=\"$job\", instance=\"$instance\"}[$__rate_interval])) by (job, instance, generation)",
"instant": false, "instant": false,
"legendFormat": "{{generation}}", "legendFormat": "{{generation}}",
"range": true, "range": true,
@@ -1696,7 +1848,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "rate(process_runtime_dotnet_gc_collections_count_total{job=\"$job\", instance=\"$instance\"}[$__rate_interval])", "expr": "avg(rate(process_runtime_dotnet_gc_collections_count_total{job=\"$job\", instance=\"$instance\"}[$__rate_interval])) by (job, instance, generation)",
"instant": false, "instant": false,
"legendFormat": "{{generation}}", "legendFormat": "{{generation}}",
"range": true, "range": true,
@@ -1795,7 +1947,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "rate(process_runtime_dotnet_exceptions_count_total{job=\"$job\", instance=\"$instance\"}[$__rate_interval])", "expr": "avg(rate(process_runtime_dotnet_exceptions_count_total{job=\"$job\", instance=\"$instance\"}[$__rate_interval])) by (job, instance)",
"hide": false, "hide": false,
"instant": false, "instant": false,
"legendFormat": " Exceptions", "legendFormat": " Exceptions",
@@ -1842,6 +1994,7 @@
"graphMode": "area", "graphMode": "area",
"justifyMode": "auto", "justifyMode": "auto",
"orientation": "auto", "orientation": "auto",
"percentChangeColorMode": "standard",
"reduceOptions": { "reduceOptions": {
"calcs": [ "calcs": [
"lastNotNull" "lastNotNull"
@@ -1853,7 +2006,7 @@
"textMode": "auto", "textMode": "auto",
"wideLayout": true "wideLayout": true
}, },
"pluginVersion": "10.4.1", "pluginVersion": "11.1.0",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -1861,7 +2014,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "max_over_time(process_runtime_dotnet_thread_pool_threads_count{job=\"$job\", instance=\"$instance\"}[$__rate_interval])", "expr": "avg(max_over_time(process_runtime_dotnet_thread_pool_threads_count{job=\"$job\", instance=\"$instance\"}[$__rate_interval])) by (job, instance)",
"instant": false, "instant": false,
"legendFormat": "Thead Pool Threads", "legendFormat": "Thead Pool Threads",
"range": true, "range": true,
@@ -1907,6 +2060,7 @@
"graphMode": "area", "graphMode": "area",
"justifyMode": "auto", "justifyMode": "auto",
"orientation": "auto", "orientation": "auto",
"percentChangeColorMode": "standard",
"reduceOptions": { "reduceOptions": {
"calcs": [ "calcs": [
"lastNotNull" "lastNotNull"
@@ -1918,7 +2072,7 @@
"textMode": "auto", "textMode": "auto",
"wideLayout": true "wideLayout": true
}, },
"pluginVersion": "10.4.1", "pluginVersion": "11.1.0",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -1926,7 +2080,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "max_over_time(process_runtime_dotnet_thread_pool_queue_length{job=\"$job\", instance=\"$instance\"}[$__rate_interval])", "expr": "avg(max_over_time(process_runtime_dotnet_thread_pool_queue_length{job=\"$job\", instance=\"$instance\"}[$__rate_interval])) by (job, instance)",
"instant": false, "instant": false,
"legendFormat": "Thread Pool Queue Length", "legendFormat": "Thread Pool Queue Length",
"range": true, "range": true,
@@ -1946,7 +2100,7 @@
"h": 1, "h": 1,
"w": 24, "w": 24,
"x": 0, "x": 0,
"y": 6 "y": 12
}, },
"id": 23, "id": 23,
"panels": [ "panels": [
@@ -2567,6 +2721,7 @@
"graphMode": "area", "graphMode": "area",
"justifyMode": "center", "justifyMode": "center",
"orientation": "auto", "orientation": "auto",
"percentChangeColorMode": "standard",
"reduceOptions": { "reduceOptions": {
"calcs": [ "calcs": [
"lastNotNull" "lastNotNull"
@@ -2579,7 +2734,7 @@
"textMode": "value", "textMode": "value",
"wideLayout": true "wideLayout": true
}, },
"pluginVersion": "10.4.1", "pluginVersion": "11.1.0",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -2639,6 +2794,7 @@
"graphMode": "area", "graphMode": "area",
"justifyMode": "center", "justifyMode": "center",
"orientation": "auto", "orientation": "auto",
"percentChangeColorMode": "standard",
"reduceOptions": { "reduceOptions": {
"calcs": [ "calcs": [
"lastNotNull" "lastNotNull"
@@ -2651,7 +2807,7 @@
"textMode": "value", "textMode": "value",
"wideLayout": true "wideLayout": true
}, },
"pluginVersion": "10.4.1", "pluginVersion": "11.1.0",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -2711,6 +2867,7 @@
"graphMode": "area", "graphMode": "area",
"justifyMode": "auto", "justifyMode": "auto",
"orientation": "auto", "orientation": "auto",
"percentChangeColorMode": "standard",
"reduceOptions": { "reduceOptions": {
"calcs": [ "calcs": [
"max" "max"
@@ -2722,7 +2879,7 @@
"textMode": "value_and_name", "textMode": "value_and_name",
"wideLayout": true "wideLayout": true
}, },
"pluginVersion": "10.4.1", "pluginVersion": "11.1.0",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -2780,6 +2937,7 @@
"graphMode": "area", "graphMode": "area",
"justifyMode": "auto", "justifyMode": "auto",
"orientation": "auto", "orientation": "auto",
"percentChangeColorMode": "standard",
"reduceOptions": { "reduceOptions": {
"calcs": [ "calcs": [
"max" "max"
@@ -2791,7 +2949,7 @@
"textMode": "value_and_name", "textMode": "value_and_name",
"wideLayout": true "wideLayout": true
}, },
"pluginVersion": "10.4.1", "pluginVersion": "11.1.0",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -2936,7 +3094,7 @@
} }
] ]
}, },
"pluginVersion": "10.4.1", "pluginVersion": "11.1.0",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -3110,7 +3268,7 @@
} }
] ]
}, },
"pluginVersion": "10.4.1", "pluginVersion": "11.1.0",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -3284,7 +3442,7 @@
} }
] ]
}, },
"pluginVersion": "10.4.1", "pluginVersion": "11.1.0",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -3414,7 +3572,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "kestrel_active_connections{job=\"$job\", instance=\"$instance\"}", "expr": "avg(kestrel_active_connections{job=\"$job\", instance=\"$instance\"}) by (job, instance, server_address, server_port)",
"hide": false, "hide": false,
"instant": false, "instant": false,
"legendFormat": "{{server_address}}:{{server_port}}", "legendFormat": "{{server_address}}:{{server_port}}",
@@ -3435,7 +3593,7 @@
"h": 1, "h": 1,
"w": 24, "w": 24,
"x": 0, "x": 0,
"y": 7 "y": 13
}, },
"id": 44, "id": 44,
"panels": [ "panels": [
@@ -3724,7 +3882,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "rate(http_client_request_duration_seconds_sum{job=\"$job\", instance=\"$instance\"}[$__rate_interval])", "expr": "avg(rate(http_client_request_duration_seconds_sum{job=\"$job\", instance=\"$instance\"}[$__rate_interval])) by (job, instance, http_request_method, url_scheme, server_address, http_response_status_code)",
"hide": false, "hide": false,
"instant": false, "instant": false,
"legendFormat": "{{http_request_method}} {{url_scheme}}://{{server_address}}/ {{http_response_status_code}}", "legendFormat": "{{http_request_method}} {{url_scheme}}://{{server_address}}/ {{http_response_status_code}}",
@@ -3927,7 +4085,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum(rate(http_client_request_duration_seconds_sum{job=\"$job\", instance=\"$instance\", server_address=~\"$http_client_server_addresses\"}[$__rate_interval])) by (http_request_method, http_response_status_code) > 0", "expr": "sum(rate(http_client_request_duration_seconds_sum{job=\"$job\", instance=\"$instance\", server_address=~\"$http_client_server_addresses\", http_response_status_code!=\"\"}[$__rate_interval])) by (http_request_method, http_response_status_code) > 0",
"hide": false, "hide": false,
"instant": false, "instant": false,
"legendFormat": "{{http_request_method}} -> {{http_response_status_code}}", "legendFormat": "{{http_request_method}} -> {{http_response_status_code}}",
@@ -3949,11 +4107,7 @@
"templating": { "templating": {
"list": [ "list": [
{ {
"current": { "current": {},
"selected": false,
"text": "Prometheus",
"value": "TrYkaVXnk"
},
"hide": 0, "hide": 0,
"includeAll": false, "includeAll": false,
"label": "datasource", "label": "datasource",
@@ -4150,14 +4304,13 @@
] ]
}, },
"time": { "time": {
"from": "now-24h", "from": "now-5m",
"to": "now" "to": "now"
}, },
"timepicker": {}, "timepicker": {},
"timezone": "browser", "timezone": "browser",
"title": "ArchiSteamFarm", "title": "ArchiSteamFarm",
"uid": "archisteamfarm", "uid": "archisteamfarm",
"version": 1, "version": 94,
"weekStart": "", "weekStart": ""
"description": "Grafana Dashboard for ArchiSteamFarm instances."
} }