监控 JetStream
Server Metrics
JetStream has a /jsz HTTP endpoint and advisories available.
Advisories
JetStream publishes a number of advisories that can inform operations about the health and the state of the Streams. These advisories are published to normal NATS subjects below $JS.EVENT.ADVISORY.>
and one can store these advisories in JetStream Streams if desired.
The command nats event --js-advisory
can view all these events on your console. The Golang package jsm.go can consume and render these events and have data types for each of these events.
All these events have JSON Schemas that describe them, schemas can be viewed on the CLI using the nats schema show <schema kind>
command.
Description | Subject | Kind |
---|---|---|
API interactions |
|
|
Stream CRUD operations |
|
|
Consumer CRUD operations |
|
|
Snapshot started using |
|
|
Snapshot completed |
|
|
Restore started using |
|
|
Restore completed |
|
|
Consumer maximum delivery reached |
|
|
Message delivery naked using AckNak |
|
|
Message delivery terminated using AckTerm |
|
|
Message acknowledged in a sampled Consumer |
|
|
Clustered Stream elected a new leader |
|
|
Clustered Stream lost quorum |
|
|
Clustered Consumer elected a new leader |
|
|
Clustered Consumer lost quorum |
|
|
Dashboards
The NATS Surveyor system has initial support for passing JetStream metrics to Prometheus, dashboards and more will be added towards final release.
最后更新于