feat: wire all health metrics and add instance counts to dashboard
Wired ISiteHealthCollector calls for script errors (ScriptExecutionActor), alarm eval errors (AlarmActor), dead letters (DeadLetterMonitorActor), and S&F buffer depth placeholder. Added instance count tracking (deployed/ enabled/disabled) to SiteHealthReport via DeploymentManagerActor. Updated Health Dashboard UI to show instance counts per site. All metrics flow through the existing health report pipeline via ClusterClient.
This commit is contained in:
@@ -100,7 +100,10 @@ public class ObservabilityTests : IClassFixture<ScadaLinkWebApplicationFactory>
|
||||
["ext-system"] = 15,
|
||||
["notification"] = 2
|
||||
},
|
||||
DeadLetterCount: 5);
|
||||
DeadLetterCount: 5,
|
||||
DeployedInstanceCount: 0,
|
||||
EnabledInstanceCount: 0,
|
||||
DisabledInstanceCount: 0);
|
||||
|
||||
// Metric type 1: Data connection health
|
||||
Assert.Equal(2, report.DataConnectionStatuses.Count);
|
||||
@@ -141,7 +144,7 @@ public class ObservabilityTests : IClassFixture<ScadaLinkWebApplicationFactory>
|
||||
"site-01", 1, DateTimeOffset.UtcNow,
|
||||
new Dictionary<string, ConnectionHealth>(),
|
||||
new Dictionary<string, TagResolutionStatus>(),
|
||||
0, 0, new Dictionary<string, int>(), 0));
|
||||
0, 0, new Dictionary<string, int>(), 0, 0, 0, 0));
|
||||
|
||||
var state = aggregator.GetSiteState("site-01");
|
||||
Assert.NotNull(state);
|
||||
@@ -152,7 +155,7 @@ public class ObservabilityTests : IClassFixture<ScadaLinkWebApplicationFactory>
|
||||
"site-01", 2, DateTimeOffset.UtcNow,
|
||||
new Dictionary<string, ConnectionHealth>(),
|
||||
new Dictionary<string, TagResolutionStatus>(),
|
||||
3, 0, new Dictionary<string, int>(), 0));
|
||||
3, 0, new Dictionary<string, int>(), 0, 0, 0, 0));
|
||||
|
||||
state = aggregator.GetSiteState("site-01");
|
||||
Assert.Equal(2, state!.LastSequenceNumber);
|
||||
@@ -174,7 +177,7 @@ public class ObservabilityTests : IClassFixture<ScadaLinkWebApplicationFactory>
|
||||
"site-01", seq, DateTimeOffset.UtcNow,
|
||||
new Dictionary<string, ConnectionHealth>(),
|
||||
new Dictionary<string, TagResolutionStatus>(),
|
||||
seq, 0, new Dictionary<string, int>(), 0));
|
||||
seq, 0, new Dictionary<string, int>(), 0, 0, 0, 0));
|
||||
}
|
||||
|
||||
var state = aggregator.GetSiteState("site-01");
|
||||
|
||||
Reference in New Issue
Block a user