Setup Collectd with Grafana and InfluxDB

Table of Contents


Prior to starting this tutorial you will want to follow these instructions to build out an Ubuntu server to host docker and a docker container with InfluxDB installed on it. You will be feeding your metrics into this and using Grafana to visualize your data.

Setup Docker on Ubuntu at ProfitBricks

Creating a Grafana and InfluxDB Docker Container

By the end of this tutorial you will have setup collectd to feed metrics from your ProfitBricks server(s) into InfluxDB and surface that information within the Grafana dashboard.

Since collectd uses UDP we recommend you use this on a private network in your Data Center.

Install and Configure collect

You will need to install the following for this next section.

apt-get install -y collectd

Once installed you now need to configure collectd to utilize the proxy we installed

vi /etc/collectd/collectd.conf

Uncomment and update the lines:

LoadPlugin network

<Plugin network>
        Server "" "8096"

Where we have you'll want to replace with your container's private IP address.


You can use tcpdump to ensure packets are traveling over UDP to your container.

tcpdump -i eth1 -p -n -s 1500 udp

listening on eth1, link-type EN10MB (Ethernet), capture size 1500 bytes
23:59:07.014256 IP > BOOTP/DHCP, Request from 02:01:81:99:60:fa, length 300
23:59:13.104494 IP > UDP, length 1331
23:59:13.104773 IP > UDP, length 1332

You should also be able to query InfluxDB to see your metrics:

select * from "ubuntu/cpu-0/cpu-idle"

You're next steps are to now setup your Grafana dashboard in the way you'd like.