---
title: Gnatsd Streaming
description: NATS server streaming
breadcrumbs: Docs > Integrations > Gnatsd Streaming
---

# Gnatsd Streaming
Supported OS Integration version0.1.0
## Overview{% #overview %}

Get metrics from gnatsd_streaming service in real time to:

- Visualize and monitor gnatsd_streaming states
- Be notified about gnatsd_streaming failovers and events.

## Setup{% #setup %}

The gnatsd_streaming check is not included in the [Datadog Agent](https://app.datadoghq.com/account/settings/agent/latest) package, so you need to install it.

### Installation{% #installation %}

For Agent v7.21+ / v6.21+, follow the instructions below to install the gnatsd_streaming check on your host. See [Use Community Integrations](https://docs.datadoghq.com/agent/guide/use-community-integrations.md) to install with the Docker Agent or earlier versions of the Agent.

1. Run the following command to install the Agent integration:

   ```shell
   datadog-agent integration install -t datadog-gnatsd_streaming==<INTEGRATION_VERSION>
   ```

1. Configure your integration similar to core [integrations](https://docs.datadoghq.com/getting_started/integrations.md).

### Configuration{% #configuration %}

1. Edit the `gnatsd_streaming.d/conf.yaml` file in the `conf.d/` folder at the root of your [Agent's configuration directory](https://docs.datadoghq.com/agent/guide/agent-configuration-files.md#agent-configuration-directory) to start collecting your GnatsD streaming metrics. See the [sample gnatsd_streaming.d/conf.yaml](https://github.com/DataDog/integrations-extras/blob/master/gnatsd_streaming/datadog_checks/gnatsd_streaming/data/conf.yaml.example) for all available configuration options.

1. [Restart the Agent](https://docs.datadoghq.com/agent/guide/agent-commands.md#start-stop-and-restart-the-agent)

### Validation{% #validation %}

[Run the Agent's status subcommand](https://docs.datadoghq.com/agent/guide/agent-commands.md#service-status) and look for `gnatsd_streaming` under the Checks section.

## Compatibility{% #compatibility %}

The gnatsd_streaming check is compatible with all major platforms

## Data Collected{% #data-collected %}

### Metrics{% #metrics %}

|  |
|  |
| **gnatsd.streaming.serverz.clients**(gauge)       | The number of currently connectied clients*Shown as unit*             |
| **gnatsd.streaming.serverz.subscriptions**(count) | The number of subscriptions the server has handled*Shown as unit*     |
| **gnatsd.streaming.serverz.channels**(gauge)      | The number of currently active channels*Shown as unit*                |
| **gnatsd.streaming.serverz.total\_msgs**(count)   | The total number of messages passed through the server*Shown as unit* |
| **gnatsd.streaming.serverz.total\_bytes**(count)  | The total number of bytes passed through the server*Shown as byte*    |
| **gnatsd.streaming.storez.total\_msgs**(count)    | The total number of messages passed through the store*Shown as unit*  |
| **gnatsd.streaming.storez.total\_bytes**(count)   | The total number of bytes passed through the store*Shown as byte*     |
| **gnatsd.streaming.clientsz.total**(gauge)        | The number of clients connected*Shown as unit*                        |
| **gnatsd.streaming.channelsz.total**(gauge)       | The number of channels open*Shown as unit*                            |
| **gnatsd.streaming.channelsz.msgs**(count)        | The total count of messages in a channel*Shown as unit*               |
| **gnatsd.streaming.channelsz.bytes**(count)       | The total bytes of messages in a channel*Shown as byte*               |

Nats Streaming Server metrics are tagged with names like "nss-cluster_id"

### Events{% #events %}

If you are running Nats Streaming Server in a Fault Tolerant group, a Nats Streaming Failover event is issued when the status of a server changes between `FT_STANDBY` and `FT_ACTIVE`.

### Service Checks{% #service-checks %}

**gnatsd\_streaming.can\_connect**

Returns `CRITICAL` if the Agent can't connect to the Gnastd Streaming endpoint, OK otherwise

*Statuses: ok, critical*

## Troubleshooting{% #troubleshooting %}

Need help? Contact [Datadog support](http://docs.datadoghq.com/help).
