This is a text-only version of the following page on https://raymii.org:
Title : Set up a Collectd client
Author : Remy van Elst
Date : 09-04-2013
URL : https://raymii.org/s/tutorials/Collectd_client_setup_tutorial.html
Format : Markdown/HTML
This tutorial shows you how to set up a collectd client for use with a collectd
server. What is collectd? collectd gathers statistics about the system it is
running on and stores this information. Those statistics can then be used to
find current performance bottlenecks (i.e. performance analysis) and predict
future system load (i.e. capacity planning). Or if you just want pretty graphs
of your private server and are fed up with some homegrown solution you're at the
right place, too ;).
You need a collectd server set up to fully use this tutorial, but I also have
written a tutorial to do that.
Consider sponsoring me on Github. It means the world to me if you show you
r appreciation and you'll help pay the server costs.
ou can also sponsor me by getting a Digital Ocean VPS. With this referral link you'll get $100 credit for 60 days.
[The collectd server tutorial can be found here].
The collectd client is much easier to set up than the server with web frontend.
It only requires installation and configuring the client.
#### Installing Collectd
First install all the required packages:
sudo apt-get install collectd
#### Configuring Collectd to talk to our server
Open your favorite editor and edit the `/etc/collectd/collectd.conf` file. Read
it, then remove it all and make sure it looks like the below config file:
## /etc/collectd/collectd.conf generated for vps3.sparklingclouds.nl by Ansible
## Config Type: CollectD Client
## Extra Plugins
## CollectD Servers
Server "$COLLECTD SERVER IP" "25826"
Server "$COLLECTD SERVER IP" "25826"
The configuration file is relatively simple. Make sure to replace $VARIABLE$ by
the correct on for your server. You load plugins via `"LoadPlugin $name"`. The
network part is important, this configures our client to send its data to our
server. Replace $COLLECT SERVER IP with your collectd server IP.
*Make sure the file has a blank newline at the end. If it has not, collectd will _fail to start/run correctly_.
#### Configure collectd plugins
Now create the following file: `/etc/collectd/plugins.conf`, it doesn't exist by
default. This will house the plugin config. Add the following content to it, but
make sure it matches your LoadPlugin settings above. If you don't have the ping
plugin, you also don't need the config for it.
## Static Plugins (every host has them)
## Dynamic Plugins
Collectd server is now set up in "client" mode. To test it we restart the
And then check the `/var/lib/collectd/rrd/` folder and you should see some files
and folders (rrd libraries). If not then your collectd is setup wrong, see
syslog for more info.
We also should see these files on the collectd server, in the
`/var/lib/collectd/rrd` folder. If you see them there, you have done it
Remember to add the IP to the collectd server firewall.
Now you have a fully working collectd client set up.
All the text on this website is free as in freedom unless stated otherwise.
This means you can use it in any way you want, you can copy it, change it
the way you like and republish it, as long as you release the (modified)
content under the same license to give others the same freedoms you've got
and place my name and a link to this site with the article as source.
This site uses Google Analytics for statistics and Google Adwords for
advertisements. You are tracked and Google knows everything about you.
Use an adblocker like ublock-origin if you don't want it.
All the code on this website is licensed under the GNU GPL v3 license
unless already licensed under a license which does not allows this form
of licensing or if another license is stated on that page / in that software:
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see
Just to be clear, the information on this website is for ment for educational
purposes and you use it at your own risk. I do not take responsibility if you
screw something up. Use common sense, do not rm -rf / as root for example.
If you have any questions then do not hesitate to contact me.
See https://raymii.org/s/static/About.html for details.