From 8c41f41597b90403f3d07e9d95dfb970536a5001 Mon Sep 17 00:00:00 2001 From: rootdarkarchon Date: Sun, 8 Jan 2023 15:04:20 +0100 Subject: [PATCH] add gauge for authorized connections --- .../MareSynchronosServer/Services/SystemInfoService.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/MareSynchronosServer/MareSynchronosServer/Services/SystemInfoService.cs b/MareSynchronosServer/MareSynchronosServer/Services/SystemInfoService.cs index d068a51..20bc02e 100644 --- a/MareSynchronosServer/MareSynchronosServer/Services/SystemInfoService.cs +++ b/MareSynchronosServer/MareSynchronosServer/Services/SystemInfoService.cs @@ -64,6 +64,7 @@ public class SystemInfoService : IHostedService, IDisposable using var scope = _services.CreateScope(); using var db = scope.ServiceProvider.GetService()!; + _mareMetrics.SetGaugeTo(MetricsAPI.GaugeAuthorizedConnections, onlineUsers); _mareMetrics.SetGaugeTo(MetricsAPI.GaugePairs, db.ClientPairs.AsNoTracking().Count()); _mareMetrics.SetGaugeTo(MetricsAPI.GaugePairsPaused, db.ClientPairs.AsNoTracking().Count(p => p.IsPaused)); _mareMetrics.SetGaugeTo(MetricsAPI.GaugeGroups, db.Groups.AsNoTracking().Count());