Collectd

Note

Librato has invested considerable time in creating a variant of collectd that vastly simplifies setup and configuration and is fully integrated with the Librato app. We refer to it as the The Librato Agent. The agent has been optimized for use with Configuration Management tools and makes installation of plugins featured in our Integrations Catalog seamless.

Collectd is one of the most popular and widely deployed OSS system monitoring agents. It is used for everything from basic statistics gathering, to performance analysis and capacity planning. Written in C, it is fast, lightweight, and included by default in most Linux distributions. With over 90 plugins, it is also quite flexible.

Warning

Requires collectd versions >= 4.10.0.

Setup

Install collectd as per the instructions on collectd.org

Find the collectd.conf file and open it with your favorite editor. We recommend that you set the reporting interval to 60s. Collectd defaults to 10s. A basic configuration could look like this:

Interval 60

LoadPlugin syslog
LoadPlugin cpu
LoadPlugin disk
LoadPlugin load
LoadPlugin memory
LoadPlugin df
LoadPlugin write_http

#Log collectd events in syslog
<Plugin syslog>
  LogLevel info
</Plugin>

#Librato configuration
<Plugin "write_http">
  <Node "Librato">
    URL "https://collectd.librato.com/v1/measurements"
    User "{{ Librato account email }}"
    Password "{{ Librato token }}"
    Format "JSON"
  </Node>
</Plugin>

#Report aggregated CPU as % (not per core)
<Plugin cpu>
  ReportByCpu false
  ReportByState false
  ValuesPercentage true
</Plugin>

#Report disk-free in percent bytes (not of 1k blocks)
<Plugin df>
  ValuesAbsolute true
  ValuesPercentage true
</Plugin>

Create a new token on the API tokens page. Use the token and your Librato account email to update the User and Password in the write_http section. Save the collectd.conf file and restart the collectd daemon with

sudo service collectd restart