---
title: StatsD
description: Monitor the availability of StatsD servers and track metric counts.
breadcrumbs: Docs > Integrations > StatsD
---

# StatsD
Supported OS Integration version3.3.0
## Overview{% #overview %}

This check monitors the availability and uptime of non-Datadog StatsD servers. It also tracks the number of metrics, by metric type, received by StatsD.

This check does **NOT** forward application metrics from StatsD servers to Datadog. It collects metrics about StatsD itself.

**Minimum Agent version:** 6.0.0

## Setup{% #setup %}

### Installation{% #installation %}

The StatsD check is included in the [Datadog Agent](https://app.datadoghq.com/account/settings/agent/latest) package, so you don't need to install anything else on any servers that run StatsD.

### Configuration{% #configuration %}

{% tab title="Host" %}
#### Host{% #host %}

To configure this check for an Agent running on a host:

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

   ```yaml
   init_config:
   
   instances:
     - host: localhost
       port: 8126 # or wherever your statsd listens
   ```

1. [Restart the Agent](https://docs.datadoghq.com/agent/guide/agent-commands/#start-stop-and-restart-the-agent) to start sending StatsD metrics and service checks to Datadog.

{% /tab %}

{% tab title="Containerized" %}
#### Containerized{% #containerized %}

For containerized environments, see the [Autodiscovery Integration Templates](https://docs.datadoghq.com/agent/kubernetes/integrations/) for guidance on applying the parameters below.

| Parameter            | Value                                 |
| -------------------- | ------------------------------------- |
| `<INTEGRATION_NAME>` | `statsd`                              |
| `<INIT_CONFIG>`      | blank or `{}`                         |
| `<INSTANCE_CONFIG>`  | `{"host": "%%host%%", "port":"8126"}` |

{% /tab %}

#### Log collection{% #log-collection %}

1. Collecting logs is disabled by default in the Datadog Agent, you need to enable it in `datadog.yaml`:

   ```yaml
   logs_enabled: true
   ```

1. Add this configuration block to your `statsd.d/conf.yaml` file to start collecting your Supervisord Logs:

   ```yaml
   logs:
     - type: file
       path: /path/to/my/directory/file.log
       source: statsd
   ```

Change the `path` parameter value and configure it for your environment. See the [sample statsd.d/conf.yaml](https://github.com/DataDog/integrations-core/blob/master/statsd/datadog_checks/statsd/data/conf.yaml.example) for all available configuration options.

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

### Validation{% #validation %}

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

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

### Metrics{% #metrics %}

|  |
|  |
| **statsd.counters.count**(gauge) | The number of counter metrics currently seen by StatsD |
| **statsd.gauges.count**(gauge)   | The number of gauge metrics currently seen by StatsD   |
| **statsd.timers.count**(gauge)   | The number of timer metrics currently seen by StatsD   |

### Events{% #events %}

The StatsD check does not include any events.

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

**statsd.can\_connect**

Returns Critical if the Agent cannot send data to the StatsD endpoint, OK otherwise.

*Statuses: ok, critical*

**statsd.is\_up**

Returns Critical if the Agent cannot connect to the StatsD url, OK otherwise.

*Statuses: ok, critical*

## Troubleshooting{% #troubleshooting %}

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

## Further Reading{% #further-reading %}

- [StatsD, what it is and how it can help you](https://www.datadoghq.com/blog/statsd)
- [Visualize StatsD metrics with counts graphing](https://www.datadoghq.com/blog/visualize-statsd-metrics-counts-graphing)
