The nats-replicator provides optional HTTP/s monitoring. When configured with a monitoring port the server will provide two HTTP endpoints:
You can also just navigate to the monitoring port, i.e. http://localhost:9090, and a page will point you at these two paths.
The /varz
endpoint returns a JSON encoded set of statistics for the server. These statistics are wrapped in a root level object with the following properties:
start_time
- the start time of the replicator, in the replicator's timezone.current_time
- the current time, in the replicator's timezone.uptime
- a string representation of the replicator's up time.http_requests
- a map of request paths to counts, the keys are/
,/varz
and/healthz
.connectors
- an array of statistics for each connector.
Each object in the connectors array, one per connector, will contain the following properties:
name
- the name of the connector, a human readable description of the connector.id
- the connectors id, either set in the configuration or generated at runtime.connects
- a count of the number of times the connector has connected.disconnects
- a count of the number of times the connector has disconnected.bytes_in
- the number of bytes the connector has received, may differ from received due to headers and encoding.bytes_out
- the number of bytes the connector has sent, may differ from received due to headers and encoding.msg_in
- the number of messages received.msg_out
- the number of messages sent.count
- the total number of requests for this connector.rma
- a running moving average of the time required to handle each request. The time is in nanoseconds.q50
- the 50% quantile for response times, in nanoseconds.q75
- the 75% quantile for response times, in nanoseconds.q90
- the 90% quantile for response times, in nanoseconds.q95
- the 95% quantile for response times, in nanoseconds.
Pass the URL property pretty=true to get formatted JSON. For example, http://localhost:8080/varz?pretty=true.
The /healthz
endpoint is provided for automated up/down style checks. The server returns an HTTP/200 when running and won't respond if it is down.