From charlesreid1

Line 27: Line 27:
(no opkg available...)
(no opkg available...)


=using=
=config and usage=


As you can deduce from the name, collectd is a daemon, so it runs as a background process.
As you can deduce from the name, collectd is a daemon, so it runs as a background process.


The way you use it is to edit the configuration file, set up any plugins, and then let the daemon service run.
The way you use it is to edit the configuration file, set up any plugins, and then let the daemon service run.
==config===
Link: https://collectd.org/wiki/index.php/First_steps#Configuration
Edit the config file at <code>/etc/collectd.conf</code>
Each plugin (see below) has a LoadPlugin line in the configuration. Plugins are bits of code that tell collectd how to collect various metrics.
Most plugins are commented out to keep things lean. The number of comment characters is significant.
* Two comment characters ## mean the plugin has not been built
* One comment character means the plugin has been built
* Default enabled plugins: cpu, interface, load, memory


=plugins=
=plugins=

Revision as of 21:33, 30 January 2018

Collectd is similar to Netdata in that it is a logging program that collects system metrics. It is implemented as a unix-style daemon, with lots of plugins.

Linode uses collectd to provide users with system status dashboards.

Link: https://collectd.org/

installing

debian

install with aptitude:

apt-get install collectd

mac

install with homebrew:

brew install collectd

openwrt

(no opkg available...)

config and usage

As you can deduce from the name, collectd is a daemon, so it runs as a background process.

The way you use it is to edit the configuration file, set up any plugins, and then let the daemon service run.

config=

Link: https://collectd.org/wiki/index.php/First_steps#Configuration

Edit the config file at /etc/collectd.conf

Each plugin (see below) has a LoadPlugin line in the configuration. Plugins are bits of code that tell collectd how to collect various metrics.

Most plugins are commented out to keep things lean. The number of comment characters is significant.

  • Two comment characters ## mean the plugin has not been built
  • One comment character means the plugin has been built
  • Default enabled plugins: cpu, interface, load, memory

plugins

when talking about plugins, we must distinguish between two kinds of plugins: collect plugins, and write plugins.

collect plugins provide collectd with a way to ask a particular server or piece of software for statistics. This type of plugin allows collectd to monitor that software.

write plugins provide collectd with a way to write its data to a particular piece of software. This type of plugin allows collectd to use a particular piece of software as a backend.

as an example:

write plugins

mongodb

https://collectd.org/wiki/index.php/Plugin:Write_MongoDB

graphite

https://collectd.org/wiki/index.php/Plugin:Write_Graphite

prometheus

https://collectd.org/wiki/index.php/Plugin:Write_Prometheus


collect plugins

Full table of plugins: https://collectd.org/wiki/index.php/Table_of_Plugins

Custom plugins: http://docs.rightscale.com/cm/rs101/create_custom_collectd_plug-ins_for_linux.html

flags