Get-ZrMembership
Shows the elected leader and active member set that each node reports for a store. Run it to detect split-brain or leadership disagreement, where nodes do not agree on who the leader is.
Syntax
Get-ZrMembership
-StoreName <string>
[-NodeId <string>]
[-TimeoutMs <int>]
[-Continuous] [-IntervalSeconds <int>]
[-AsJson]
[-Managers <string[]>] [-Port <int>] [-Token <string>] [-TimeoutSec <int>]
Description
Get-ZrMembership collects the membership snapshot from every node of the named store and shows the current leader and active member set as seen by each node. Because each node reports independently, disagreement between rows (different leaders, or a divergent member set) is a direct signal of split-brain or a membership convergence problem. With -Continuous the table re-renders on an interval until Ctrl-C.
The output is a rendered console table; use -AsJson to emit the raw typed result as indented JSON. 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 membership to collect. |
-NodeId | string | No | Restricts collection to a single node id; when omitted every node in the store is queried. |
-TimeoutMs | int | No | Per-node collection timeout in milliseconds; when omitted the server default is used. |
-Continuous | switch | No | Re-renders the table on an interval until Ctrl-C instead of collecting once. |
-IntervalSeconds | int | No | Refresh interval in seconds when -Continuous is set. Default 120. |
-AsJson | switch | No | Emits the raw typed diagnostics result as indented JSON instead of the formatted table. |
-Managers | string[] | No | Management Service endpoints to target; when omitted the active workspace's managers are used. |
-Port | int | No | Management Service port for bare-host managers. Default 7801. |
-Token | string | No | Admin bearer token for authenticated control-plane calls. |
-TimeoutSec | int | No | Per-request timeout in seconds. Default 30. |
Examples
Show the current leader and active members of the orders store as reported by each node.
Get-ZrMembership -StoreName orders
Continuously watch membership while a node is restarted or rejoins.
Get-ZrMembership -StoreName orders -Continuous -IntervalSeconds 5
Reading the output
Each row is one active member as reported by the node in the Node column (green on success, red with an (*N) footnote marker on error):
Leader— the leader that node currently recognizes. In a healthy cluster every node reports the same leader; differing leaders across nodes indicate split-brain or an in-progress election.Active Members— the set of members that node considers active; a multi-member set spans several rows under the same node. A node reporting a smaller or different member set than its peers has not converged on the current membership.