Skip to content

NATS

Auto-Discovery
Health Check
Metrics
Logs

To enable metrics gathering, you need to enable the NATS monitoring endpoint on your server, see NATS Server Monitoring for details.

By default, the agent assumes that the monitoring endpoint is enabled on port 8222, if your server uses another port, you can change it in the configuration.

If some auto-detected parameters are wrong, you can manually override them by adding the following to /etc/glouton/conf.d/99-local.conf:

service:
[...]
# For a NATS running outside a container
- type: "nats"
address: "127.0.0.1"
port: 4222
stats_port: 8222
# For an additional NATS running outside a container
- type: "nats"
instance: "NAME_ASSOCIATED_WITH_YOUR_ADDITIONAL_SERVICE"
address: "127.0.0.1"
port: 4222
stats_port: 8222
# For a NATS running in a Docker container
- type: "nats"
instance: "CONTAINER_NAME"
port: 4222
stats_port: 8222

The following metrics are gathered:

MetricDescription
service_statusStatus of NATS
nats_uptimeTime since the NATS server is started in nanoseconds
nats_routesNumber of registered routes
nats_slow_consumersNumber of slow consumers
nats_subscriptionsNumber of active subscriptions
nats_in_bytesAmount of incoming bytes
nats_out_bytesAmount of outgoing bytes
nats_in_msgsNumber of incoming messages
nats_out_msgsNumber of outgoing messages
nats_connectionsNumber of currently active clients
nats_total_connectionsTotal number of created clients