Monitorex.ClusterPage
(monitorex v0.3.0)
Copy Markdown
Helper that delegates to Monitorex.Cluster (multi-node) or Monitorex.Storage
(local) based on the :cluster_mode config.
Used by LiveView pages to transparently aggregate data across BEAM nodes
when running in cluster mode, while falling back to local reads when in
:single mode (the default).
Config
Set Application.get_env(:monitorex, :cluster_mode) to one of:
:single— read from local ETS tables only (default):auto— use Cluster if more than one node is visible:cluster— always use Cluster (multi-node RPC)
See Monitorex.Cluster for detailed merge strategies and configuration options.
Summary
Functions
Returns count of recent inbound events — either from local Storage or summed across all cluster nodes.
Returns count of recent outbound events — either from local Storage or summed across all cluster nodes.
Returns consumers — either from local Storage or aggregated across all cluster nodes.
Returns consumers for a route — either from local Storage or aggregated across all cluster nodes.
Returns endpoints for a host — either from local Storage or aggregated across all cluster nodes.
Returns hosts — either from local Storage or aggregated across all cluster nodes.
Returns recent inbound events — either from local Storage or merged across all cluster nodes.
Returns recent outbound events — either from local Storage or merged across all cluster nodes.
Returns routes — either from local Storage or aggregated across all cluster nodes.
Functions
@spec count_recent_inbound(keyword()) :: non_neg_integer()
Returns count of recent inbound events — either from local Storage or summed across all cluster nodes.
@spec count_recent_outbound(keyword()) :: non_neg_integer()
Returns count of recent outbound events — either from local Storage or summed across all cluster nodes.
@spec list_consumers() :: [map()]
Returns consumers — either from local Storage or aggregated across all cluster nodes.
Returns consumers for a route — either from local Storage or aggregated across all cluster nodes.
Returns endpoints for a host — either from local Storage or aggregated across all cluster nodes.
@spec list_hosts() :: [map()]
Returns hosts — either from local Storage or aggregated across all cluster nodes.
Returns recent inbound events — either from local Storage or merged across all cluster nodes.
Returns recent outbound events — either from local Storage or merged across all cluster nodes.
@spec list_routes() :: [map()]
Returns routes — either from local Storage or aggregated across all cluster nodes.