<commit_before>---
layout: page
title: Librato Collectd Integration
---

In my day job we use the excellent [Librato Metrics](https://metrics.librato.com) 
service to push all our metrics data to for monitoring and visualisation. We've
been primarily using [StatsD](https://github.com/etsy/statsd/) to collect metrics from our various applications,
and the [AWS integration](https://metrics.librato.com/cloudwatch) for data on 
those services. Something we've been missing though is some server level 
information that isn't provided with [Cloudwatch](http://aws.amazon.com/cloudwatch/) (specifically 
disk space and memory). I've been meaning to try using [collectd](https://collectd.org/) 
to collect this and then push it off to Librato somehow. Then luckily the Librato team announced 
[native integration](http://blog.librato.com/posts/turnkey-server-monitoring-beta)!

Just what we needed!

## Ansible Configuration

Luckily Collectd was available throught the package manager on our current
distribution, so I set right to creating an Ansible role for it...

{% highlight yaml %}<commit_msg>typos<commit_after>---
layout: page
title: Librato Collectd Integration
---

In my day job we use the excellent [Librato Metrics](https://metrics.librato.com) 
service to push all our metrics data to for monitoring and visualisation. We've
been primarily using [StatsD](https://github.com/etsy/statsd/) to collect metrics from our various applications,
and the [AWS integration](https://metrics.librato.com/cloudwatch) for data on 
those services. Something we've been missing though is some server level 
information that isn't provided with [Cloudwatch](http://aws.amazon.com/cloudwatch/) (specifically 
disk space and memory). I've been meaning to try using [collectd](https://collectd.org/) 
to collect this and then push it off to Librato somehow. Then luckily the Librato team announced 
[native integration](http://blog.librato.com/posts/turnkey-server-monitoring-beta)...

Just what we needed!

## Ansible Configuration

Luckily Collectd was available through the package manager on our current
distribution, so I set right to creating an Ansible role for it...

{% highlight yaml %}
{'fraction_non_alphanumeric': 0.09045226130653267, 'fraction_numerical': 0.0, 'mean_word_length': 4.7631578947368425, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, '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': '5100812', 'n_tokens_mistral': 613, 'n_tokens_neox': 582, 'n_words': 254}