echo "deb http://pkg.ci.collectd.org/deb/ trusty collectd-5.6" > /etc/apt/sources.list.d/collectd.listapt-get updateapt-get upgrade -yapt-get install -y build-essential \ libtool \ pkg-config \ git \ protobuf-c-compiler \ autoconf \ libjson-c-devgit clone git://github.com/algernon/riemann-c-client.gitcd riemann-c-clientgit checkout tags/debian/riemann-c-client-1.9.1-1autoreconf -i./configure && make && make check && make installapt-mark hold riemann-c-clientmkdir -p /etc/collectd/collectd.conf.dapt-get install --no-install-recommends -y collectd-core# Config file for collectd(1).## Some plugins need additional configuration and are disabled by default.# Please read collectd.conf(5) for details.## You should also read /usr/share/doc/collectd-core/README.Debian.plugins# before enabling any more plugins.
############################################################################### Global ##----------------------------------------------------------------------------## Global settings for the daemon. ###############################################################################
#Hostname "localhost"FQDNLookup true#BaseDir "/var/lib/collectd"#PluginDir "/usr/lib/collectd"#TypesDB "/usr/share/collectd/types.db" "/etc/collectd/my_types.db"
#----------------------------------------------------------------------------## When enabled, plugins are loaded automatically with the default options ## when an appropriate <Plugin ...> block is encountered. ## Disabled by default. ##----------------------------------------------------------------------------##AutoLoadPlugin false
#----------------------------------------------------------------------------## Interval at which to query values. This may be overwritten on a per-plugin ## base by using the 'Interval' option of the LoadPlugin block: ## <LoadPlugin foo> ## Interval 60 ## </LoadPlugin> ##----------------------------------------------------------------------------##Interval 10
CollectInternalStats true
#Timeout 2#ReadThreads 5#WriteThreads 5
# Limit the size of the write queue. Default is no limit. Setting up a limit# is recommended for servers handling a high volume of traffic.#WriteQueueLimitHigh 1000000#WriteQueueLimitLow 800000
############################################################################### Logging ##----------------------------------------------------------------------------## Plugins which provide logging functions should be loaded first, so log ## messages generated when loading or configuring other plugins can be ## accessed. ###############################################################################
LoadPlugin syslog
<Plugin syslog>
LogLevel info</Plugin>
############################################################################### LoadPlugin section ##----------------------------------------------------------------------------## Specify what features to activate. ###############################################################################
LoadPlugin cpuLoadPlugin df LoadPlugin interfaceLoadPlugin loadLoadPlugin memoryLoadPlugin statsdLoadPlugin swapLoadPlugin uptimeLoadPlugin write_riemannLoadPlugin logfile
############################################################################### Plugin configuration ##----------------------------------------------------------------------------## In this section configuration stubs for each plugin are provided. A desc- ## ription of those options is available in the collectd.conf(5) manual page. ###############################################################################
<Plugin cpu> ValuesPercentage true ReportByCpu true</Plugin>
<Plugin interface> Interface "lo" IgnoreSelected true</Plugin>
<Plugin memory> ValuesPercentage true</Plugin>
<Plugin df> MountPoint "/" ValuesPercentage true</Plugin>
<Plugin swap> ReportByDevice false ReportBytes true ValuesPercentage true</Plugin>
<Plugin statsd> Host "localhost" Port 8125 DeleteCounters false DeleteTimers false DeleteGauges false DeleteSets false TimerPercentile 90.0 TimerPercentile 95.0 TimerPercentile 99.0 TimerLower false TimerUpper false TimerSum false TimerCount false</Plugin>
<Plugin write_riemann>
<Node "example"> Host "localhost" Port 5555 Protocol UDP Batch true BatchMaxSize 8192 StoreRates true AlwaysAppendDS false TTLFactor 2.0 Notifications true CheckThresholds false EventServicePrefix "" </Node> Tag "foobar" Attribute "foo" "bar"</Plugin>
<Plugin "logfile"> LogLevel "info" File "/var/log/collectd.log" Timestamp true</Plugin>
<Include "/etc/collectd/collectd.conf.d"> Filter "*.conf"</Include>
yum install protobuf-compiler protobuf-c protobuf-c-devel -y
yum install cpan -y
cpan ExtUtils::MakeMaker
yum install libtool-ltdl-devel.x86_64 -y
(Into your collectd source)
./configure --enable-write_riemann
(The above step must show something like 'riemann [yes]'. If it is true, you should compile :) )
make && make all install