New announcements for Serverless, Network, RUM, and more from Dash! New announcements from Dash!

Gnatsd

Agent Check Agent Check

Supported OS: Linux Mac OS Windows

Overview

Get metrics from Gnatsd service in real time to:

  • Visualize and monitor Gnatsd states
  • Be notified about Gnatsd failovers and events.

Setup

Installation

If you are using Agent v6.8+ follow the instructions below to install the Gnatsd check on your host. See our dedicated Agent guide for installing community integrations to install checks with the Agent prior to version 6.8 or the Docker Agent:

  1. Install the developer toolkit.
  2. Clone the integrations-extras repository:

    git clone https://github.com/DataDog/integrations-extras.git.
    
  3. Update your ddev config with the integrations-extras/ path:

    ddev config set extras ./integrations-extras
    
  4. To build the gnatsd package, run:

    ddev -e release build gnatsd
    
  5. Download and launch the Datadog Agent.

  6. Run the following command to install the integrations wheel with the Agent:

    datadog-agent integration install -w <PATH_OF_GNATSD_ARTIFACT_>/<GNATSD_ARTIFACT_NAME>.whl
    
  7. Configure your integration like any other packaged integration.

Configuration

  1. Edit the gnatsd.d/conf.yaml file in the conf.d/ folder at the root of your Agent’s configuration directory to start collecting your Gnatsd metrics. See the sample gnatsd.d/conf.yaml for all available configuration options.

  2. Restart the Agent

Validation

Run the Agent’s status subcommand and look for gnatsd under the Checks section.

Compatibility

The gnatsd check is compatible with all major platforms

Data Collected

Metrics

gnatsd.connz.connections.in_bytes
(count)
The number of bytes incoming
Shown as byte
gnatsd.connz.connections.in_msgs
(count)
The number of messages received
Shown as unit
gnatsd.connz.connections.out_bytes
(count)
The number of bytes outgoing
Shown as byte
gnatsd.connz.connections.out_msgs
(count)
The number of messages sent
Shown as unit
gnatsd.connz.connections.pending_bytes
(gauge)
The number of bytes pending ack on a subscription
Shown as unit
gnatsd.connz.connections.subscriptions
(gauge)
The number of subscriptions on a connection
Shown as unit
gnatsd.connz.num_connections
(gauge)
The number of current connections to the NATS broker
Shown as unit
gnatsd.connz.total
(count)
The number of connections ever to the NATS broker
Shown as unit
gnatsd.routez.num_routes
(gauge)
The number of routes in the cluster
Shown as unit
gnatsd.routez.routes.in_bytes
(count)
The number of bytes incoming
Shown as byte
gnatsd.routez.routes.in_msgs
(count)
The number of messages received
Shown as unit
gnatsd.routez.routes.out_bytes
(count)
The number of bytes outgoing
Shown as byte
gnatsd.routez.routes.out_msgs
(count)
The number of messages sent
Shown as unit
gnatsd.routez.routes.pending_bytes
(gauge)
The number of bytes pending
Shown as unit
gnatsd.routez.routes.subscriptions
(gauge)
The number of subscriptions on a connection
Shown as unit
gnatsd.varz.connections
(gauge)
The number of connections to the NATS broker
Shown as unit
gnatsd.varz.in_bytes
(count)
Amount of traffic sent into the cluster
Shown as byte
gnatsd.varz.in_msgs
(count)
The number of messages passed into the cluster
Shown as unit
gnatsd.varz.mem
(gauge)
Amount of memory currently used by the process
Shown as byte
gnatsd.varz.out_bytes
(count)
Amount of traffic sent from the cluster
Shown as byte
gnatsd.varz.out_msg
(count)
The number of messages sent out of the cluster
Shown as unit
gnatsd.varz.remotes
(gauge)
The number of currently connected remotes
Shown as unit
gnatsd.varz.routes
(gauge)
The number of current routes
Shown as unit
gnatsd.varz.slow_consumers
(count)
The number of slow consumers ever connected
Shown as unit
gnatsd.varz.subscriptions
(gauge)
The number of subscriptions currently handled
Shown as unit

Note: If you use custom Nats cluster names, your metrics may look like this: gnatsd.connz.connections.cluster_name.in_msgs

Events

The gnatsd check does not include any events.

Service Checks

This gnatsd check tags all service checks it collects with:

  • server_name:<server_name_in_yaml>
  • url:<host_in_yaml>

gnatsd.can_connect: Returns CRITICAL if the Agent fails to receive a 200 from the monitoring endpoint, otherwise returns OK.

Troubleshooting

Need help? Contact Datadog support.


Mistake in the docs? Feel free to contribute!