Watch-ZrStoreMetrics
Continuously displays live per-node metrics for a Zaris store, redrawing the console table on a fixed interval until cancelled.
Syntax
Watch-ZrStoreMetrics
-StoreName <string>
[-RefreshSec <int>]
[-Category <string>]
[-ShowSparkline]
[-SparklineWidth <int>]
[-Managers <string[]>] [-Port <int>] [-Token <string>] [-TimeoutSec <int>]
Description
Watch-ZrStoreMetrics polls the connected managers for the store's metrics and redraws a per-node table every -RefreshSec seconds until you press Ctrl+C, highlighting throughput and role changes. Metrics are grouped by category and metric name, with one column per cluster node. Use -Category to scope which metric category is shown. The cmdlet requires an active workspace (see New-ZrWorkspace / Use-ZrWorkspace) or an explicit -Managers list.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
-StoreName | string | Yes | Name of the store whose metrics to watch. |
-RefreshSec | int | No | Refresh interval in seconds. Range 1–60. Default 1. |
-Category | string | No | Metric category to display; use All for every category. Default Zaris. |
-ShowSparkline | switch | No | Show a per-metric sparkline of recent values. |
-SparklineWidth | int | No | Number of samples in each sparkline. Range 4–30. Default 12. |
-Managers | string[] | No | Management Service endpoints (host, host:port, or URL) to poll. When omitted, the active workspace/connected managers are used. |
-Port | int | No | Manager port for bare-host endpoints or localhost fallback. Default 7801. |
-Token | string | No | Admin bearer token for authenticated calls; falls back to the token from the active workspace. |
-TimeoutSec | int | No | Per-request timeout in seconds. Default 30. |
Examples
Watch a store's metrics, refreshing every second.
Watch-ZrStoreMetrics -StoreName orders
Refresh every two seconds and show all metric categories.
Watch-ZrStoreMetrics -StoreName orders -RefreshSec 2 -Category All
Show recent-value sparklines alongside each metric.
Watch-ZrStoreMetrics -StoreName orders -ShowSparkline -SparklineWidth 20
Output
A live in-place table titled Clustron Zaris | <StoreName>. Rows are keyed by Category and Metric; each node gets a column split into a rate sub-column (average per-second rate over the recent window) and a total sub-column (cumulative value). Gauge metrics show -- for the rate. The view clears and redraws each cycle and stops on Ctrl+C.