mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-13 22:04:15 +01:00
add gauge for authorized connections
This commit is contained in:
parent
a182f36485
commit
8c41f41597
1 changed files with 1 additions and 0 deletions
|
|
@ -64,6 +64,7 @@ public class SystemInfoService : IHostedService, IDisposable
|
|||
using var scope = _services.CreateScope();
|
||||
using var db = scope.ServiceProvider.GetService<MareDbContext>()!;
|
||||
|
||||
_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());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue