Get metrics from Gnatsd service in real time to:
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:
Clone the integrations-extras repository:
git clone https://github.com/DataDog/integrations-extras.git.
Update your ddev
config with the integrations-extras/
path:
ddev config set extras ./integrations-extras
To build the gnatsd
package, run:
ddev -e release build gnatsd
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
Configure your integration like any other packaged integration.
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.
Run the Agent’s status subcommand and look for gnatsd
under the Checks section.
The gnatsd check is compatible with all major platforms
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
The gnatsd check does not include any events.
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
.
Need help? Contact Datadog support.
Mistake in the docs? Feel free to contribute!