<commit_before>---
layout: page
title: StatsD
---
## Description
The CoScale plugin for StatsD will push all metrics available in the StatsD daemon to the CoScale infrastructure every minute.

## Installation
<a href="https://github.com/CoScale/coscale-statsd-plugin" target="_blank" class="btn btn-large btn-info"><i class="fa fa-3x fa-fw fa-github-square"></i> Github repository</a>

1. Clone repository to your StatsD `node_modules` directory
    `git clone https://github.com/CoScale/coscale-statsd-plugin.git`
2. Change your `config.js` to include the CoScale backend (example below).
3. Restart StatsD daemon

### Config
Make sure you replace `[[app_id]]` and `[[accessToken]]` with your own credentials.
{% highlight javascript %}
{
    port: 8126,
    backends: ['CoScale'],
    flushInterval: 10000,

    coscaleApiHost: 'https://api.coscale.com',
    coscaleAppId: '[[app_id]]',
    coscaleAccessToken: '[[accessToken]]'
}<commit_msg>Small fix in config for StatsD<commit_after>---
layout: page
title: StatsD
---
## Description
The CoScale plugin for StatsD will push all metrics available in the StatsD daemon to the CoScale infrastructure every minute.

## Installation
<a href="https://github.com/CoScale/coscale-statsd-plugin" target="_blank" class="btn btn-large btn-info"><i class="fa fa-3x fa-fw fa-github-square"></i> Github repository</a>

1. Clone repository to your StatsD `node_modules` directory
    `git clone https://github.com/CoScale/coscale-statsd-plugin.git`
2. Change your `config.js` to include the CoScale backend (example below).
3. Restart StatsD daemon

### Config
Make sure you replace `[[app_id]]` and `[[accessToken]]` with your own credentials.
{% highlight javascript %}
{
    port: 8126,
    backends: ['coscale-statsd-plugin'],
    flushInterval: 10000,

    coscaleApiHost: 'https://api.coscale.com',
    coscaleAppId: '[[app_id]]',
    coscaleAccessToken: '[[accessToken]]'
}
{'fraction_non_alphanumeric': 0.136529442417926, 'fraction_numerical': 0.01354872329338197, 'mean_word_length': 4.517241379310345, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5519811', 'n_tokens_mistral': 642, 'n_tokens_neox': 590, 'n_words': 187}