ClusterHealth
Defined in: packages/sharding/src/health.ts:68
Health of one cluster.
Properties
Section titled “Properties”host:
string
Defined in: packages/sharding/src/health.ts:73
Where it runs: "local" or the ID of a host.
id:
number
Defined in: packages/sharding/src/health.ts:69
lastReadyAt?
Section titled “lastReadyAt?”
optionallastReadyAt?:number
Defined in: packages/sharding/src/health.ts:84
When any process of this cluster last reported ready.
metrics?
Section titled “metrics?”
optionalmetrics?:WorkerMetrics
Defined in: packages/sharding/src/health.ts:88
Present when requested with refreshHealth({ metrics: true }) and the worker answered.
optionalpid?:number
Defined in: packages/sharding/src/health.ts:71
readyAt?
Section titled “readyAt?”
optionalreadyAt?:number
Defined in: packages/sharding/src/health.ts:82
When the current process reported ready.
reportedAt?
Section titled “reportedAt?”
optionalreportedAt?:number
Defined in: packages/sharding/src/health.ts:90
When shards and metrics were reported (epoch ms).
restarts
Section titled “restarts”restarts:
number
Defined in: packages/sharding/src/health.ts:79
How many times it has been restarted after a crash.
shardIds
Section titled “shardIds”shardIds:
number[]
Defined in: packages/sharding/src/health.ts:75
Shards this cluster owns right now.
shards
Section titled “shards”shards:
ShardHealth[]
Defined in: packages/sharding/src/health.ts:86
Per-shard health from the worker’s last report. Empty until it reports.
startedAt?
Section titled “startedAt?”
optionalstartedAt?:number
Defined in: packages/sharding/src/health.ts:80
state:
ClusterState
Defined in: packages/sharding/src/health.ts:70
uptimeMs
Section titled “uptimeMs”uptimeMs:
number
Defined in: packages/sharding/src/health.ts:77
Milliseconds since this process was forked; 0 when it is not running.