nats-serverprovides a lightweight HTTP server on a dedicated monitoring port. The monitoring server provides several endpoints, providing statistics and other information about the following:
nats-serverdoes not have authentication/authorization for the monitoring endpoint. When you plan to open your
nats-serverto the internet make sure to not expose the monitoring port as well. By default monitoring binds to every interface
0.0.0.0so consider setting monitoring to
localhostor have appropriate firewall rules.
http://demo.nats.io:8222/does! It is done on purpose to simplify the examples below.
-mand the monitoring port, or turn it on in the configuration file.
jsz. There are not any required arguments, however use of arguments can let you tailor monitoring to your environment and tooling.
/varzendpoint returns general information about the server state and configuration.
/connzendpoint reports more detailed information on current and recently closed connections. It uses a paging mechanism which defaults to 1024 connections.
/routezendpoint reports information on active routes for a cluster. Routes are expected to be low, so there is no paging mechanism with this endpoint.
routezendpoint does support the
subsargument from the
/connzendpoint. For example: http://demo.nats.io:8222/routez?subs=1
/gatewayzendpoint reports information about gateways used to create a NATS supercluster. Like routes, the number of gateways are expected to be low, so there is no paging mechanism with this endpoint.
/leafzendpoint reports detailed information about the leaf node connections.
leafzendpoint does support the
subsargument from the
/connzendpoint. For example: http://demo.nats.io:8222/leafz?subs=1
/subszendpoint reports detailed information about the current subscriptions and the routing data structure. It is not normally used.
/accountzendpoint reports information on a server's active accounts. The default behavior is to return a list of all accounts known to the server.
/jszendpoint reports more detailed information on JetStream. For accounts, it uses a paging mechanism that defaults to 1024 connections.