Class ClusterMetrics
Cluster metrics extension.
Cluster metrics is primarily for load-balancing of nodes. It controls metrics sampling at a regular frequency, prepares highly variable data for further analysis by other entities, and publishes the latest cluster metrics data around the node ring and local eventStream to assist in determining the need to redirect traffic to the least-loaded nodes.
Metrics sampling is delegated to the IMetricsCollector.
Smoothing of the data for each monitored process is delegated to the NodeMetrics.Types.EWMA for exponential weighted moving average.
Implements
Inherited Members
Namespace: Akka.Cluster.Metrics
Assembly: Akka.Cluster.Metrics.dll
Syntax
public class ClusterMetrics : IExtension
Properties
| Improve this Doc View SourceSettings
Cluster metrics settings
Declaration
public ClusterMetricsSettings Settings { get; }
Property Value
Type | Description |
---|---|
ClusterMetricsSettings |
Supervisor
Supervisor actor. Accepts subtypes of Akka.Cluster.Metrics.ClusterMetricsSupervisorMetadata.ICollectionControlMessage to manage metrics collection at runtime
Declaration
public IActorRef Supervisor { get; }
Property Value
Type | Description |
---|---|
IActorRef |
Methods
| Improve this Doc View SourceDefaultConfig()
Default HOCON settings for cluster metrics.
Declaration
public static Config DefaultConfig()
Returns
Type | Description |
---|---|
Config | TBD |
Get(ActorSystem)
Creates new ClusterMetrics for given actor system
Declaration
public static ClusterMetrics Get(ActorSystem system)
Parameters
Type | Name | Description |
---|---|---|
ActorSystem | system |
Returns
Type | Description |
---|---|
ClusterMetrics |
Subscribe(IActorRef)
Subscribe user metrics listener actor unto IClusterMetricsEvent events published by extension on the system event bus.
Declaration
public void Subscribe(IActorRef metricsListener)
Parameters
Type | Name | Description |
---|---|---|
IActorRef | metricsListener |
Unsubscribe(IActorRef)
Unsubscribe user metrics listener actor from IClusterMetricsEvent events published by extension on the system event bus.
Declaration
public void Unsubscribe(IActorRef metricsListener)
Parameters
Type | Name | Description |
---|---|---|
IActorRef | metricsListener |