Chapter 12
257
2. Once installed, we configure the service to listen on a port of our choosing. The
configuration of collectd is done in /etc/collectd/collectd.conf. In the
following configuration, we listen on UDP port 12345:
Hostname "servername"
Interval 10
ReadThreads 5
LoadPlugin network
Listen "*" "12345"
LoadPlugin cpu
LoadPlugin df
LoadPlugin disk
LoadPlugin load
LoadPlugin memory
LoadPlugin processes
LoadPlugin swap
LoadPlugin syslog
LoadPlugin users
LoadPlugin interface
Interface "eth0"
LoadPlugin tcpconns
LoadPlugin rrdtool
CacheFlush 120
WritesPerSecond 50
Include "/etc/collectd/filters.conf"
Include "/etc/collectd/thresholds.conf"
3. We restart the service to pick up these changes:
sudo service collectd restart
www.it-ebooks.info