Add NodeStatus record, IClusterNodeProvider interface, and AkkaClusterNodeProvider that queries Akka cluster membership for all site-role nodes. HealthReportSender populates ClusterNodes before each report. UI shows a row per node with hostname, Online/Offline badge, and Primary/Standby badge. Falls back to single-node display if ClusterNodes is not populated.
29 lines
1.2 KiB
C#
29 lines
1.2 KiB
C#
using ScadaLink.Commons.Messages.Health;
|
|
using ScadaLink.Commons.Types.Enums;
|
|
|
|
namespace ScadaLink.HealthMonitoring;
|
|
|
|
/// <summary>
|
|
/// Interface for site-side health metric collection.
|
|
/// Consumed by Site Runtime actors to report errors, and by DCL to report connection health.
|
|
/// </summary>
|
|
public interface ISiteHealthCollector
|
|
{
|
|
void IncrementScriptError();
|
|
void IncrementAlarmError();
|
|
void IncrementDeadLetter();
|
|
void UpdateConnectionHealth(string connectionName, ConnectionHealth health);
|
|
void RemoveConnection(string connectionName);
|
|
void UpdateTagResolution(string connectionName, int totalSubscribed, int successfullyResolved);
|
|
void UpdateConnectionEndpoint(string connectionName, string endpoint);
|
|
void UpdateTagQuality(string connectionName, int good, int bad, int uncertain);
|
|
void SetStoreAndForwardDepths(IReadOnlyDictionary<string, int> depths);
|
|
void SetInstanceCounts(int deployed, int enabled, int disabled);
|
|
void SetParkedMessageCount(int count);
|
|
void SetNodeHostname(string hostname);
|
|
void SetClusterNodes(IReadOnlyList<Commons.Messages.Health.NodeStatus> nodes);
|
|
void SetActiveNode(bool isActive);
|
|
bool IsActiveNode { get; }
|
|
SiteHealthReport CollectReport(string siteId);
|
|
}
|