.\" Automatically generated by Pod::Man 4.07 (Pod::Simple 3.32)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
. ds -- \(*W-
. ds PI pi
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
. ds L" ""
. ds R" ""
. ds C` ""
. ds C' ""
'br\}
.el\{\
. ds -- \|\(em\|
. ds PI \(*p
. ds L" ``
. ds R" ''
. ds C`
. ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\"
.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.if !\nF .nr F 0
.if \nF>0 \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. if !\nF==2 \{\
. nr % 0
. nr F 2
. \}
.\}
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear. Run. Save yourself. No user-serviceable parts.
. \" fudge factors for nroff and troff
.if n \{\
. ds #H 0
. ds #V .8m
. ds #F .3m
. ds #[ \f1
. ds #] \fP
.\}
.if t \{\
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
. ds #V .6m
. ds #F 0
. ds #[ \&
. ds #] \&
.\}
. \" simple accents for nroff and troff
.if n \{\
. ds ' \&
. ds ` \&
. ds ^ \&
. ds , \&
. ds ~ ~
. ds /
.\}
.if t \{\
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
. \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
. \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
. \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
. ds : e
. ds 8 ss
. ds o a
. ds d- d\h'-1'\(ga
. ds D- D\h'-1'\(hy
. ds th \o'bp'
. ds Th \o'LP'
. ds ae ae
. ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
.IX Title "COLLECTD.CONF 5"
.TH COLLECTD.CONF 5 "2017-02-05" "5.7.1.git" "collectd"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
collectd.conf \- Configuration for the system statistics collection daemon collectd
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
.Vb 3
\& BaseDir "/var/lib/collectd"
\& PIDFile "/run/collectd.pid"
\& Interval 10.0
\&
\& LoadPlugin cpu
\& LoadPlugin load
\&
\&
\& Interval 3600
\&
\&
\& ValuesPercentage true
\&
\&
\& LoadPlugin ping
\&
\& Host "example.org"
\& Host "provider.net"
\&
.Ve
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
This config file controls how the system statistics collection daemon
\&\fBcollectd\fR behaves. The most significant option is \fBLoadPlugin\fR, which
controls which plugins to load. These plugins ultimately define collectd's
behavior. If the \fBAutoLoadPlugin\fR option has been enabled, the explicit
\&\fBLoadPlugin\fR lines may be omitted for all plugins with a configuration block,
i.e. a \f(CW\*(C`\*(C'\fR block.
.PP
The syntax of this config file is similar to the config file of the famous
\&\fIApache\fR webserver. Each line contains either an option (a key and a list of
one or more values) or a section-start or \-end. Empty lines and everything
after a non-quoted hash-symbol (\f(CW\*(C`#\*(C'\fR) are ignored. \fIKeys\fR are unquoted
strings, consisting only of alphanumeric characters and the underscore (\f(CW\*(C`_\*(C'\fR)
character. Keys are handled case insensitive by \fIcollectd\fR itself and all
plugins included with it. \fIValues\fR can either be an \fIunquoted string\fR, a
\&\fIquoted string\fR (enclosed in double-quotes) a \fInumber\fR or a \fIboolean\fR
expression. \fIUnquoted strings\fR consist of only alphanumeric characters and
underscores (\f(CW\*(C`_\*(C'\fR) and do not need to be quoted. \fIQuoted strings\fR are
enclosed in double quotes (\f(CW\*(C`"\*(C'\fR). You can use the backslash character (\f(CW\*(C`\e\*(C'\fR)
to include double quotes as part of the string. \fINumbers\fR can be specified in
decimal and floating point format (using a dot \f(CW\*(C`.\*(C'\fR as decimal separator),
hexadecimal when using the \f(CW\*(C`0x\*(C'\fR prefix and octal with a leading zero (\f(CW0\fR).
\&\fIBoolean\fR values are either \fBtrue\fR or \fBfalse\fR.
.PP
Lines may be wrapped by using \f(CW\*(C`\e\*(C'\fR as the last character before the newline.
This allows long lines to be split into multiple lines. Quoted strings may be
wrapped as well. However, those are treated special in that whitespace at the
beginning of the following lines will be ignored, which allows for nicely
indenting the wrapped lines.
.PP
The configuration is read and processed in order, i.e. from top to bottom. So
the plugins are loaded in the order listed in this config file. It is a good
idea to load any logging plugins first in order to catch messages from plugins
during configuration. Also, unless \fBAutoLoadPlugin\fR is enabled, the
\&\fBLoadPlugin\fR option \fImust\fR occur \fIbefore\fR the appropriate
\&\f(CW\*(C`<\f(CBPlugin\f(CW ...>\*(C'\fR block.
.SH "GLOBAL OPTIONS"
.IX Header "GLOBAL OPTIONS"
.IP "\fBBaseDir\fR \fIDirectory\fR" 4
.IX Item "BaseDir Directory"
Sets the base directory. This is the directory beneath which all RRD-files are
created. Possibly more subdirectories are created. This is also the working
directory for the daemon.
.IP "\fBLoadPlugin\fR \fIPlugin\fR" 4
.IX Item "LoadPlugin Plugin"
Loads the plugin \fIPlugin\fR. This is required to load plugins, unless the
\&\fBAutoLoadPlugin\fR option is enabled (see below). Without any loaded plugins,
\&\fIcollectd\fR will be mostly useless.
.Sp
Only the first \fBLoadPlugin\fR statement or block for a given plugin name has any
effect. This is useful when you want to split up the configuration into smaller
files and want each file to be \*(L"self contained\*(R", i.e. it contains a \fBPlugin\fR
block \fIand\fR the appropriate \fBLoadPlugin\fR statement. The downside is that if
you have multiple conflicting \fBLoadPlugin\fR blocks, e.g. when they specify
different intervals, only one of them (the first one encountered) will take
effect and all others will be silently ignored.
.Sp
\&\fBLoadPlugin\fR may either be a simple configuration \fIstatement\fR or a \fIblock\fR
with additional options, affecting the behavior of \fBLoadPlugin\fR. A simple
statement looks like this:
.Sp
.Vb 1
\& LoadPlugin "cpu"
.Ve
.Sp
Options inside a \fBLoadPlugin\fR block can override default settings and
influence the way plugins are loaded, e.g.:
.Sp
.Vb 3
\&
\& Interval 60
\&
.Ve
.Sp
The following options are valid inside \fBLoadPlugin\fR blocks:
.RS 4
.IP "\fBGlobals\fR \fBtrue|false\fR" 4
.IX Item "Globals true|false"
If enabled, collectd will export all global symbols of the plugin (and of all
libraries loaded as dependencies of the plugin) and, thus, makes those symbols
available for resolving unresolved symbols in subsequently loaded plugins if
that is supported by your system.
.Sp
This is useful (or possibly even required), e.g., when loading a plugin that
embeds some scripting language into the daemon (e.g. the \fIPerl\fR and
\&\fIPython plugins\fR). Scripting languages usually provide means to load
extensions written in C. Those extensions require symbols provided by the
interpreter, which is loaded as a dependency of the respective collectd plugin.
See the documentation of those plugins (e.g., \fIcollectd\-perl\fR\|(5) or
\&\fIcollectd\-python\fR\|(5)) for details.
.Sp
By default, this is disabled. As a special exception, if the plugin name is
either \f(CW\*(C`perl\*(C'\fR or \f(CW\*(C`python\*(C'\fR, the default is changed to enabled in order to keep
the average user from ever having to deal with this low level linking stuff.
.IP "\fBInterval\fR \fISeconds\fR" 4
.IX Item "Interval Seconds"
Sets a plugin-specific interval for collecting metrics. This overrides the
global \fBInterval\fR setting. If a plugin provides its own support for specifying
an interval, that setting will take precedence.
.IP "\fBFlushInterval\fR \fISeconds\fR" 4
.IX Item "FlushInterval Seconds"
Specifies the interval, in seconds, to call the flush callback if it's
defined in this plugin. By default, this is disabled.
.IP "\fBFlushTimeout\fR \fISeconds\fR" 4
.IX Item "FlushTimeout Seconds"
Specifies the value of the timeout argument of the flush callback.
.RE
.RS 4
.RE
.IP "\fBAutoLoadPlugin\fR \fBfalse\fR|\fBtrue\fR" 4
.IX Item "AutoLoadPlugin false|true"
When set to \fBfalse\fR (the default), each plugin needs to be loaded explicitly,
using the \fBLoadPlugin\fR statement documented above. If a
\&\fB\fR block is encountered and no configuration
handling callback for this plugin has been registered, a warning is logged and
the block is ignored.
.Sp
When set to \fBtrue\fR, explicit \fBLoadPlugin\fR statements are not required. Each
\&\fB\fR block acts as if it was immediately preceded by a
\&\fBLoadPlugin\fR statement. \fBLoadPlugin\fR statements are still required for
plugins that don't provide any configuration, e.g. the \fILoad plugin\fR.
.IP "\fBCollectInternalStats\fR \fBfalse\fR|\fBtrue\fR" 4
.IX Item "CollectInternalStats false|true"
When set to \fBtrue\fR, various statistics about the \fIcollectd\fR daemon will be
collected, with \*(L"collectd\*(R" as the \fIplugin name\fR. Defaults to \fBfalse\fR.
.Sp
The following metrics are reported:
.RS 4
.ie n .IP """collectd\-write_queue/queue_length""" 4
.el .IP "\f(CWcollectd\-write_queue/queue_length\fR" 4
.IX Item "collectd-write_queue/queue_length"
The number of metrics currently in the write queue. You can limit the queue
length with the \fBWriteQueueLimitLow\fR and \fBWriteQueueLimitHigh\fR options.
.ie n .IP """collectd\-write_queue/derive\-dropped""" 4
.el .IP "\f(CWcollectd\-write_queue/derive\-dropped\fR" 4
.IX Item "collectd-write_queue/derive-dropped"
The number of metrics dropped due to a queue length limitation.
If this value is non-zero, your system can't handle all incoming metrics and
protects itself against overload by dropping metrics.
.ie n .IP """collectd\-cache/cache_size""" 4
.el .IP "\f(CWcollectd\-cache/cache_size\fR" 4
.IX Item "collectd-cache/cache_size"
The number of elements in the metric cache (the cache you can interact with
using \fIcollectd\-unixsock\fR\|(5)).
.RE
.RS 4
.RE
.IP "\fBInclude\fR \fIPath\fR [\fIpattern\fR]" 4
.IX Item "Include Path [pattern]"
If \fIPath\fR points to a file, includes that file. If \fIPath\fR points to a
directory, recursively includes all files within that directory and its
subdirectories. If the \f(CW\*(C`wordexp\*(C'\fR function is available on your system,
shell-like wildcards are expanded before files are included. This means you can
use statements like the following:
.Sp
.Vb 1
\& Include "/etc/collectd.d/*.conf"
.Ve
.Sp
Starting with version 5.3, this may also be a block in which further options
affecting the behavior of \fBInclude\fR may be specified. The following option is
currently allowed:
.Sp
.Vb 3
\&
\& Filter "*.conf"
\&
.Ve
.RS 4
.IP "\fBFilter\fR \fIpattern\fR" 4
.IX Item "Filter pattern"
If the \f(CW\*(C`fnmatch\*(C'\fR function is available on your system, a shell-like wildcard
\&\fIpattern\fR may be specified to filter which files to include. This may be used
in combination with recursively including a directory to easily be able to
arbitrarily mix configuration files and other documents (e.g. \s-1README\s0 files).
The given example is similar to the first example above but includes all files
matching \f(CW\*(C`*.conf\*(C'\fR in any subdirectory of \f(CW\*(C`/etc/collectd.d\*(C'\fR.
.RE
.RS 4
.Sp
If more than one file is included by a single \fBInclude\fR option, the files
will be included in lexicographical order (as defined by the \f(CW\*(C`strcmp\*(C'\fR
function). Thus, you can e.\ g. use numbered prefixes to specify the
order in which the files are loaded.
.Sp
To prevent loops and shooting yourself in the foot in interesting ways the
nesting is limited to a depth of 8\ levels, which should be sufficient for
most uses. Since symlinks are followed it is still possible to crash the daemon
by looping symlinks. In our opinion significant stupidity should result in an
appropriate amount of pain.
.Sp
It is no problem to have a block like \f(CW\*(C`\*(C'\fR in more than one
file, but you cannot include files from within blocks.
.RE
.IP "\fBPIDFile\fR \fIFile\fR" 4
.IX Item "PIDFile File"
Sets where to write the \s-1PID\s0 file to. This file is overwritten when it exists
and deleted when the program is stopped. Some init-scripts might override this
setting using the \fB\-P\fR command-line option.
.IP "\fBPluginDir\fR \fIDirectory\fR" 4
.IX Item "PluginDir Directory"
Path to the plugins (shared objects) of collectd.
.IP "\fBTypesDB\fR \fIFile\fR [\fIFile\fR ...]" 4
.IX Item "TypesDB File [File ...]"
Set one or more files that contain the data-set descriptions. See
\&\fItypes.db\fR\|(5) for a description of the format of this file.
.Sp
If this option is not specified, a default file is read. If you need to define
custom types in addition to the types defined in the default file, you need to
explicitly load both. In other words, if the \fBTypesDB\fR option is encountered
the default behavior is disabled and if you need the default types you have to
also explicitly load them.
.IP "\fBInterval\fR \fISeconds\fR" 4
.IX Item "Interval Seconds"
Configures the interval in which to query the read plugins. Obviously smaller
values lead to a higher system load produced by collectd, while higher values
lead to more coarse statistics.
.Sp
\&\fBWarning:\fR You should set this once and then never touch it again. If you do,
\&\fIyou will have to delete all your \s-1RRD\s0 files\fR or know some serious RRDtool
magic! (Assuming you're using the \fIRRDtool\fR or \fIRRDCacheD\fR plugin.)
.IP "\fBMaxReadInterval\fR \fISeconds\fR" 4
.IX Item "MaxReadInterval Seconds"
A read plugin doubles the interval between queries after each failed attempt
to get data.
.Sp
This options limits the maximum value of the interval. The default value is
\&\fB86400\fR.
.IP "\fBTimeout\fR \fIIterations\fR" 4
.IX Item "Timeout Iterations"
Consider a value list \*(L"missing\*(R" when no update has been read or received for
\&\fIIterations\fR iterations. By default, \fIcollectd\fR considers a value list
missing when no update has been received for twice the update interval. Since
this setting uses iterations, the maximum allowed time without update depends
on the \fIInterval\fR information contained in each value list. This is used in
the \fIThreshold\fR configuration to dispatch notifications about missing values,
see \fIcollectd\-threshold\fR\|(5) for details.
.IP "\fBReadThreads\fR \fINum\fR" 4
.IX Item "ReadThreads Num"
Number of threads to start for reading plugins. The default value is \fB5\fR, but
you may want to increase this if you have more than five plugins that take a
long time to read. Mostly those are plugins that do network-IO. Setting this to
a value higher than the number of registered read callbacks is not recommended.
.IP "\fBWriteThreads\fR \fINum\fR" 4
.IX Item "WriteThreads Num"
Number of threads to start for dispatching value lists to write plugins. The
default value is \fB5\fR, but you may want to increase this if you have more than
five plugins that may take relatively long to write to.
.IP "\fBWriteQueueLimitHigh\fR \fIHighNum\fR" 4
.IX Item "WriteQueueLimitHigh HighNum"
.PD 0
.IP "\fBWriteQueueLimitLow\fR \fILowNum\fR" 4
.IX Item "WriteQueueLimitLow LowNum"
.PD
Metrics are read by the \fIread threads\fR and then put into a queue to be handled
by the \fIwrite threads\fR. If one of the \fIwrite plugins\fR is slow (e.g. network
timeouts, I/O saturation of the disk) this queue will grow. In order to avoid
running into memory issues in such a case, you can limit the size of this
queue.
.Sp
By default, there is no limit and memory may grow indefinitely. This is most
likely not an issue for clients, i.e. instances that only handle the local
metrics. For servers it is recommended to set this to a non-zero value, though.
.Sp
You can set the limits using \fBWriteQueueLimitHigh\fR and \fBWriteQueueLimitLow\fR.
Each of them takes a numerical argument which is the number of metrics in the
queue. If there are \fIHighNum\fR metrics in the queue, any new metrics \fIwill\fR be
dropped. If there are less than \fILowNum\fR metrics in the queue, all new metrics
\&\fIwill\fR be enqueued. If the number of metrics currently in the queue is between
\&\fILowNum\fR and \fIHighNum\fR, the metric is dropped with a probability that is
proportional to the number of metrics in the queue (i.e. it increases linearly
until it reaches 100%.)
.Sp
If \fBWriteQueueLimitHigh\fR is set to non-zero and \fBWriteQueueLimitLow\fR is
unset, the latter will default to half of \fBWriteQueueLimitHigh\fR.
.Sp
If you do not want to randomly drop values when the queue size is between
\&\fILowNum\fR and \fIHighNum\fR, set \fBWriteQueueLimitHigh\fR and \fBWriteQueueLimitLow\fR
to the same value.
.Sp
Enabling the \fBCollectInternalStats\fR option is of great help to figure out the
values to set \fBWriteQueueLimitHigh\fR and \fBWriteQueueLimitLow\fR to.
.IP "\fBHostname\fR \fIName\fR" 4
.IX Item "Hostname Name"
Sets the hostname that identifies a host. If you omit this setting, the
hostname will be determined using the \fIgethostname\fR\|(2) system call.
.IP "\fBFQDNLookup\fR \fBtrue|false\fR" 4
.IX Item "FQDNLookup true|false"
If \fBHostname\fR is determined automatically this setting controls whether or not
the daemon should try to figure out the \*(L"fully qualified domain name\*(R", \s-1FQDN.\s0
This is done using a lookup of the name returned by \f(CW\*(C`gethostname\*(C'\fR. This option
is enabled by default.
.IP "\fBPreCacheChain\fR \fIChainName\fR" 4
.IX Item "PreCacheChain ChainName"
.PD 0
.IP "\fBPostCacheChain\fR \fIChainName\fR" 4
.IX Item "PostCacheChain ChainName"
.PD
Configure the name of the \*(L"pre-cache chain\*(R" and the \*(L"post-cache chain\*(R". Please
see \*(L"\s-1FILTER CONFIGURATION\*(R"\s0 below on information on chains and how these
setting change the daemon's behavior.
.SH "PLUGIN OPTIONS"
.IX Header "PLUGIN OPTIONS"
Some plugins may register own options. These options must be enclosed in a
\&\f(CW\*(C`Plugin\*(C'\fR\-Section. Which options exist depends on the plugin used. Some plugins
require external configuration, too. The \f(CW\*(C`apache plugin\*(C'\fR, for example,
required \f(CW\*(C`mod_status\*(C'\fR to be configured in the webserver you're going to
collect data from. These plugins are listed below as well, even if they don't
require any configuration within collectd's configuration file.
.PP
A list of all plugins and a short summary for each plugin can be found in the
\&\fI\s-1README\s0\fR file shipped with the sourcecode and hopefully binary packets as
well.
.ie n .SS "Plugin ""aggregation"""
.el .SS "Plugin \f(CWaggregation\fP"
.IX Subsection "Plugin aggregation"
The \fIAggregation plugin\fR makes it possible to aggregate several values into
one using aggregation functions such as \fIsum\fR, \fIaverage\fR, \fImin\fR and \fImax\fR.
This can be put to a wide variety of uses, e.g. average and total \s-1CPU\s0
statistics for your entire fleet.
.PP
The grouping is powerful but, as with many powerful tools, may be a bit
difficult to wrap your head around. The grouping will therefore be
demonstrated using an example: The average and sum of the \s-1CPU\s0 usage across
all CPUs of each host is to be calculated.
.PP
To select all the affected values for our example, set \f(CW\*(C`Plugin cpu\*(C'\fR and
\&\f(CW\*(C`Type cpu\*(C'\fR. The other values are left unspecified, meaning \*(L"all values\*(R". The
\&\fIHost\fR, \fIPlugin\fR, \fIPluginInstance\fR, \fIType\fR and \fITypeInstance\fR options
work as if they were specified in the \f(CW\*(C`WHERE\*(C'\fR clause of an \f(CW\*(C`SELECT\*(C'\fR \s-1SQL\s0
statement.
.PP
.Vb 2
\& Plugin "cpu"
\& Type "cpu"
.Ve
.PP
Although the \fIHost\fR, \fIPluginInstance\fR (\s-1CPU\s0 number, i.e. 0, 1, 2, ...) and
\&\fITypeInstance\fR (idle, user, system, ...) fields are left unspecified in the
example, the intention is to have a new value for each host / type instance
pair. This is achieved by \*(L"grouping\*(R" the values using the \f(CW\*(C`GroupBy\*(C'\fR option.
It can be specified multiple times to group by more than one field.
.PP
.Vb 2
\& GroupBy "Host"
\& GroupBy "TypeInstance"
.Ve
.PP
We do neither specify nor group by \fIplugin instance\fR (the \s-1CPU\s0 number), so all
metrics that differ in the \s-1CPU\s0 number only will be aggregated. Each
aggregation needs \fIat least one\fR such field, otherwise no aggregation would
take place.
.PP
The full example configuration looks like this:
.PP
.Vb 4
\&
\&
\& Plugin "cpu"
\& Type "cpu"
\&
\& GroupBy "Host"
\& GroupBy "TypeInstance"
\&
\& CalculateSum true
\& CalculateAverage true
\&
\&
.Ve
.PP
There are a couple of limitations you should be aware of:
.IP "\(bu" 4
The \fIType\fR cannot be left unspecified, because it is not reasonable to add
apples to oranges. Also, the internal lookup structure won't work if you try
to group by type.
.IP "\(bu" 4
There must be at least one unspecified, ungrouped field. Otherwise nothing
will be aggregated.
.PP
As you can see in the example above, each aggregation has its own
\&\fBAggregation\fR block. You can have multiple aggregation blocks and aggregation
blocks may match the same values, i.e. one value list can update multiple
aggregations. The following options are valid inside \fBAggregation\fR blocks:
.IP "\fBHost\fR \fIHost\fR" 4
.IX Item "Host Host"
.PD 0
.IP "\fBPlugin\fR \fIPlugin\fR" 4
.IX Item "Plugin Plugin"
.IP "\fBPluginInstance\fR \fIPluginInstance\fR" 4
.IX Item "PluginInstance PluginInstance"
.IP "\fBType\fR \fIType\fR" 4
.IX Item "Type Type"
.IP "\fBTypeInstance\fR \fITypeInstance\fR" 4
.IX Item "TypeInstance TypeInstance"
.PD
Selects the value lists to be added to this aggregation. \fBType\fR must be a
valid data set name, see \fItypes.db\fR\|(5) for details.
.Sp
If the string starts with and ends with a slash (\f(CW\*(C`/\*(C'\fR), the string is
interpreted as a \fIregular expression\fR. The regex flavor used are \s-1POSIX\s0
extended regular expressions as described in \fIregex\fR\|(7). Example usage:
.Sp
.Vb 1
\& Host "/^db[0\-9]\e\e.example\e\e.com$/"
.Ve
.IP "\fBGroupBy\fR \fBHost\fR|\fBPlugin\fR|\fBPluginInstance\fR|\fBTypeInstance\fR" 4
.IX Item "GroupBy Host|Plugin|PluginInstance|TypeInstance"
Group valued by the specified field. The \fBGroupBy\fR option may be repeated to
group by multiple fields.
.IP "\fBSetHost\fR \fIHost\fR" 4
.IX Item "SetHost Host"
.PD 0
.IP "\fBSetPlugin\fR \fIPlugin\fR" 4
.IX Item "SetPlugin Plugin"
.IP "\fBSetPluginInstance\fR \fIPluginInstance\fR" 4
.IX Item "SetPluginInstance PluginInstance"
.IP "\fBSetTypeInstance\fR \fITypeInstance\fR" 4
.IX Item "SetTypeInstance TypeInstance"
.PD
Sets the appropriate part of the identifier to the provided string.
.Sp
The \fIPluginInstance\fR should include the placeholder \f(CW\*(C`%{aggregation}\*(C'\fR which
will be replaced with the aggregation function, e.g. \*(L"average\*(R". Not including
the placeholder will result in duplication warnings and/or messed up values if
more than one aggregation function are enabled.
.Sp
The following example calculates the average usage of all \*(L"even\*(R" CPUs:
.Sp
.Vb 5
\&
\&
\& Plugin "cpu"
\& PluginInstance "/[0,2,4,6,8]$/"
\& Type "cpu"
\&
\& SetPlugin "cpu"
\& SetPluginInstance "even\-%{aggregation}"
\&
\& GroupBy "Host"
\& GroupBy "TypeInstance"
\&
\& CalculateAverage true
\&
\&
.Ve
.Sp
This will create the files:
.RS 4
.IP "\(bu" 4
foo.example.com/cpu\-even\-average/cpu\-idle
.IP "\(bu" 4
foo.example.com/cpu\-even\-average/cpu\-system
.IP "\(bu" 4
foo.example.com/cpu\-even\-average/cpu\-user
.IP "\(bu" 4
\&...
.RE
.RS 4
.RE
.IP "\fBCalculateNum\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "CalculateNum true|false"
.PD 0
.IP "\fBCalculateSum\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "CalculateSum true|false"
.IP "\fBCalculateAverage\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "CalculateAverage true|false"
.IP "\fBCalculateMinimum\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "CalculateMinimum true|false"
.IP "\fBCalculateMaximum\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "CalculateMaximum true|false"
.IP "\fBCalculateStddev\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "CalculateStddev true|false"
.PD
Boolean options for enabling calculation of the number of value lists, their
sum, average, minimum, maximum and\ / or standard deviation. All options
are disabled by default.
.ie n .SS "Plugin ""amqp"""
.el .SS "Plugin \f(CWamqp\fP"
.IX Subsection "Plugin amqp"
The \fI\s-1AMQP\s0 plugin\fR can be used to communicate with other instances of
\&\fIcollectd\fR or third party applications using an \s-1AMQP\s0 message broker. Values
are sent to or received from the broker, which handles routing, queueing and
possibly filtering out messages.
.PP
\&\fBSynopsis:\fR
.PP
.Vb 10
\&
\& # Send values to an AMQP broker
\&
\& Host "localhost"
\& Port "5672"
\& VHost "/"
\& User "guest"
\& Password "guest"
\& Exchange "amq.fanout"
\& # ExchangeType "fanout"
\& # RoutingKey "collectd"
\& # Persistent false
\& # ConnectionRetryDelay 0
\& # Format "command"
\& # StoreRates false
\& # GraphitePrefix "collectd."
\& # GraphiteEscapeChar "_"
\& # GraphiteSeparateInstances false
\& # GraphiteAlwaysAppendDS false
\& # GraphitePreserveSeparator false
\&
\&
\& # Receive values from an AMQP broker
\&
\& Host "localhost"
\& Port "5672"
\& VHost "/"
\& User "guest"
\& Password "guest"
\& Exchange "amq.fanout"
\& # ExchangeType "fanout"
\& # Queue "queue_name"
\& # QueueDurable false
\& # QueueAutoDelete true
\& # RoutingKey "collectd.#"
\& # ConnectionRetryDelay 0
\&
\&
.Ve
.PP
The plugin's configuration consists of a number of \fIPublish\fR and \fISubscribe\fR
blocks, which configure sending and receiving of values respectively. The two
blocks are very similar, so unless otherwise noted, an option can be used in
either block. The name given in the blocks starting tag is only used for
reporting messages, but may be used to support \fIflushing\fR of certain
\&\fIPublish\fR blocks in the future.
.IP "\fBHost\fR \fIHost\fR" 4
.IX Item "Host Host"
Hostname or IP-address of the \s-1AMQP\s0 broker. Defaults to the default behavior of
the underlying communications library, \fIrabbitmq-c\fR, which is \*(L"localhost\*(R".
.IP "\fBPort\fR \fIPort\fR" 4
.IX Item "Port Port"
Service name or port number on which the \s-1AMQP\s0 broker accepts connections. This
argument must be a string, even if the numeric form is used. Defaults to
\&\*(L"5672\*(R".
.IP "\fBVHost\fR \fIVHost\fR" 4
.IX Item "VHost VHost"
Name of the \fIvirtual host\fR on the \s-1AMQP\s0 broker to use. Defaults to \*(L"/\*(R".
.IP "\fBUser\fR \fIUser\fR" 4
.IX Item "User User"
.PD 0
.IP "\fBPassword\fR \fIPassword\fR" 4
.IX Item "Password Password"
.PD
Credentials used to authenticate to the \s-1AMQP\s0 broker. By default \*(L"guest\*(R"/\*(L"guest\*(R"
is used.
.IP "\fBExchange\fR \fIExchange\fR" 4
.IX Item "Exchange Exchange"
In \fIPublish\fR blocks, this option specifies the \fIexchange\fR to send values to.
By default, \*(L"amq.fanout\*(R" will be used.
.Sp
In \fISubscribe\fR blocks this option is optional. If given, a \fIbinding\fR between
the given exchange and the \fIqueue\fR is created, using the \fIrouting key\fR if
configured. See the \fBQueue\fR and \fBRoutingKey\fR options below.
.IP "\fBExchangeType\fR \fIType\fR" 4
.IX Item "ExchangeType Type"
If given, the plugin will try to create the configured \fIexchange\fR with this
\&\fItype\fR after connecting. When in a \fISubscribe\fR block, the \fIqueue\fR will then
be bound to this exchange.
.IP "\fBQueue\fR \fIQueue\fR (Subscribe only)" 4
.IX Item "Queue Queue (Subscribe only)"
Configures the \fIqueue\fR name to subscribe to. If no queue name was configured
explicitly, a unique queue name will be created by the broker.
.IP "\fBQueueDurable\fR \fBtrue\fR|\fBfalse\fR (Subscribe only)" 4
.IX Item "QueueDurable true|false (Subscribe only)"
Defines if the \fIqueue\fR subscribed to is durable (saved to persistent storage)
or transient (will disappear if the \s-1AMQP\s0 broker is restarted). Defaults to
\&\*(L"false\*(R".
.Sp
This option should be used in conjunction with the \fIPersistent\fR option on the
publish side.
.IP "\fBQueueAutoDelete\fR \fBtrue\fR|\fBfalse\fR (Subscribe only)" 4
.IX Item "QueueAutoDelete true|false (Subscribe only)"
Defines if the \fIqueue\fR subscribed to will be deleted once the last consumer
unsubscribes. Defaults to \*(L"true\*(R".
.IP "\fBRoutingKey\fR \fIKey\fR" 4
.IX Item "RoutingKey Key"
In \fIPublish\fR blocks, this configures the routing key to set on all outgoing
messages. If not given, the routing key will be computed from the \fIidentifier\fR
of the value. The host, plugin, type and the two instances are concatenated
together using dots as the separator and all containing dots replaced with
slashes. For example \*(L"collectd.host/example/com.cpu.0.cpu.user\*(R". This makes it
possible to receive only specific values using a \*(L"topic\*(R" exchange.
.Sp
In \fISubscribe\fR blocks, configures the \fIrouting key\fR used when creating a
\&\fIbinding\fR between an \fIexchange\fR and the \fIqueue\fR. The usual wildcards can be
used to filter messages when using a \*(L"topic\*(R" exchange. If you're only
interested in \s-1CPU\s0 statistics, you could use the routing key \*(L"collectd.*.cpu.#\*(R"
for example.
.IP "\fBPersistent\fR \fBtrue\fR|\fBfalse\fR (Publish only)" 4
.IX Item "Persistent true|false (Publish only)"
Selects the \fIdelivery method\fR to use. If set to \fBtrue\fR, the \fIpersistent\fR
mode will be used, i.e. delivery is guaranteed. If set to \fBfalse\fR (the
default), the \fItransient\fR delivery mode will be used, i.e. messages may be
lost due to high load, overflowing queues or similar issues.
.IP "\fBConnectionRetryDelay\fR \fIDelay\fR" 4
.IX Item "ConnectionRetryDelay Delay"
When the connection to the \s-1AMQP\s0 broker is lost, defines the time in seconds to
wait before attempting to reconnect. Defaults to 0, which implies collectd will
attempt to reconnect at each read interval (in Subscribe mode) or each time
values are ready for submission (in Publish mode).
.IP "\fBFormat\fR \fBCommand\fR|\fB\s-1JSON\s0\fR|\fBGraphite\fR (Publish only)" 4
.IX Item "Format Command|JSON|Graphite (Publish only)"
Selects the format in which messages are sent to the broker. If set to
\&\fBCommand\fR (the default), values are sent as \f(CW\*(C`PUTVAL\*(C'\fR commands which are
identical to the syntax used by the \fIExec\fR and \fIUnixSock plugins\fR. In this
case, the \f(CW\*(C`Content\-Type\*(C'\fR header field will be set to \f(CW\*(C`text/collectd\*(C'\fR.
.Sp
If set to \fB\s-1JSON\s0\fR, the values are encoded in the \fIJavaScript Object Notation\fR,
an easy and straight forward exchange format. The \f(CW\*(C`Content\-Type\*(C'\fR header field
will be set to \f(CW\*(C`application/json\*(C'\fR.
.Sp
If set to \fBGraphite\fR, values are encoded in the \fIGraphite\fR format, which is
\&\*(L"\en\*(R". The \f(CW\*(C`Content\-Type\*(C'\fR header field will be set to
\&\f(CW\*(C`text/graphite\*(C'\fR.
.Sp
A subscribing client \fIshould\fR use the \f(CW\*(C`Content\-Type\*(C'\fR header field to
determine how to decode the values. Currently, the \fI\s-1AMQP\s0 plugin\fR itself can
only decode the \fBCommand\fR format.
.IP "\fBStoreRates\fR \fBtrue\fR|\fBfalse\fR (Publish only)" 4
.IX Item "StoreRates true|false (Publish only)"
Determines whether or not \f(CW\*(C`COUNTER\*(C'\fR, \f(CW\*(C`DERIVE\*(C'\fR and \f(CW\*(C`ABSOLUTE\*(C'\fR data sources
are converted to a \fIrate\fR (i.e. a \f(CW\*(C`GAUGE\*(C'\fR value). If set to \fBfalse\fR (the
default), no conversion is performed. Otherwise the conversion is performed
using the internal value cache.
.Sp
Please note that currently this option is only used if the \fBFormat\fR option has
been set to \fB\s-1JSON\s0\fR.
.IP "\fBGraphitePrefix\fR (Publish and \fBFormat\fR=\fIGraphite\fR only)" 4
.IX Item "GraphitePrefix (Publish and Format=Graphite only)"
A prefix can be added in the metric name when outputting in the \fIGraphite\fR format.
It's added before the \fIHost\fR name.
Metric name will be \*(L"\*(R"
.IP "\fBGraphitePostfix\fR (Publish and \fBFormat\fR=\fIGraphite\fR only)" 4
.IX Item "GraphitePostfix (Publish and Format=Graphite only)"
A postfix can be added in the metric name when outputting in the \fIGraphite\fR format.
It's added after the \fIHost\fR name.
Metric name will be \*(L"\*(R"
.IP "\fBGraphiteEscapeChar\fR (Publish and \fBFormat\fR=\fIGraphite\fR only)" 4
.IX Item "GraphiteEscapeChar (Publish and Format=Graphite only)"
Specify a character to replace dots (.) in the host part of the metric name.
In \fIGraphite\fR metric name, dots are used as separators between different
metric parts (host, plugin, type).
Default is \*(L"_\*(R" (\fIUnderscore\fR).
.IP "\fBGraphiteSeparateInstances\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "GraphiteSeparateInstances true|false"
If set to \fBtrue\fR, the plugin instance and type instance will be in their own
path component, for example \f(CW\*(C`host.cpu.0.cpu.idle\*(C'\fR. If set to \fBfalse\fR (the
default), the plugin and plugin instance (and likewise the type and type
instance) are put into one component, for example \f(CW\*(C`host.cpu\-0.cpu\-idle\*(C'\fR.
.IP "\fBGraphiteAlwaysAppendDS\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "GraphiteAlwaysAppendDS true|false"
If set to \fBtrue\fR, append the name of the \fIData Source\fR (\s-1DS\s0) to the \*(L"metric\*(R"
identifier. If set to \fBfalse\fR (the default), this is only done when there is
more than one \s-1DS.\s0
.IP "\fBGraphitePreserveSeparator\fR \fBfalse\fR|\fBtrue\fR" 4
.IX Item "GraphitePreserveSeparator false|true"
If set to \fBfalse\fR (the default) the \f(CW\*(C`.\*(C'\fR (dot) character is replaced with
\&\fIGraphiteEscapeChar\fR. Otherwise, if set to \fBtrue\fR, the \f(CW\*(C`.\*(C'\fR (dot) character
is preserved, i.e. passed through.
.ie n .SS "Plugin ""apache"""
.el .SS "Plugin \f(CWapache\fP"
.IX Subsection "Plugin apache"
To configure the \f(CW\*(C`apache\*(C'\fR\-plugin you first need to configure the Apache
webserver correctly. The Apache-plugin \f(CW\*(C`mod_status\*(C'\fR needs to be loaded and
working and the \f(CW\*(C`ExtendedStatus\*(C'\fR directive needs to be \fBenabled\fR. You can use
the following snipped to base your Apache config upon:
.PP
.Vb 6
\& ExtendedStatus on
\&
\&
\& SetHandler server\-status
\&
\&
.Ve
.PP
Since its \f(CW\*(C`mod_status\*(C'\fR module is very similar to Apache's, \fBlighttpd\fR is
also supported. It introduces a new field, called \f(CW\*(C`BusyServers\*(C'\fR, to count the
number of currently connected clients. This field is also supported.
.PP
The configuration of the \fIApache\fR plugin consists of one or more
\&\f(CW\*(C`\*(C'\fR blocks. Each block requires one string argument
as the instance name. For example:
.PP
.Vb 8
\&
\&
\& URL "http://www1.example.com/mod_status?auto"
\&
\&
\& URL "http://www2.example.com/mod_status?auto"
\&
\&
.Ve
.PP
The instance name will be used as the \fIplugin instance\fR. To emulate the old
(version\ 4) behavior, you can use an empty string (""). In order for the
plugin to work correctly, each instance name must be unique. This is not
enforced by the plugin and it is your responsibility to ensure it.
.PP
The following options are accepted within each \fIInstance\fR block:
.IP "\fB\s-1URL\s0\fR \fIhttp://host/mod_status?auto\fR" 4
.IX Item "URL http://host/mod_status?auto"
Sets the \s-1URL\s0 of the \f(CW\*(C`mod_status\*(C'\fR output. This needs to be the output generated
by \f(CW\*(C`ExtendedStatus on\*(C'\fR and it needs to be the machine readable output
generated by appending the \f(CW\*(C`?auto\*(C'\fR argument. This option is \fImandatory\fR.
.IP "\fBUser\fR \fIUsername\fR" 4
.IX Item "User Username"
Optional user name needed for authentication.
.IP "\fBPassword\fR \fIPassword\fR" 4
.IX Item "Password Password"
Optional password needed for authentication.
.IP "\fBVerifyPeer\fR \fBtrue|false\fR" 4
.IX Item "VerifyPeer true|false"
Enable or disable peer \s-1SSL\s0 certificate verification. See
for details. Enabled by default.
.IP "\fBVerifyHost\fR \fBtrue|false\fR" 4
.IX Item "VerifyHost true|false"
Enable or disable peer host name verification. If enabled, the plugin checks
if the \f(CW\*(C`Common Name\*(C'\fR or a \f(CW\*(C`Subject Alternate Name\*(C'\fR field of the \s-1SSL\s0
certificate matches the host name provided by the \fB\s-1URL\s0\fR option. If this
identity check fails, the connection is aborted. Obviously, only works when
connecting to a \s-1SSL\s0 enabled server. Enabled by default.
.IP "\fBCACert\fR \fIFile\fR" 4
.IX Item "CACert File"
File that holds one or more \s-1SSL\s0 certificates. If you want to use \s-1HTTPS\s0 you will
possibly need this option. What \s-1CA\s0 certificates come bundled with \f(CW\*(C`libcurl\*(C'\fR
and are checked by default depends on the distribution you use.
.IP "\fBSSLCiphers\fR \fIlist of ciphers\fR" 4
.IX Item "SSLCiphers list of ciphers"
Specifies which ciphers to use in the connection. The list of ciphers
must specify valid ciphers. See
for details.
.IP "\fBTimeout\fR \fIMilliseconds\fR" 4
.IX Item "Timeout Milliseconds"
The \fBTimeout\fR option sets the overall timeout for \s-1HTTP\s0 requests to \fB\s-1URL\s0\fR, in
milliseconds. By default, the configured \fBInterval\fR is used to set the
timeout.
.ie n .SS "Plugin ""apcups"""
.el .SS "Plugin \f(CWapcups\fP"
.IX Subsection "Plugin apcups"
.IP "\fBHost\fR \fIHostname\fR" 4
.IX Item "Host Hostname"
Hostname of the host running \fBapcupsd\fR. Defaults to \fBlocalhost\fR. Please note
that IPv6 support has been disabled unless someone can confirm or decline that
\&\fBapcupsd\fR can handle it.
.IP "\fBPort\fR \fIPort\fR" 4
.IX Item "Port Port"
TCP-Port to connect to. Defaults to \fB3551\fR.
.IP "\fBReportSeconds\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "ReportSeconds true|false"
If set to \fBtrue\fR, the time reported in the \f(CW\*(C`timeleft\*(C'\fR metric will be
converted to seconds. This is the recommended setting. If set to \fBfalse\fR, the
default for backwards compatibility, the time will be reported in minutes.
.IP "\fBPersistentConnection\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "PersistentConnection true|false"
The plugin is designed to keep the connection to \fIapcupsd\fR open between reads.
If plugin poll interval is greater than 15 seconds (hardcoded socket close
timeout in \fIapcupsd\fR \s-1NIS\s0), then this option is \fBfalse\fR by default.
.Sp
You can instruct the plugin to close the connection after each read by setting
this option to \fBfalse\fR or force keeping the connection by setting it to \fBtrue\fR.
.Sp
If \fIapcupsd\fR appears to close the connection due to inactivity quite quickly,
the plugin will try to detect this problem and switch to an open-read-close mode.
.ie n .SS "Plugin ""aquaero"""
.el .SS "Plugin \f(CWaquaero\fP"
.IX Subsection "Plugin aquaero"
This plugin collects the value of the available sensors in an
\&\fIAquaero\ 5\fR board. Aquaero\ 5 is a water-cooling controller board,
manufactured by Aqua Computer GmbH , with a \s-1USB2\s0
connection for monitoring and configuration. The board can handle multiple
temperature sensors, fans, water pumps and water level sensors and adjust the
output settings such as fan voltage or power used by the water pump based on
the available inputs using a configurable controller included in the board.
This plugin collects all the available inputs as well as some of the output
values chosen by this controller. The plugin is based on the \fIlibaquaero5\fR
library provided by \fIaquatools-ng\fR.
.IP "\fBDevice\fR \fIDevicePath\fR" 4
.IX Item "Device DevicePath"
Device path of the Aquaero\ 5's \s-1USB HID \s0(human interface device), usually
in the form \f(CW\*(C`/dev/usb/hiddevX\*(C'\fR. If this option is no set the plugin will try
to auto-detect the Aquaero 5 \s-1USB\s0 device based on vendor-ID and product-ID.
.ie n .SS "Plugin ""ascent"""
.el .SS "Plugin \f(CWascent\fP"
.IX Subsection "Plugin ascent"
This plugin collects information about an Ascent server, a free server for the
\&\*(L"World of Warcraft\*(R" game. This plugin gathers the information by fetching the
\&\s-1XML\s0 status page using \f(CW\*(C`libcurl\*(C'\fR and parses it using \f(CW\*(C`libxml2\*(C'\fR.
.PP
The configuration options are the same as for the \f(CW\*(C`apache\*(C'\fR plugin above:
.IP "\fB\s-1URL\s0\fR \fIhttp://localhost/ascent/status/\fR" 4
.IX Item "URL http://localhost/ascent/status/"
Sets the \s-1URL\s0 of the \s-1XML\s0 status output.
.IP "\fBUser\fR \fIUsername\fR" 4
.IX Item "User Username"
Optional user name needed for authentication.
.IP "\fBPassword\fR \fIPassword\fR" 4
.IX Item "Password Password"
Optional password needed for authentication.
.IP "\fBVerifyPeer\fR \fBtrue|false\fR" 4
.IX Item "VerifyPeer true|false"
Enable or disable peer \s-1SSL\s0 certificate verification. See
for details. Enabled by default.
.IP "\fBVerifyHost\fR \fBtrue|false\fR" 4
.IX Item "VerifyHost true|false"
Enable or disable peer host name verification. If enabled, the plugin checks
if the \f(CW\*(C`Common Name\*(C'\fR or a \f(CW\*(C`Subject Alternate Name\*(C'\fR field of the \s-1SSL\s0
certificate matches the host name provided by the \fB\s-1URL\s0\fR option. If this
identity check fails, the connection is aborted. Obviously, only works when
connecting to a \s-1SSL\s0 enabled server. Enabled by default.
.IP "\fBCACert\fR \fIFile\fR" 4
.IX Item "CACert File"
File that holds one or more \s-1SSL\s0 certificates. If you want to use \s-1HTTPS\s0 you will
possibly need this option. What \s-1CA\s0 certificates come bundled with \f(CW\*(C`libcurl\*(C'\fR
and are checked by default depends on the distribution you use.
.IP "\fBTimeout\fR \fIMilliseconds\fR" 4
.IX Item "Timeout Milliseconds"
The \fBTimeout\fR option sets the overall timeout for \s-1HTTP\s0 requests to \fB\s-1URL\s0\fR, in
milliseconds. By default, the configured \fBInterval\fR is used to set the
timeout.
.ie n .SS "Plugin ""barometer"""
.el .SS "Plugin \f(CWbarometer\fP"
.IX Subsection "Plugin barometer"
This plugin reads absolute air pressure using digital barometer sensor on a I2C
bus. Supported sensors are:
.IP "\fI\s-1MPL115A2\s0\fR from Freescale, see ." 5
.IX Item "MPL115A2 from Freescale, see ."
.PD 0
.IP "\fI\s-1MPL3115\s0\fR from Freescale see ." 5
.IX Item "MPL3115 from Freescale see ."
.IP "\fI\s-1BMP085\s0\fR from Bosch Sensortec" 5
.IX Item "BMP085 from Bosch Sensortec"
.PD
.PP
The sensor type \- one of the above \- is detected automatically by the plugin
and indicated in the plugin_instance (you will see subdirectory
\&\*(L"barometer\-mpl115\*(R" or \*(L"barometer\-mpl3115\*(R", or \*(L"barometer\-bmp085\*(R"). The order of
detection is \s-1BMP085 \-\s0> \s-1MPL3115 \-\s0> \s-1MPL115A2,\s0 the first one found will be used
(only one sensor can be used by the plugin).
.PP
The plugin provides absolute barometric pressure, air pressure reduced to sea
level (several possible approximations) and as an auxiliary value also internal
sensor temperature. It uses (expects/provides) typical metric units \- pressure
in [hPa], temperature in [C], altitude in [m].
.PP
It was developed and tested under Linux only. The only platform dependency is
the standard Linux i2c\-dev interface (the particular bus driver has to
support the \s-1SM\s0 Bus command subset).
.PP
The reduction or normalization to mean sea level pressure requires (depending
on selected method/approximation) also altitude and reference to temperature
sensor(s). When multiple temperature sensors are configured the minimum of
their values is always used (expecting that the warmer ones are affected by
e.g. direct sun light at that moment).
.PP
Synopsis:
.PP
.Vb 9
\&
\& Device "/dev/i2c\-0";
\& Oversampling 512
\& PressureOffset 0.0
\& TemperatureOffset 0.0
\& Normalization 2
\& Altitude 238.0
\& TemperatureSensor "myserver/onewire\-F10FCA000800/temperature"
\&
.Ve
.IP "\fBDevice\fR \fIdevice\fR" 4
.IX Item "Device device"
The only mandatory configuration parameter.
.Sp
Device name of the I2C bus to which the sensor is connected. Note that
typically you need to have loaded the i2c\-dev module.
Using i2c\-tools you can check/list i2c buses available on your system by:
.Sp
.Vb 1
\& i2cdetect \-l
.Ve
.Sp
Then you can scan for devices on given bus. E.g. to scan the whole bus 0 use:
.Sp
.Vb 1
\& i2cdetect \-y \-a 0
.Ve
.Sp
This way you should be able to verify that the pressure sensor (either type) is
connected and detected on address 0x60.
.IP "\fBOversampling\fR \fIvalue\fR" 4
.IX Item "Oversampling value"
Optional parameter controlling the oversampling/accuracy. Default value
is 1 providing fastest and least accurate reading.
.Sp
For \fI\s-1MPL115\s0\fR this is the size of the averaging window. To filter out sensor
noise a simple averaging using floating window of this configurable size is
used. The plugin will use average of the last \f(CW\*(C`value\*(C'\fR measurements (value of 1
means no averaging). Minimal size is 1, maximal 1024.
.Sp
For \fI\s-1MPL3115\s0\fR this is the oversampling value. The actual oversampling is
performed by the sensor and the higher value the higher accuracy and longer
conversion time (although nothing to worry about in the collectd context).
Supported values are: 1, 2, 4, 8, 16, 32, 64 and 128. Any other value is
adjusted by the plugin to the closest supported one.
.Sp
For \fI\s-1BMP085\s0\fR this is the oversampling value. The actual oversampling is
performed by the sensor and the higher value the higher accuracy and longer
conversion time (although nothing to worry about in the collectd context).
Supported values are: 1, 2, 4, 8. Any other value is adjusted by the plugin to
the closest supported one.
.IP "\fBPressureOffset\fR \fIoffset\fR" 4
.IX Item "PressureOffset offset"
Optional parameter for \s-1MPL3115\s0 only.
.Sp
You can further calibrate the sensor by supplying pressure and/or temperature
offsets. This is added to the measured/caclulated value (i.e. if the measured
value is too high then use negative offset).
In hPa, default is 0.0.
.IP "\fBTemperatureOffset\fR \fIoffset\fR" 4
.IX Item "TemperatureOffset offset"
Optional parameter for \s-1MPL3115\s0 only.
.Sp
You can further calibrate the sensor by supplying pressure and/or temperature
offsets. This is added to the measured/caclulated value (i.e. if the measured
value is too high then use negative offset).
In C, default is 0.0.
.IP "\fBNormalization\fR \fImethod\fR" 4
.IX Item "Normalization method"
Optional parameter, default value is 0.
.Sp
Normalization method \- what approximation/model is used to compute the mean sea
level pressure from the air absolute pressure.
.Sp
Supported values of the \f(CW\*(C`method\*(C'\fR (integer between from 0 to 2) are:
.RS 4
.ie n .IP "\fB0\fR \- no conversion, absolute pressure is simply copied over. For this method you do not need to configure ""Altitude"" or ""TemperatureSensor""." 5
.el .IP "\fB0\fR \- no conversion, absolute pressure is simply copied over. For this method you do not need to configure \f(CWAltitude\fR or \f(CWTemperatureSensor\fR." 5
.IX Item "0 - no conversion, absolute pressure is simply copied over. For this method you do not need to configure Altitude or TemperatureSensor."
.PD 0
.ie n .IP "\fB1\fR \- international formula for conversion , See . For this method you have to configure ""Altitude"" but do not need ""TemperatureSensor"" (uses fixed global temperature average instead)." 5
.el .IP "\fB1\fR \- international formula for conversion , See . For this method you have to configure \f(CWAltitude\fR but do not need \f(CWTemperatureSensor\fR (uses fixed global temperature average instead)." 5
.IX Item "1 - international formula for conversion , See . For this method you have to configure Altitude but do not need TemperatureSensor (uses fixed global temperature average instead)."
.ie n .IP "\fB2\fR \- formula as recommended by the Deutsche Wetterdienst (German Meteorological Service). See For this method you have to configure both ""Altitude"" and ""TemperatureSensor""." 5
.el .IP "\fB2\fR \- formula as recommended by the Deutsche Wetterdienst (German Meteorological Service). See For this method you have to configure both \f(CWAltitude\fR and \f(CWTemperatureSensor\fR." 5
.IX Item "2 - formula as recommended by the Deutsche Wetterdienst (German Meteorological Service). See For this method you have to configure both Altitude and TemperatureSensor."
.RE
.RS 4
.RE
.IP "\fBAltitude\fR \fIaltitude\fR" 4
.IX Item "Altitude altitude"
.PD
The altitude (in meters) of the location where you meassure the pressure.
.IP "\fBTemperatureSensor\fR \fIreference\fR" 4
.IX Item "TemperatureSensor reference"
Temperature sensor(s) which should be used as a reference when normalizing the
pressure using \f(CW\*(C`Normalization\*(C'\fR method 2.
When specified more sensors a minimum is found and used each time. The
temperature reading directly from this pressure sensor/plugin is typically not
suitable as the pressure sensor will be probably inside while we want outside
temperature. The collectd reference name is something like
/\-/\-
( is usually omitted when there is just single value type). Or
you can figure it out from the path of the output data files.
.ie n .SS "Plugin ""battery"""
.el .SS "Plugin \f(CWbattery\fP"
.IX Subsection "Plugin battery"
The \fIbattery plugin\fR reports the remaining capacity, power and voltage of
laptop batteries.
.IP "\fBValuesPercentage\fR \fBfalse\fR|\fBtrue\fR" 4
.IX Item "ValuesPercentage false|true"
When enabled, remaining capacity is reported as a percentage, e.g. \*(L"42%
capacity remaining\*(R". Otherwise the capacity is stored as reported by the
battery, most likely in \*(L"Wh\*(R". This option does not work with all input methods,
in particular when only \f(CW\*(C`/proc/pmu\*(C'\fR is available on an old Linux system.
Defaults to \fBfalse\fR.
.IP "\fBReportDegraded\fR \fBfalse\fR|\fBtrue\fR" 4
.IX Item "ReportDegraded false|true"
Typical laptop batteries degrade over time, meaning the capacity decreases with
recharge cycles. The maximum charge of the previous charge cycle is tracked as
\&\*(L"last full capacity\*(R" and used to determine that a battery is \*(L"fully charged\*(R".
.Sp
When this option is set to \fBfalse\fR, the default, the \fIbattery plugin\fR will
only report the remaining capacity. If the \fBValuesPercentage\fR option is
enabled, the relative remaining capacity is calculated as the ratio of the
\&\*(L"remaining capacity\*(R" and the \*(L"last full capacity\*(R". This is what most tools,
such as the status bar of desktop environments, also do.
.Sp
When set to \fBtrue\fR, the battery plugin will report three values: \fBcharged\fR
(remaining capacity), \fBdischarged\fR (difference between \*(L"last full capacity\*(R"
and \*(L"remaining capacity\*(R") and \fBdegraded\fR (difference between \*(L"design capacity\*(R"
and \*(L"last full capacity\*(R").
.IP "\fBQueryStateFS\fR \fBfalse\fR|\fBtrue\fR" 4
.IX Item "QueryStateFS false|true"
When set to \fBtrue\fR, the battery plugin will only read statistics
related to battery performance as exposed by StateFS at
/run/state. StateFS is used in Mer-based Sailfish \s-1OS,\s0 for
example.
.ie n .SS "Plugin ""bind"""
.el .SS "Plugin \f(CWbind\fP"
.IX Subsection "Plugin bind"
Starting with \s-1BIND 9.5.0,\s0 the most widely used \s-1DNS\s0 server software provides
extensive statistics about queries, responses and lots of other information.
The bind plugin retrieves this information that's encoded in \s-1XML\s0 and provided
via \s-1HTTP\s0 and submits the values to collectd.
.PP
To use this plugin, you first need to tell \s-1BIND\s0 to make this information
available. This is done with the \f(CW\*(C`statistics\-channels\*(C'\fR configuration option:
.PP
.Vb 3
\& statistics\-channels {
\& inet localhost port 8053;
\& };
.Ve
.PP
The configuration follows the grouping that can be seen when looking at the
data with an \s-1XSLT\s0 compatible viewer, such as a modern web browser. It's
probably a good idea to make yourself familiar with the provided values, so you
can understand what the collected statistics actually mean.
.PP
Synopsis:
.PP
.Vb 5
\&
\& URL "http://localhost:8053/"
\& ParseTime false
\& OpCodes true
\& QTypes true
\&
\& ServerStats true
\& ZoneMaintStats true
\& ResolverStats false
\& MemoryStats true
\&
\&
\& QTypes true
\& ResolverStats true
\& CacheRRSets true
\&
\& Zone "127.in\-addr.arpa/IN"
\&
\&
.Ve
.PP
The bind plugin accepts the following configuration options:
.IP "\fB\s-1URL\s0\fR \fI\s-1URL\s0\fR" 4
.IX Item "URL URL"
\&\s-1URL\s0 from which to retrieve the \s-1XML\s0 data. If not specified,
\&\f(CW\*(C`http://localhost:8053/\*(C'\fR will be used.
.IP "\fBParseTime\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "ParseTime true|false"
When set to \fBtrue\fR, the time provided by \s-1BIND\s0 will be parsed and used to
dispatch the values. When set to \fBfalse\fR, the local time source is queried.
.Sp
This setting is set to \fBtrue\fR by default for backwards compatibility; setting
this to \fBfalse\fR is \fIrecommended\fR to avoid problems with timezones and
localization.
.IP "\fBOpCodes\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "OpCodes true|false"
When enabled, statistics about the \fI\*(L"OpCodes\*(R"\fR, for example the number of
\&\f(CW\*(C`QUERY\*(C'\fR packets, are collected.
.Sp
Default: Enabled.
.IP "\fBQTypes\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "QTypes true|false"
When enabled, the number of \fIincoming\fR queries by query types (for example
\&\f(CW\*(C`A\*(C'\fR, \f(CW\*(C`MX\*(C'\fR, \f(CW\*(C`AAAA\*(C'\fR) is collected.
.Sp
Default: Enabled.
.IP "\fBServerStats\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "ServerStats true|false"
Collect global server statistics, such as requests received over IPv4 and IPv6,
successful queries, and failed updates.
.Sp
Default: Enabled.
.IP "\fBZoneMaintStats\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "ZoneMaintStats true|false"
Collect zone maintenance statistics, mostly information about notifications
(zone updates) and zone transfers.
.Sp
Default: Enabled.
.IP "\fBResolverStats\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "ResolverStats true|false"
Collect resolver statistics, i.\ e. statistics about outgoing requests
(e.\ g. queries over IPv4, lame servers). Since the global resolver
counters apparently were removed in \s-1BIND 9.5.1\s0 and 9.6.0, this is disabled by
default. Use the \fBResolverStats\fR option within a \fBView \*(L"_default\*(R"\fR block
instead for the same functionality.
.Sp
Default: Disabled.
.IP "\fBMemoryStats\fR" 4
.IX Item "MemoryStats"
Collect global memory statistics.
.Sp
Default: Enabled.
.IP "\fBTimeout\fR \fIMilliseconds\fR" 4
.IX Item "Timeout Milliseconds"
The \fBTimeout\fR option sets the overall timeout for \s-1HTTP\s0 requests to \fB\s-1URL\s0\fR, in
milliseconds. By default, the configured \fBInterval\fR is used to set the
timeout.
.IP "\fBView\fR \fIName\fR" 4
.IX Item "View Name"
Collect statistics about a specific \fI\*(L"view\*(R"\fR. \s-1BIND\s0 can behave different,
mostly depending on the source IP-address of the request. These different
configurations are called \*(L"views\*(R". If you don't use this feature, you most
likely are only interested in the \f(CW\*(C`_default\*(C'\fR view.
.Sp
Within a <\fBView\fR\ \fIname\fR> block, you can specify which
information you want to collect about a view. If no \fBView\fR block is
configured, no detailed view statistics will be collected.
.RS 4
.IP "\fBQTypes\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "QTypes true|false"
If enabled, the number of \fIoutgoing\fR queries by query type (e.\ g. \f(CW\*(C`A\*(C'\fR,
\&\f(CW\*(C`MX\*(C'\fR) is collected.
.Sp
Default: Enabled.
.IP "\fBResolverStats\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "ResolverStats true|false"
Collect resolver statistics, i.\ e. statistics about outgoing requests
(e.\ g. queries over IPv4, lame servers).
.Sp
Default: Enabled.
.IP "\fBCacheRRSets\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "CacheRRSets true|false"
If enabled, the number of entries (\fI\*(L"\s-1RR\s0 sets\*(R"\fR) in the view's cache by query
type is collected. Negative entries (queries which resulted in an error, for
example names that do not exist) are reported with a leading exclamation mark,
e.\ g. \*(L"!A\*(R".
.Sp
Default: Enabled.
.IP "\fBZone\fR \fIName\fR" 4
.IX Item "Zone Name"
When given, collect detailed information about the given zone in the view. The
information collected if very similar to the global \fBServerStats\fR information
(see above).
.Sp
You can repeat this option to collect detailed information about multiple
zones.
.Sp
By default no detailed zone information is collected.
.RE
.RS 4
.RE
.ie n .SS "Plugin ""ceph"""
.el .SS "Plugin \f(CWceph\fP"
.IX Subsection "Plugin ceph"
The ceph plugin collects values from \s-1JSON\s0 data to be parsed by \fBlibyajl\fR
() retrieved from ceph daemon admin sockets.
.PP
A separate \fBDaemon\fR block must be configured for each ceph daemon to be
monitored. The following example will read daemon statistics from four
separate ceph daemons running on the same device (two OSDs, one \s-1MON,\s0 one \s-1MDS\s0) :
.PP
.Vb 10
\&
\& LongRunAvgLatency false
\& ConvertSpecialMetricTypes true
\&
\& SocketPath "/var/run/ceph/ceph\-osd.0.asok"
\&
\&
\& SocketPath "/var/run/ceph/ceph\-osd.1.asok"
\&
\&
\& SocketPath "/var/run/ceph/ceph\-mon.ceph1.asok"
\&
\&
\& SocketPath "/var/run/ceph/ceph\-mds.ceph1.asok"
\&
\&
.Ve
.PP
The ceph plugin accepts the following configuration options:
.IP "\fBLongRunAvgLatency\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "LongRunAvgLatency true|false"
If enabled, latency values(sum,count pairs) are calculated as the long run
average \- average since the ceph daemon was started = (sum / count).
When disabled, latency values are calculated as the average since the last
collection = (sum_now \- sum_last) / (count_now \- count_last).
.Sp
Default: Disabled
.IP "\fBConvertSpecialMetricTypes\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "ConvertSpecialMetricTypes true|false"
If enabled, special metrics (metrics that differ in type from similar counters)
are converted to the type of those similar counters. This currently only
applies to filestore.journal_wr_bytes which is a counter for \s-1OSD\s0 daemons. The
ceph schema reports this metric type as a sum,count pair while similar counters
are treated as derive types. When converted, the sum is used as the counter
value and is treated as a derive type.
When disabled, all metrics are treated as the types received from the ceph schema.
.Sp
Default: Enabled
.PP
Each \fBDaemon\fR block must have a string argument for the plugin instance name.
A \fBSocketPath\fR is also required for each \fBDaemon\fR block:
.IP "\fBDaemon\fR \fIDaemonName\fR" 4
.IX Item "Daemon DaemonName"
Name to be used as the instance name for this daemon.
.IP "\fBSocketPath\fR \fISocketPath\fR" 4
.IX Item "SocketPath SocketPath"
Specifies the path to the \s-1UNIX\s0 admin socket of the ceph daemon.
.ie n .SS "Plugin ""cgroups"""
.el .SS "Plugin \f(CWcgroups\fP"
.IX Subsection "Plugin cgroups"
This plugin collects the \s-1CPU\s0 user/system time for each \fIcgroup\fR by reading the
\&\fIcpuacct.stat\fR files in the first cpuacct-mountpoint (typically
\&\fI/sys/fs/cgroup/cpu.cpuacct\fR on machines using systemd).
.IP "\fBCGroup\fR \fIDirectory\fR" 4
.IX Item "CGroup Directory"
Select \fIcgroup\fR based on the name. Whether only matching \fIcgroups\fR are
collected or if they are ignored is controlled by the \fBIgnoreSelected\fR option;
see below.
.IP "\fBIgnoreSelected\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "IgnoreSelected true|false"
Invert the selection: If set to true, all cgroups \fIexcept\fR the ones that
match any one of the criteria are collected. By default only selected
cgroups are collected if a selection is made. If no selection is configured
at all, \fBall\fR cgroups are selected.
.ie n .SS "Plugin ""chrony"""
.el .SS "Plugin \f(CWchrony\fP"
.IX Subsection "Plugin chrony"
The \f(CW\*(C`chrony\*(C'\fR plugin collects ntp data from a \fBchronyd\fR server, such as clock
skew and per-peer stratum.
.PP
For talking to \fBchronyd\fR, it mimics what the \fBchronyc\fR control program does
on the wire.
.PP
Available configuration options for the \f(CW\*(C`chrony\*(C'\fR plugin:
.IP "\fBHost\fR \fIHostname\fR" 4
.IX Item "Host Hostname"
Hostname of the host running \fBchronyd\fR. Defaults to \fBlocalhost\fR.
.IP "\fBPort\fR \fIPort\fR" 4
.IX Item "Port Port"
UDP-Port to connect to. Defaults to \fB323\fR.
.IP "\fBTimeout\fR \fITimeout\fR" 4
.IX Item "Timeout Timeout"
Connection timeout in seconds. Defaults to \fB2\fR.
.ie n .SS "Plugin ""conntrack"""
.el .SS "Plugin \f(CWconntrack\fP"
.IX Subsection "Plugin conntrack"
This plugin collects \s-1IP\s0 conntrack statistics.
.IP "\fBOldFiles\fR" 4
.IX Item "OldFiles"
Assume the \fBconntrack_count\fR and \fBconntrack_max\fR files to be found in
\&\fI/proc/sys/net/ipv4/netfilter\fR instead of \fI/proc/sys/net/netfilter/\fR.
.ie n .SS "Plugin ""cpu"""
.el .SS "Plugin \f(CWcpu\fP"
.IX Subsection "Plugin cpu"
The \fI\s-1CPU\s0 plugin\fR collects \s-1CPU\s0 usage metrics. By default, \s-1CPU\s0 usage is reported
as Jiffies, using the \f(CW\*(C`cpu\*(C'\fR type. Two aggregations are available:
.IP "\(bu" 4
Sum, per-state, over all CPUs installed in the system; and
.IP "\(bu" 4
Sum, per-CPU, over all non-idle states of a \s-1CPU,\s0 creating an \*(L"active\*(R" state.
.PP
The two aggregations can be combined, leading to \fIcollectd\fR only emitting a
single \*(L"active\*(R" metric for the entire system. As soon as one of these
aggregations (or both) is enabled, the \fIcpu plugin\fR will report a percentage,
rather than Jiffies. In addition, you can request individual, per-state,
per-CPU metrics to be reported as percentage.
.PP
The following configuration options are available:
.IP "\fBReportByState\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "ReportByState true|false"
When set to \fBtrue\fR, the default, reports per-state metrics, e.g. \*(L"system\*(R",
\&\*(L"user\*(R" and \*(L"idle\*(R".
When set to \fBfalse\fR, aggregates (sums) all \fInon-idle\fR states into one
\&\*(L"active\*(R" metric.
.IP "\fBReportByCpu\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "ReportByCpu true|false"
When set to \fBtrue\fR, the default, reports per-CPU (per-core) metrics.
When set to \fBfalse\fR, instead of reporting metrics for individual CPUs, only a
global sum of \s-1CPU\s0 states is emitted.
.IP "\fBValuesPercentage\fR \fBfalse\fR|\fBtrue\fR" 4
.IX Item "ValuesPercentage false|true"
This option is only considered when both, \fBReportByCpu\fR and \fBReportByState\fR
are set to \fBtrue\fR. In this case, by default, metrics will be reported as
Jiffies. By setting this option to \fBtrue\fR, you can request percentage values
in the un-aggregated (per-CPU, per-state) mode as well.
.IP "\fBReportNumCpu\fR \fBfalse\fR|\fBtrue\fR" 4
.IX Item "ReportNumCpu false|true"
When set to \fBtrue\fR, reports the number of available CPUs.
Defaults to \fBfalse\fR.
.ie n .SS "Plugin ""cpufreq"""
.el .SS "Plugin \f(CWcpufreq\fP"
.IX Subsection "Plugin cpufreq"
This plugin doesn't have any options. It reads
\&\fI/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq\fR (for the first \s-1CPU\s0
installed) to get the current \s-1CPU\s0 frequency. If this file does not exist make
sure \fBcpufreqd\fR () or a similar tool is
installed and an \*(L"cpu governor\*(R" (that's a kernel module) is loaded.
.ie n .SS "Plugin ""cpusleep"""
.el .SS "Plugin \f(CWcpusleep\fP"
.IX Subsection "Plugin cpusleep"
This plugin doesn't have any options. It reads \s-1CLOCK_BOOTTIME\s0 and
\&\s-1CLOCK_MONOTONIC\s0 and reports the difference between these clocks. Since
\&\s-1BOOTTIME\s0 clock increments while device is suspended and \s-1MONOTONIC\s0
clock does not, the derivative of the difference between these clocks
gives the relative amount of time the device has spent in suspend
state. The recorded value is in milliseconds of sleep per seconds of
wall clock.
.ie n .SS "Plugin ""csv"""
.el .SS "Plugin \f(CWcsv\fP"
.IX Subsection "Plugin csv"
.IP "\fBDataDir\fR \fIDirectory\fR" 4
.IX Item "DataDir Directory"
Set the directory to store CSV-files under. Per default CSV-files are generated
beneath the daemon's working directory, i.\ e. the \fBBaseDir\fR.
The special strings \fBstdout\fR and \fBstderr\fR can be used to write to the standard
output and standard error channels, respectively. This, of course, only makes
much sense when collectd is running in foreground\- or non-daemon-mode.
.IP "\fBStoreRates\fR \fBtrue|false\fR" 4
.IX Item "StoreRates true|false"
If set to \fBtrue\fR, convert counter values to rates. If set to \fBfalse\fR (the
default) counter values are stored as is, i.\ e. as an increasing integer
number.
.SS "cURL Statistics"
.IX Subsection "cURL Statistics"
All cURL-based plugins support collection of generic, request-based
statistics. These are disabled by default and can be enabled selectively for
each page or \s-1URL\s0 queried from the curl, curl_json, or curl_xml plugins. See
the documentation of those plugins for specific information. This section
describes the available metrics that can be configured for each plugin. All
options are disabled by default.
.PP
See for more details.
.IP "\fBTotalTime\fR \fBtrue|false\fR" 4
.IX Item "TotalTime true|false"
Total time of the transfer, including name resolving, \s-1TCP\s0 connect, etc.
.IP "\fBNamelookupTime\fR \fBtrue|false\fR" 4
.IX Item "NamelookupTime true|false"
Time it took from the start until name resolving was completed.
.IP "\fBConnectTime\fR \fBtrue|false\fR" 4
.IX Item "ConnectTime true|false"
Time it took from the start until the connect to the remote host (or proxy)
was completed.
.IP "\fBAppconnectTime\fR \fBtrue|false\fR" 4
.IX Item "AppconnectTime true|false"
Time it took from the start until the \s-1SSL/SSH\s0 connect/handshake to the remote
host was completed.
.IP "\fBPretransferTime\fR \fBtrue|false\fR" 4
.IX Item "PretransferTime true|false"
Time it took from the start until just before the transfer begins.
.IP "\fBStarttransferTime\fR \fBtrue|false\fR" 4
.IX Item "StarttransferTime true|false"
Time it took from the start until the first byte was received.
.IP "\fBRedirectTime\fR \fBtrue|false\fR" 4
.IX Item "RedirectTime true|false"
Time it took for all redirection steps include name lookup, connect,
pre-transfer and transfer before final transaction was started.
.IP "\fBRedirectCount\fR \fBtrue|false\fR" 4
.IX Item "RedirectCount true|false"
The total number of redirections that were actually followed.
.IP "\fBSizeUpload\fR \fBtrue|false\fR" 4
.IX Item "SizeUpload true|false"
The total amount of bytes that were uploaded.
.IP "\fBSizeDownload\fR \fBtrue|false\fR" 4
.IX Item "SizeDownload true|false"
The total amount of bytes that were downloaded.
.IP "\fBSpeedDownload\fR \fBtrue|false\fR" 4
.IX Item "SpeedDownload true|false"
The average download speed that curl measured for the complete download.
.IP "\fBSpeedUpload\fR \fBtrue|false\fR" 4
.IX Item "SpeedUpload true|false"
The average upload speed that curl measured for the complete upload.
.IP "\fBHeaderSize\fR \fBtrue|false\fR" 4
.IX Item "HeaderSize true|false"
The total size of all the headers received.
.IP "\fBRequestSize\fR \fBtrue|false\fR" 4
.IX Item "RequestSize true|false"
The total size of the issued requests.
.IP "\fBContentLengthDownload\fR \fBtrue|false\fR" 4
.IX Item "ContentLengthDownload true|false"
The content-length of the download.
.IP "\fBContentLengthUpload\fR \fBtrue|false\fR" 4
.IX Item "ContentLengthUpload true|false"
The specified size of the upload.
.IP "\fBNumConnects\fR \fBtrue|false\fR" 4
.IX Item "NumConnects true|false"
The number of new connections that were created to achieve the transfer.
.ie n .SS "Plugin ""curl"""
.el .SS "Plugin \f(CWcurl\fP"
.IX Subsection "Plugin curl"
The curl plugin uses the \fBlibcurl\fR () to read web pages
and the match infrastructure (the same code used by the tail plugin) to use
regular expressions with the received data.
.PP
The following example will read the current value of \s-1AMD\s0 stock from Google's
finance page and dispatch the value to collectd.
.PP
.Vb 11
\&
\&
\& URL "http://finance.google.com/finance?q=NYSE%3AAMD"
\& User "foo"
\& Password "bar"
\& Digest false
\& VerifyPeer true
\& VerifyHost true
\& CACert "/path/to/ca.crt"
\& Header "X\-Custom\-Header: foobar"
\& Post "foo=bar"
\&
\& MeasureResponseTime false
\& MeasureResponseCode false
\&
\&
\& Regex "]*> *([0\-9]*\e\e.[0\-9]+) *"
\& DSType "GaugeAverage"
\& # Note: \`stock_value\*(Aq is not a standard type.
\& Type "stock_value"
\& Instance "AMD"
\&
\&
\&
.Ve
.PP
In the \fBPlugin\fR block, there may be one or more \fBPage\fR blocks, each defining
a web page and one or more \*(L"matches\*(R" to be performed on the returned data. The
string argument to the \fBPage\fR block is used as plugin instance.
.PP
The following options are valid within \fBPage\fR blocks:
.IP "\fB\s-1URL\s0\fR \fI\s-1URL\s0\fR" 4
.IX Item "URL URL"
\&\s-1URL\s0 of the web site to retrieve. Since a regular expression will be used to
extract information from this data, non-binary data is a big plus here ;)
.IP "\fBUser\fR \fIName\fR" 4
.IX Item "User Name"
Username to use if authorization is required to read the page.
.IP "\fBPassword\fR \fIPassword\fR" 4
.IX Item "Password Password"
Password to use if authorization is required to read the page.
.IP "\fBDigest\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "Digest true|false"
Enable \s-1HTTP\s0 digest authentication.
.IP "\fBVerifyPeer\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "VerifyPeer true|false"
Enable or disable peer \s-1SSL\s0 certificate verification. See
for details. Enabled by default.
.IP "\fBVerifyHost\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "VerifyHost true|false"
Enable or disable peer host name verification. If enabled, the plugin checks if
the \f(CW\*(C`Common Name\*(C'\fR or a \f(CW\*(C`Subject Alternate Name\*(C'\fR field of the \s-1SSL\s0 certificate
matches the host name provided by the \fB\s-1URL\s0\fR option. If this identity check
fails, the connection is aborted. Obviously, only works when connecting to a
\&\s-1SSL\s0 enabled server. Enabled by default.
.IP "\fBCACert\fR \fIfile\fR" 4
.IX Item "CACert file"
File that holds one or more \s-1SSL\s0 certificates. If you want to use \s-1HTTPS\s0 you will
possibly need this option. What \s-1CA\s0 certificates come bundled with \f(CW\*(C`libcurl\*(C'\fR
and are checked by default depends on the distribution you use.
.IP "\fBHeader\fR \fIHeader\fR" 4
.IX Item "Header Header"
A \s-1HTTP\s0 header to add to the request. Multiple headers are added if this option
is specified more than once.
.IP "\fBPost\fR \fIBody\fR" 4
.IX Item "Post Body"
Specifies that the \s-1HTTP\s0 operation should be a \s-1POST\s0 instead of a \s-1GET.\s0 The
complete data to be posted is given as the argument. This option will usually
need to be accompanied by a \fBHeader\fR option to set an appropriate
\&\f(CW\*(C`Content\-Type\*(C'\fR for the post body (e.g. to
\&\f(CW\*(C`application/x\-www\-form\-urlencoded\*(C'\fR).
.IP "\fBMeasureResponseTime\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "MeasureResponseTime true|false"
Measure response time for the request. If this setting is enabled, \fBMatch\fR
blocks (see below) are optional. Disabled by default.
.Sp
Beware that requests will get aborted if they take too long to complete. Adjust
\&\fBTimeout\fR accordingly if you expect \fBMeasureResponseTime\fR to report such slow
requests.
.Sp
This option is similar to enabling the \fBTotalTime\fR statistic but it's
measured by collectd instead of cURL.
.IP "\fBMeasureResponseCode\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "MeasureResponseCode true|false"
Measure response code for the request. If this setting is enabled, \fBMatch\fR
blocks (see below) are optional. Disabled by default.
.IP "\fB\fR" 4
.IX Item ""
One \fBStatistics\fR block can be used to specify cURL statistics to be collected
for each request to the remote web site. See the section \*(L"cURL Statistics\*(R"
above for details. If this setting is enabled, \fBMatch\fR blocks (see below) are
optional.
.IP "\fB\fR" 4
.IX Item ""
One or more \fBMatch\fR blocks that define how to match information in the data
returned by \f(CW\*(C`libcurl\*(C'\fR. The \f(CW\*(C`curl\*(C'\fR plugin uses the same infrastructure that's
used by the \f(CW\*(C`tail\*(C'\fR plugin, so please see the documentation of the \f(CW\*(C`tail\*(C'\fR
plugin below on how matches are defined. If the \fBMeasureResponseTime\fR or
\&\fBMeasureResponseCode\fR options are set to \fBtrue\fR, \fBMatch\fR blocks are
optional.
.IP "\fBTimeout\fR \fIMilliseconds\fR" 4
.IX Item "Timeout Milliseconds"
The \fBTimeout\fR option sets the overall timeout for \s-1HTTP\s0 requests to \fB\s-1URL\s0\fR, in
milliseconds. By default, the configured \fBInterval\fR is used to set the
timeout. Prior to version 5.5.0, there was no timeout and requests could hang
indefinitely. This legacy behaviour can be achieved by setting the value of
\&\fBTimeout\fR to 0.
.Sp
If \fBTimeout\fR is 0 or bigger than the \fBInterval\fR, keep in mind that each slow
network connection will stall one read thread. Adjust the \fBReadThreads\fR global
setting accordingly to prevent this from blocking other plugins.
.ie n .SS "Plugin ""curl_json"""
.el .SS "Plugin \f(CWcurl_json\fP"
.IX Subsection "Plugin curl_json"
The \fBcurl_json plugin\fR collects values from \s-1JSON\s0 data to be parsed by
\&\fBlibyajl\fR () retrieved via
either \fBlibcurl\fR () or read directly from a
unix socket. The former can be used, for example, to collect values
from CouchDB documents (which are stored \s-1JSON\s0 notation), and the
latter to collect values from a uWSGI stats socket.
.PP
The following example will collect several values from the built-in
\&\f(CW\*(C`_stats\*(C'\fR runtime statistics module of \fICouchDB\fR
().
.PP
.Vb 6
\&
\&
\& Instance "httpd"
\&
\& Type "http_requests"
\&
\&
\&
\& Type "http_request_methods"
\&
\&
\&
\& Type "http_response_codes"
\&
\&
\&
.Ve
.PP
This example will collect data directly from a \fIuWSGI\fR \*(L"Stats Server\*(R" socket.
.PP
.Vb 6
\&
\&
\& Instance "uwsgi"
\&
\& Type "http_requests"
\&
\&
\&
\& Type "http_requests"
\&
\&
\&
.Ve
.PP
In the \fBPlugin\fR block, there may be one or more \fB\s-1URL\s0\fR blocks, each
defining a \s-1URL\s0 to be fetched via \s-1HTTP \s0(using libcurl) or \fBSock\fR
blocks defining a unix socket to read \s-1JSON\s0 from directly. Each of
these blocks may have one or more \fBKey\fR blocks.
.PP
The \fBKey\fR string argument must be in a path format. Each component is
used to match the key from a \s-1JSON\s0 map or the index of an \s-1JSON\s0
array. If a path component of a \fBKey\fR is a \fI*\fR\ wildcard, the
values for all map keys or array indices will be collectd.
.PP
The following options are valid within \fB\s-1URL\s0\fR blocks:
.IP "\fBHost\fR \fIName\fR" 4
.IX Item "Host Name"
Use \fIName\fR as the host name when submitting values. Defaults to the global
host name setting.
.IP "\fBInstance\fR \fIInstance\fR" 4
.IX Item "Instance Instance"
Sets the plugin instance to \fIInstance\fR.
.IP "\fBInterval\fR \fIInterval\fR" 4
.IX Item "Interval Interval"
Sets the interval (in seconds) in which the values will be collected from this
\&\s-1URL.\s0 By default the global \fBInterval\fR setting will be used.
.IP "\fBUser\fR \fIName\fR" 4
.IX Item "User Name"
.PD 0
.IP "\fBPassword\fR \fIPassword\fR" 4
.IX Item "Password Password"
.IP "\fBDigest\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "Digest true|false"
.IP "\fBVerifyPeer\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "VerifyPeer true|false"
.IP "\fBVerifyHost\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "VerifyHost true|false"
.IP "\fBCACert\fR \fIfile\fR" 4
.IX Item "CACert file"
.IP "\fBHeader\fR \fIHeader\fR" 4
.IX Item "Header Header"
.IP "\fBPost\fR \fIBody\fR" 4
.IX Item "Post Body"
.IP "\fBTimeout\fR \fIMilliseconds\fR" 4
.IX Item "Timeout Milliseconds"
.PD
These options behave exactly equivalent to the appropriate options of the
\&\fIcURL\fR plugin. Please see there for a detailed description.
.IP "\fB\fR" 4
.IX Item ""
One \fBStatistics\fR block can be used to specify cURL statistics to be collected
for each request to the remote \s-1URL.\s0 See the section \*(L"cURL Statistics\*(R" above
for details.
.PP
The following options are valid within \fBKey\fR blocks:
.IP "\fBType\fR \fIType\fR" 4
.IX Item "Type Type"
Sets the type used to dispatch the values to the daemon. Detailed information
about types and their configuration can be found in \fItypes.db\fR\|(5). This
option is mandatory.
.IP "\fBInstance\fR \fIInstance\fR" 4
.IX Item "Instance Instance"
Type-instance to use. Defaults to the current map key or current string array element value.
.ie n .SS "Plugin ""curl_xml"""
.el .SS "Plugin \f(CWcurl_xml\fP"
.IX Subsection "Plugin curl_xml"
The \fBcurl_xml plugin\fR uses \fBlibcurl\fR () and \fBlibxml2\fR
() to retrieve \s-1XML\s0 data via cURL.
.PP
.Vb 11
\&
\&
\& Host "my_host"
\& Instance "some_instance"
\& User "collectd"
\& Password "thaiNg0I"
\& VerifyPeer true
\& VerifyHost true
\& CACert "/path/to/ca.crt"
\& Header "X\-Custom\-Header: foobar"
\& Post "foo=bar"
\&
\&
\& Type "magic_level"
\& #InstancePrefix "prefix\-"
\& InstanceFrom "td[1]"
\& ValuesFrom "td[2]/span[@class=\e"level\e"]"
\&
\&
\&
.Ve
.PP
In the \fBPlugin\fR block, there may be one or more \fB\s-1URL\s0\fR blocks, each defining a
\&\s-1URL\s0 to be fetched using libcurl. Within each \fB\s-1URL\s0\fR block there are
options which specify the connection parameters, for example authentication
information, and one or more \fBXPath\fR blocks.
.PP
Each \fBXPath\fR block specifies how to get one type of information. The
string argument must be a valid XPath expression which returns a list
of \*(L"base elements\*(R". One value is dispatched for each \*(L"base element\*(R". The
\&\fItype instance\fR and values are looked up using further \fIXPath\fR expressions
that should be relative to the base element.
.PP
Within the \fB\s-1URL\s0\fR block the following options are accepted:
.IP "\fBHost\fR \fIName\fR" 4
.IX Item "Host Name"
Use \fIName\fR as the host name when submitting values. Defaults to the global
host name setting.
.IP "\fBInstance\fR \fIInstance\fR" 4
.IX Item "Instance Instance"
Use \fIInstance\fR as the plugin instance when submitting values. Defaults to an
empty string (no plugin instance).
.IP "\fBNamespace\fR \fIPrefix\fR \fI\s-1URL\s0\fR" 4
.IX Item "Namespace Prefix URL"
If an XPath expression references namespaces, they must be specified
with this option. \fIPrefix\fR is the \*(L"namespace prefix\*(R" used in the \s-1XML\s0 document.
\&\fI\s-1URL\s0\fR is the \*(L"namespace name\*(R", an \s-1URI\s0 reference uniquely identifying the
namespace. The option can be repeated to register multiple namespaces.
.Sp
Examples:
.Sp
.Vb 2
\& Namespace "s" "http://schemas.xmlsoap.org/soap/envelope/"
\& Namespace "m" "http://www.w3.org/1998/Math/MathML"
.Ve
.IP "\fBUser\fR \fIUser\fR" 4
.IX Item "User User"
.PD 0
.IP "\fBPassword\fR \fIPassword\fR" 4
.IX Item "Password Password"
.IP "\fBDigest\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "Digest true|false"
.IP "\fBVerifyPeer\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "VerifyPeer true|false"
.IP "\fBVerifyHost\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "VerifyHost true|false"
.IP "\fBCACert\fR \fI\s-1CA\s0 Cert File\fR" 4
.IX Item "CACert CA Cert File"
.IP "\fBHeader\fR \fIHeader\fR" 4
.IX Item "Header Header"
.IP "\fBPost\fR \fIBody\fR" 4
.IX Item "Post Body"
.IP "\fBTimeout\fR \fIMilliseconds\fR" 4
.IX Item "Timeout Milliseconds"
.PD
These options behave exactly equivalent to the appropriate options of the
\&\fIcURL plugin\fR. Please see there for a detailed description.
.IP "\fB\fR" 4
.IX Item ""
One \fBStatistics\fR block can be used to specify cURL statistics to be collected
for each request to the remote \s-1URL.\s0 See the section \*(L"cURL Statistics\*(R" above
for details.
.IP "<\fBXPath\fR \fIXPath-expression\fR>" 4
.IX Item ""
Within each \fB\s-1URL\s0\fR block, there must be one or more \fBXPath\fR blocks. Each
\&\fBXPath\fR block specifies how to get one type of information. The string
argument must be a valid XPath expression which returns a list of \*(L"base
elements\*(R". One value is dispatched for each \*(L"base element\*(R".
.Sp
Within the \fBXPath\fR block the following options are accepted:
.RS 4
.IP "\fBType\fR \fIType\fR" 4
.IX Item "Type Type"
Specifies the \fIType\fR used for submitting patches. This determines the number
of values that are required / expected and whether the strings are parsed as
signed or unsigned integer or as double values. See \fItypes.db\fR\|(5) for details.
This option is required.
.IP "\fBInstancePrefix\fR \fIInstancePrefix\fR" 4
.IX Item "InstancePrefix InstancePrefix"
Prefix the \fItype instance\fR with \fIInstancePrefix\fR. The values are simply
concatenated together without any separator.
This option is optional.
.IP "\fBInstanceFrom\fR \fIInstanceFrom\fR" 4
.IX Item "InstanceFrom InstanceFrom"
Specifies a XPath expression to use for determining the \fItype instance\fR. The
XPath expression must return exactly one element. The element's value is then
used as \fItype instance\fR, possibly prefixed with \fIInstancePrefix\fR (see above).
.Sp
This value is required. As a special exception, if the \*(L"base XPath expression\*(R"
(the argument to the \fBXPath\fR block) returns exactly one argument, then this
option may be omitted.
.IP "\fBValuesFrom\fR \fIValuesFrom\fR [\fIValuesFrom\fR ...]" 4
.IX Item "ValuesFrom ValuesFrom [ValuesFrom ...]"
Specifies one or more XPath expression to use for reading the values. The
number of XPath expressions must match the number of data sources in the
\&\fItype\fR specified with \fBType\fR (see above). Each XPath expression must return
exactly one element. The element's value is then parsed as a number and used as
value for the appropriate value in the value list dispatched to the daemon.
.RE
.RS 4
.RE
.ie n .SS "Plugin ""dbi"""
.el .SS "Plugin \f(CWdbi\fP"
.IX Subsection "Plugin dbi"
This plugin uses the \fBdbi\fR library () to
connect to various databases, execute \fI\s-1SQL\s0\fR statements and read back the
results. \fIdbi\fR is an acronym for \*(L"database interface\*(R" in case you were
wondering about the name. You can configure how each column is to be
interpreted and the plugin will generate one or more data sets from each row
returned according to these rules.
.PP
Because the plugin is very generic, the configuration is a little more complex
than those of other plugins. It usually looks something like this:
.PP
.Vb 10
\&
\&
\& Statement "SELECT category, COUNT(*) AS value FROM products WHERE in_stock = 0 GROUP BY category"
\& # Use with MySQL 5.0.0 or later
\& MinVersion 50000
\&
\& Type "gauge"
\& InstancePrefix "out_of_stock"
\& InstancesFrom "category"
\& ValuesFrom "value"
\&
\&
\&
\& Driver "mysql"
\& Interval 120
\& DriverOption "host" "localhost"
\& DriverOption "username" "collectd"
\& DriverOption "password" "aZo6daiw"
\& DriverOption "dbname" "prod_info"
\& SelectDB "prod_info"
\& Query "out_of_stock"
\&
\&
.Ve
.PP
The configuration above defines one query with one result and one database. The
query is then linked to the database with the \fBQuery\fR option \fIwithin\fR the
\&\fB\fR block. You can have any number of queries and databases
and you can also use the \fBInclude\fR statement to split up the configuration
file in multiple, smaller files. However, the \fB\fR block \fImust\fR
precede the \fB\fR blocks, because the file is interpreted from
top to bottom!
.PP
The following is a complete list of options:
.PP
\fI\f(BIQuery\fI blocks\fR
.IX Subsection "Query blocks"
.PP
Query blocks define \fI\s-1SQL\s0\fR statements and how the returned data should be
interpreted. They are identified by the name that is given in the opening line
of the block. Thus the name needs to be unique. Other than that, the name is
not used in collectd.
.PP
In each \fBQuery\fR block, there is one or more \fBResult\fR blocks. \fBResult\fR blocks
define which column holds which value or instance information. You can use
multiple \fBResult\fR blocks to create multiple values from one returned row. This
is especially useful, when queries take a long time and sending almost the same
query again and again is not desirable.
.PP
Example:
.PP
.Vb 10
\&
\& Statement "select station, temperature, humidity from environment"
\&
\& Type "temperature"
\& # InstancePrefix "foo"
\& InstancesFrom "station"
\& ValuesFrom "temperature"
\&
\&
\& Type "humidity"
\& InstancesFrom "station"
\& ValuesFrom "humidity"
\&
\&
.Ve
.PP
The following options are accepted:
.IP "\fBStatement\fR \fI\s-1SQL\s0\fR" 4
.IX Item "Statement SQL"
Sets the statement that should be executed on the server. This is \fBnot\fR
interpreted by collectd, but simply passed to the database server. Therefore,
the \s-1SQL\s0 dialect that's used depends on the server collectd is connected to.
.Sp
The query has to return at least two columns, one for the instance and one
value. You cannot omit the instance, even if the statement is guaranteed to
always return exactly one line. In that case, you can usually specify something
like this:
.Sp
.Vb 1
\& Statement "SELECT \e"instance\e", COUNT(*) AS value FROM table"
.Ve
.Sp
(That works with MySQL but may not be valid \s-1SQL\s0 according to the spec. If you
use a more strict database server, you may have to select from a dummy table or
something.)
.Sp
Please note that some databases, for example \fBOracle\fR, will fail if you
include a semicolon at the end of the statement.
.IP "\fBMinVersion\fR \fIVersion\fR" 4
.IX Item "MinVersion Version"
.PD 0
.IP "\fBMaxVersion\fR \fIValue\fR" 4
.IX Item "MaxVersion Value"
.PD
Only use this query for the specified database version. You can use these
options to provide multiple queries with the same name but with a slightly
different syntax. The plugin will use only those queries, where the specified
minimum and maximum versions fit the version of the database in use.
.Sp
The database version is determined by \f(CW\*(C`dbi_conn_get_engine_version\*(C'\fR, see the
libdbi documentation
for details. Basically, each part of the version is assumed to be in the range
from \fB00\fR to \fB99\fR and all dots are removed. So version \*(L"4.1.2\*(R" becomes
\&\*(L"40102\*(R", version \*(L"5.0.42\*(R" becomes \*(L"50042\*(R".
.Sp
\&\fBWarning:\fR The plugin will use \fBall\fR matching queries, so if you specify
multiple queries with the same name and \fBoverlapping\fR ranges, weird stuff will
happen. Don't to it! A valid example would be something along these lines:
.Sp
.Vb 8
\& MinVersion 40000
\& MaxVersion 49999
\& ...
\& MinVersion 50000
\& MaxVersion 50099
\& ...
\& MinVersion 50100
\& # No maximum
.Ve
.Sp
In the above example, there are three ranges that don't overlap. The last one
goes from version \*(L"5.1.0\*(R" to infinity, meaning \*(L"all later versions\*(R". Versions
before \*(L"4.0.0\*(R" are not specified.
.IP "\fBType\fR \fIType\fR" 4
.IX Item "Type Type"
The \fBtype\fR that's used for each line returned. See \fItypes.db\fR\|(5) for more
details on how types are defined. In short: A type is a predefined layout of
data and the number of values and type of values has to match the type
definition.
.Sp
If you specify \*(L"temperature\*(R" here, you need exactly one gauge column. If you
specify \*(L"if_octets\*(R", you will need two counter columns. See the \fBValuesFrom\fR
setting below.
.Sp
There must be exactly one \fBType\fR option inside each \fBResult\fR block.
.IP "\fBInstancePrefix\fR \fIprefix\fR" 4
.IX Item "InstancePrefix prefix"
Prepends \fIprefix\fR to the type instance. If \fBInstancesFrom\fR (see below) is not
given, the string is simply copied. If \fBInstancesFrom\fR is given, \fIprefix\fR and
all strings returned in the appropriate columns are concatenated together,
separated by dashes \fI(\*(L"\-\*(R")\fR.
.IP "\fBInstancesFrom\fR \fIcolumn0\fR [\fIcolumn1\fR ...]" 4
.IX Item "InstancesFrom column0 [column1 ...]"
Specifies the columns whose values will be used to create the \*(L"type-instance\*(R"
for each row. If you specify more than one column, the value of all columns
will be joined together with dashes \fI(\*(L"\-\*(R")\fR as separation characters.
.Sp
The plugin itself does not check whether or not all built instances are
different. It's your responsibility to assure that each is unique. This is
especially true, if you do not specify \fBInstancesFrom\fR: \fBYou\fR have to make
sure that only one row is returned in this case.
.Sp
If neither \fBInstancePrefix\fR nor \fBInstancesFrom\fR is given, the type-instance
will be empty.
.IP "\fBValuesFrom\fR \fIcolumn0\fR [\fIcolumn1\fR ...]" 4
.IX Item "ValuesFrom column0 [column1 ...]"
Names the columns whose content is used as the actual data for the data sets
that are dispatched to the daemon. How many such columns you need is determined
by the \fBType\fR setting above. If you specify too many or not enough columns,
the plugin will complain about that and no data will be submitted to the
daemon.
.Sp
The actual data type in the columns is not that important. The plugin will
automatically cast the values to the right type if it know how to do that. So
it should be able to handle integer an floating point types, as well as strings
(if they include a number at the beginning).
.Sp
There must be at least one \fBValuesFrom\fR option inside each \fBResult\fR block.
.IP "\fBMetadataFrom\fR [\fIcolumn0\fR \fIcolumn1\fR ...]" 4
.IX Item "MetadataFrom [column0 column1 ...]"
Names the columns whose content is used as metadata for the data sets
that are dispatched to the daemon.
.Sp
The actual data type in the columns is not that important. The plugin will
automatically cast the values to the right type if it know how to do that. So
it should be able to handle integer an floating point types, as well as strings
(if they include a number at the beginning).
.PP
\fI\f(BIDatabase\fI blocks\fR
.IX Subsection "Database blocks"
.PP
Database blocks define a connection to a database and which queries should be
sent to that database. Since the used \*(L"dbi\*(R" library can handle a wide variety
of databases, the configuration is very generic. If in doubt, refer to libdbi's
documentation\ \- we stick as close to the terminology used there.
.PP
Each database needs a \*(L"name\*(R" as string argument in the starting tag of the
block. This name will be used as \*(L"PluginInstance\*(R" in the values submitted to
the daemon. Other than that, that name is not used.
.IP "\fBInterval\fR \fIInterval\fR" 4
.IX Item "Interval Interval"
Sets the interval (in seconds) in which the values will be collected from this
database. By default the global \fBInterval\fR setting will be used.
.IP "\fBDriver\fR \fIDriver\fR" 4
.IX Item "Driver Driver"
Specifies the driver to use to connect to the database. In many cases those
drivers are named after the database they can connect to, but this is not a
technical necessity. These drivers are sometimes referred to as \*(L"\s-1DBD\*(R",
\&\s0\fBD\fRata\fBB\fRase \fBD\fRriver, and some distributions ship them in separate
packages. Drivers for the \*(L"dbi\*(R" library are developed by the \fBlibdbi-drivers\fR
project at .
.Sp
You need to give the driver name as expected by the \*(L"dbi\*(R" library here. You
should be able to find that in the documentation for each driver. If you
mistype the driver name, the plugin will dump a list of all known driver names
to the log.
.IP "\fBDriverOption\fR \fIKey\fR \fIValue\fR" 4
.IX Item "DriverOption Key Value"
Sets driver-specific options. What option a driver supports can be found in the
documentation for each driver, somewhere at
. However, the options \*(L"host\*(R",
\&\*(L"username\*(R", \*(L"password\*(R", and \*(L"dbname\*(R" seem to be de\ facto standards.
.Sp
DBDs can register two types of options: String options and numeric options. The
plugin will use the \f(CW\*(C`dbi_conn_set_option\*(C'\fR function when the configuration
provides a string and the \f(CW\*(C`dbi_conn_require_option_numeric\*(C'\fR function when the
configuration provides a number. So these two lines will actually result in
different calls being used:
.Sp
.Vb 2
\& DriverOption "Port" 1234 # numeric
\& DriverOption "Port" "1234" # string
.Ve
.Sp
Unfortunately, drivers are not too keen to report errors when an unknown option
is passed to them, so invalid settings here may go unnoticed. This is not the
plugin's fault, it will report errors if it gets them from the library\ /
the driver. If a driver complains about an option, the plugin will dump a
complete list of all options understood by that driver to the log. There is no
way to programmatically find out if an option expects a string or a numeric
argument, so you will have to refer to the appropriate \s-1DBD\s0's documentation to
find this out. Sorry.
.IP "\fBSelectDB\fR \fIDatabase\fR" 4
.IX Item "SelectDB Database"
In some cases, the database name you connect with is not the database name you
want to use for querying data. If this option is set, the plugin will \*(L"select\*(R"
(switch to) that database after the connection is established.
.IP "\fBQuery\fR \fIQueryName\fR" 4
.IX Item "Query QueryName"
Associates the query named \fIQueryName\fR with this database connection. The
query needs to be defined \fIbefore\fR this statement, i.\ e. all query
blocks you want to refer to must be placed above the database block you want to
refer to them from.
.IP "\fBHost\fR \fIHostname\fR" 4
.IX Item "Host Hostname"
Sets the \fBhost\fR field of \fIvalue lists\fR to \fIHostname\fR when dispatching
values. Defaults to the global hostname setting.
.ie n .SS "Plugin ""df"""
.el .SS "Plugin \f(CWdf\fP"
.IX Subsection "Plugin df"
.IP "\fBDevice\fR \fIDevice\fR" 4
.IX Item "Device Device"
Select partitions based on the devicename.
.IP "\fBMountPoint\fR \fIDirectory\fR" 4
.IX Item "MountPoint Directory"
Select partitions based on the mountpoint.
.IP "\fBFSType\fR \fIFSType\fR" 4
.IX Item "FSType FSType"
Select partitions based on the filesystem type.
.IP "\fBIgnoreSelected\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "IgnoreSelected true|false"
Invert the selection: If set to true, all partitions \fBexcept\fR the ones that
match any one of the criteria are collected. By default only selected
partitions are collected if a selection is made. If no selection is configured
at all, \fBall\fR partitions are selected.
.IP "\fBReportByDevice\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "ReportByDevice true|false"
Report using the device name rather than the mountpoint. i.e. with this \fIfalse\fR,
(the default), it will report a disk as \*(L"root\*(R", but with it \fItrue\fR, it will be
\&\*(L"sda1\*(R" (or whichever).
.IP "\fBReportInodes\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "ReportInodes true|false"
Enables or disables reporting of free, reserved and used inodes. Defaults to
inode collection being disabled.
.Sp
Enable this option if inodes are a scarce resource for you, usually because
many small files are stored on the disk. This is a usual scenario for mail
transfer agents and web caches.
.IP "\fBValuesAbsolute\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "ValuesAbsolute true|false"
Enables or disables reporting of free and used disk space in 1K\-blocks.
Defaults to \fBtrue\fR.
.IP "\fBValuesPercentage\fR \fBfalse\fR|\fBtrue\fR" 4
.IX Item "ValuesPercentage false|true"
Enables or disables reporting of free and used disk space in percentage.
Defaults to \fBfalse\fR.
.Sp
This is useful for deploying \fIcollectd\fR on the cloud, where machines with
different disk size may exist. Then it is more practical to configure
thresholds based on relative disk size.
.ie n .SS "Plugin ""disk"""
.el .SS "Plugin \f(CWdisk\fP"
.IX Subsection "Plugin disk"
The \f(CW\*(C`disk\*(C'\fR plugin collects information about the usage of physical disks and
logical disks (partitions). Values collected are the number of octets written
to and read from a disk or partition, the number of read/write operations
issued to the disk and a rather complex \*(L"time\*(R" it took for these commands to be
issued.
.PP
Using the following two options you can ignore some disks or configure the
collection only of specific disks.
.IP "\fBDisk\fR \fIName\fR" 4
.IX Item "Disk Name"
Select the disk \fIName\fR. Whether it is collected or ignored depends on the
\&\fBIgnoreSelected\fR setting, see below. As with other plugins that use the
daemon's ignorelist functionality, a string that starts and ends with a slash
is interpreted as a regular expression. Examples:
.Sp
.Vb 2
\& Disk "sdd"
\& Disk "/hda[34]/"
.Ve
.IP "\fBIgnoreSelected\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "IgnoreSelected true|false"
Sets whether selected disks, i.\ e. the ones matches by any of the \fBDisk\fR
statements, are ignored or if all other disks are ignored. The behavior
(hopefully) is intuitive: If no \fBDisk\fR option is configured, all disks are
collected. If at least one \fBDisk\fR option is given and no \fBIgnoreSelected\fR or
set to \fBfalse\fR, \fBonly\fR matching disks will be collected. If \fBIgnoreSelected\fR
is set to \fBtrue\fR, all disks are collected \fBexcept\fR the ones matched.
.IP "\fBUseBSDName\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "UseBSDName true|false"
Whether to use the device's \*(L"\s-1BSD\s0 Name\*(R", on Mac\ \s-1OS\s0\ X, instead of the
default major/minor numbers. Requires collectd to be built with Apple's
IOKitLib support.
.IP "\fBUdevNameAttr\fR \fIAttribute\fR" 4
.IX Item "UdevNameAttr Attribute"
Attempt to override disk instance name with the value of a specified udev
attribute when built with \fBlibudev\fR. If the attribute is not defined for the
given device, the default name is used. Example:
.Sp
.Vb 1
\& UdevNameAttr "DM_NAME"
.Ve
.ie n .SS "Plugin ""dns"""
.el .SS "Plugin \f(CWdns\fP"
.IX Subsection "Plugin dns"
.IP "\fBInterface\fR \fIInterface\fR" 4
.IX Item "Interface Interface"
The dns plugin uses \fBlibpcap\fR to capture dns traffic and analyzes it. This
option sets the interface that should be used. If this option is not set, or
set to \*(L"any\*(R", the plugin will try to get packets from \fBall\fR interfaces. This
may not work on certain platforms, such as Mac\ \s-1OS\s0\ X.
.IP "\fBIgnoreSource\fR \fIIP-address\fR" 4
.IX Item "IgnoreSource IP-address"
Ignore packets that originate from this address.
.IP "\fBSelectNumericQueryTypes\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "SelectNumericQueryTypes true|false"
Enabled by default, collects unknown (and thus presented as numeric only) query types.
.ie n .SS "Plugin ""dpdkstat"""
.el .SS "Plugin \f(CWdpdkstat\fP"
.IX Subsection "Plugin dpdkstat"
The \fIdpdkstat plugin\fR collects information about \s-1DPDK\s0 interfaces using the
extended \s-1NIC\s0 stats \s-1API\s0 in \s-1DPDK.\s0
.PP
\&\fBSynopsis:\fR
.PP
.Vb 9
\&
\& Coremask "0x4"
\& MemoryChannels "4"
\& ProcessType "secondary"
\& FilePrefix "rte"
\& EnabledPortMask 0xffff
\& PortName "interface1"
\& PortName "interface2"
\&
.Ve
.PP
\&\fBOptions:\fR
.IP "\fBCoremask\fR \fIMask\fR" 4
.IX Item "Coremask Mask"
A string containing an hexadecimal bit mask of the cores to run on. Note that
core numbering can change between platforms and should be determined beforehand.
.IP "\fBMemorychannels\fR \fIChannels\fR" 4
.IX Item "Memorychannels Channels"
A string containing a number of memory channels per processor socket.
.IP "\fBProcessType\fR \fItype\fR" 4
.IX Item "ProcessType type"
A string containing the type of \s-1DPDK\s0 process instance.
.IP "\fBFilePrefix\fR \fIFile\fR" 4
.IX Item "FilePrefix File"
The prefix text used for hugepage filenames. The filename will be set to
/var/run/._config where prefix is what is passed in by the user.
.IP "\fBSocketMemory\fR \fI\s-1MB\s0\fR" 4
.IX Item "SocketMemory MB"
A string containing amount of Memory to allocate from hugepages on specific
sockets in \s-1MB\s0
.IP "\fBEnabledPortMask\fR \fIMask\fR" 4
.IX Item "EnabledPortMask Mask"
A hexidecimal bit mask of the \s-1DPDK\s0 ports which should be enabled. A mask
of 0x0 means that all ports will be disabled. A bitmask of all Fs means
that all ports will be enabled. This is an optional argument \- default
is all ports enabled.
.IP "\fBPortName\fR \fIName\fR" 4
.IX Item "PortName Name"
A string containing an optional name for the enabled \s-1DPDK\s0 ports. Each PortName
option should contain only one port name; specify as many PortName options as
desired. Default naming convention will be used if PortName is blank. If there
are less PortName options than there are enabled ports, the default naming
convention will be used for the additional ports.
.ie n .SS "Plugin ""email"""
.el .SS "Plugin \f(CWemail\fP"
.IX Subsection "Plugin email"
.IP "\fBSocketFile\fR \fIPath\fR" 4
.IX Item "SocketFile Path"
Sets the socket-file which is to be created.
.IP "\fBSocketGroup\fR \fIGroup\fR" 4
.IX Item "SocketGroup Group"
If running as root change the group of the UNIX-socket after it has been
created. Defaults to \fBcollectd\fR.
.IP "\fBSocketPerms\fR \fIPermissions\fR" 4
.IX Item "SocketPerms Permissions"
Change the file permissions of the UNIX-socket after it has been created. The
permissions must be given as a numeric, octal value as you would pass to
\&\fIchmod\fR\|(1). Defaults to \fB0770\fR.
.IP "\fBMaxConns\fR \fINumber\fR" 4
.IX Item "MaxConns Number"
Sets the maximum number of connections that can be handled in parallel. Since
this many threads will be started immediately setting this to a very high
value will waste valuable resources. Defaults to \fB5\fR and will be forced to be
at most \fB16384\fR to prevent typos and dumb mistakes.
.ie n .SS "Plugin ""ethstat"""
.el .SS "Plugin \f(CWethstat\fP"
.IX Subsection "Plugin ethstat"
The \fIethstat plugin\fR collects information about network interface cards (NICs)
by talking directly with the underlying kernel driver using \fIioctl\fR\|(2).
.PP
\&\fBSynopsis:\fR
.PP
.Vb 5
\&
\& Interface "eth0"
\& Map "rx_csum_offload_errors" "if_rx_errors" "checksum_offload"
\& Map "multicast" "if_multicast"
\&
.Ve
.PP
\&\fBOptions:\fR
.IP "\fBInterface\fR \fIName\fR" 4
.IX Item "Interface Name"
Collect statistical information about interface \fIName\fR.
.IP "\fBMap\fR \fIName\fR \fIType\fR [\fITypeInstance\fR]" 4
.IX Item "Map Name Type [TypeInstance]"
By default, the plugin will submit values as type \f(CW\*(C`derive\*(C'\fR and \fItype
instance\fR set to \fIName\fR, the name of the metric as reported by the driver. If
an appropriate \fBMap\fR option exists, the given \fIType\fR and, optionally,
\&\fITypeInstance\fR will be used.
.IP "\fBMappedOnly\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "MappedOnly true|false"
When set to \fBtrue\fR, only metrics that can be mapped to a \fItype\fR will be
collected, all other metrics will be ignored. Defaults to \fBfalse\fR.
.ie n .SS "Plugin ""exec"""
.el .SS "Plugin \f(CWexec\fP"
.IX Subsection "Plugin exec"
Please make sure to read \fIcollectd\-exec\fR\|(5) before using this plugin. It
contains valuable information on when the executable is executed and the
output that is expected from it.
.IP "\fBExec\fR \fIUser\fR[:[\fIGroup\fR]] \fIExecutable\fR [\fI\fR [\fI\fR ...]]" 4
.IX Item "Exec User[:[Group]] Executable [ [ ...]]"
.PD 0
.IP "\fBNotificationExec\fR \fIUser\fR[:[\fIGroup\fR]] \fIExecutable\fR [\fI\fR [\fI\fR ...]]" 4
.IX Item "NotificationExec User[:[Group]] Executable [ [ ...]]"
.PD
Execute the executable \fIExecutable\fR as user \fIUser\fR. If the user name is
followed by a colon and a group name, the effective group is set to that group.
The real group and saved-set group will be set to the default group of that
user. If no group is given the effective group \s-1ID\s0 will be the same as the real
group \s-1ID.\s0
.Sp
Please note that in order to change the user and/or group the daemon needs
superuser privileges. If the daemon is run as an unprivileged user you must
specify the same user/group here. If the daemon is run with superuser
privileges, you must supply a non-root user here.
.Sp
The executable may be followed by optional arguments that are passed to the
program. Please note that due to the configuration parsing numbers and boolean
values may be changed. If you want to be absolutely sure that something is
passed as-is please enclose it in quotes.
.Sp
The \fBExec\fR and \fBNotificationExec\fR statements change the semantics of the
programs executed, i.\ e. the data passed to them and the response
expected from them. This is documented in great detail in \fIcollectd\-exec\fR\|(5).
.ie n .SS "Plugin ""fhcount"""
.el .SS "Plugin \f(CWfhcount\fP"
.IX Subsection "Plugin fhcount"
The \f(CW\*(C`fhcount\*(C'\fR plugin provides statistics about used, unused and total number of
file handles on Linux.
.PP
The \fIfhcount plugin\fR provides the following configuration options:
.IP "\fBValuesAbsolute\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "ValuesAbsolute true|false"
Enables or disables reporting of file handles usage in absolute numbers,
e.g. file handles used. Defaults to \fBtrue\fR.
.IP "\fBValuesPercentage\fR \fBfalse\fR|\fBtrue\fR" 4
.IX Item "ValuesPercentage false|true"
Enables or disables reporting of file handles usage in percentages, e.g.
percent of file handles used. Defaults to \fBfalse\fR.
.ie n .SS "Plugin ""filecount"""
.el .SS "Plugin \f(CWfilecount\fP"
.IX Subsection "Plugin filecount"
The \f(CW\*(C`filecount\*(C'\fR plugin counts the number of files in a certain directory (and
its subdirectories) and their combined size. The configuration is very straight
forward:
.PP
.Vb 12
\&
\&
\& Instance "qmail\-message"
\&
\&
\& Instance "qmail\-todo"
\&
\&
\& Instance "php5\-sessions"
\& Name "sess_*"
\&
\&
.Ve
.PP
The example above counts the number of files in QMail's queue directories and
the number of \s-1PHP5\s0 sessions. Jfiy: The \*(L"todo\*(R" queue holds the messages that
QMail has not yet looked at, the \*(L"message\*(R" queue holds the messages that were
classified into \*(L"local\*(R" and \*(L"remote\*(R".
.PP
As you can see, the configuration consists of one or more \f(CW\*(C`Directory\*(C'\fR blocks,
each of which specifies a directory in which to count the files. Within those
blocks, the following options are recognized:
.IP "\fBInstance\fR \fIInstance\fR" 4
.IX Item "Instance Instance"
Sets the plugin instance to \fIInstance\fR. That instance name must be unique, but
it's your responsibility, the plugin doesn't check for that. If not given, the
instance is set to the directory name with all slashes replaced by underscores
and all leading underscores removed.
.IP "\fBName\fR \fIPattern\fR" 4
.IX Item "Name Pattern"
Only count files that match \fIPattern\fR, where \fIPattern\fR is a shell-like
wildcard as understood by \fIfnmatch\fR\|(3). Only the \fBfilename\fR is checked
against the pattern, not the entire path. In case this makes it easier for you:
This option has been named after the \fB\-name\fR parameter to \fIfind\fR\|(1).
.IP "\fBMTime\fR \fIAge\fR" 4
.IX Item "MTime Age"
Count only files of a specific age: If \fIAge\fR is greater than zero, only files
that haven't been touched in the last \fIAge\fR seconds are counted. If \fIAge\fR is
a negative number, this is inversed. For example, if \fB\-60\fR is specified, only
files that have been modified in the last minute will be counted.
.Sp
The number can also be followed by a \*(L"multiplier\*(R" to easily specify a larger
timespan. When given in this notation, the argument must in quoted, i.\ e.
must be passed as string. So the \fB\-60\fR could also be written as \fB\*(L"\-1m\*(R"\fR (one
minute). Valid multipliers are \f(CW\*(C`s\*(C'\fR (second), \f(CW\*(C`m\*(C'\fR (minute), \f(CW\*(C`h\*(C'\fR (hour), \f(CW\*(C`d\*(C'\fR
(day), \f(CW\*(C`w\*(C'\fR (week), and \f(CW\*(C`y\*(C'\fR (year). There is no \*(L"month\*(R" multiplier. You can
also specify fractional numbers, e.\ g. \fB\*(L"0.5d\*(R"\fR is identical to
\&\fB\*(L"12h\*(R"\fR.
.IP "\fBSize\fR \fISize\fR" 4
.IX Item "Size Size"
Count only files of a specific size. When \fISize\fR is a positive number, only
files that are at least this big are counted. If \fISize\fR is a negative number,
this is inversed, i.\ e. only files smaller than the absolute value of
\&\fISize\fR are counted.
.Sp
As with the \fBMTime\fR option, a \*(L"multiplier\*(R" may be added. For a detailed
description see above. Valid multipliers here are \f(CW\*(C`b\*(C'\fR (byte), \f(CW\*(C`k\*(C'\fR (kilobyte),
\&\f(CW\*(C`m\*(C'\fR (megabyte), \f(CW\*(C`g\*(C'\fR (gigabyte), \f(CW\*(C`t\*(C'\fR (terabyte), and \f(CW\*(C`p\*(C'\fR (petabyte). Please
note that there are 1000 bytes in a kilobyte, not 1024.
.IP "\fBRecursive\fR \fItrue\fR|\fIfalse\fR" 4
.IX Item "Recursive true|false"
Controls whether or not to recurse into subdirectories. Enabled by default.
.IP "\fBIncludeHidden\fR \fItrue\fR|\fIfalse\fR" 4
.IX Item "IncludeHidden true|false"
Controls whether or not to include \*(L"hidden\*(R" files and directories in the count.
\&\*(L"Hidden\*(R" files and directories are those, whose name begins with a dot.
Defaults to \fIfalse\fR, i.e. by default hidden files and directories are ignored.
.ie n .SS "Plugin ""GenericJMX"""
.el .SS "Plugin \f(CWGenericJMX\fP"
.IX Subsection "Plugin GenericJMX"
The \fIGenericJMX plugin\fR is written in \fIJava\fR and therefore documented in
\&\fIcollectd\-java\fR\|(5).
.ie n .SS "Plugin ""gmond"""
.el .SS "Plugin \f(CWgmond\fP"
.IX Subsection "Plugin gmond"
The \fIgmond\fR plugin received the multicast traffic sent by \fBgmond\fR, the
statistics collection daemon of Ganglia. Mappings for the standard \*(L"metrics\*(R"
are built-in, custom mappings may be added via \fBMetric\fR blocks, see below.
.PP
Synopsis:
.PP
.Vb 10
\&
\& MCReceiveFrom "239.2.11.71" "8649"
\&
\& Type "swap"
\& TypeInstance "total"
\& DataSource "value"
\&
\&
\& Type "swap"
\& TypeInstance "free"
\& DataSource "value"
\&
\&
.Ve
.PP
The following metrics are built-in:
.IP "\(bu" 4
load_one, load_five, load_fifteen
.IP "\(bu" 4
cpu_user, cpu_system, cpu_idle, cpu_nice, cpu_wio
.IP "\(bu" 4
mem_free, mem_shared, mem_buffers, mem_cached, mem_total
.IP "\(bu" 4
bytes_in, bytes_out
.IP "\(bu" 4
pkts_in, pkts_out
.PP
Available configuration options:
.IP "\fBMCReceiveFrom\fR \fIMCGroup\fR [\fIPort\fR]" 4
.IX Item "MCReceiveFrom MCGroup [Port]"
Sets sets the multicast group and \s-1UDP\s0 port to which to subscribe.
.Sp
Default: \fB239.2.11.71\fR\ /\ \fB8649\fR
.IP "<\fBMetric\fR \fIName\fR>" 4
.IX Item ""
These blocks add a new metric conversion to the internal table. \fIName\fR, the
string argument to the \fBMetric\fR block, is the metric name as used by Ganglia.
.RS 4
.IP "\fBType\fR \fIType\fR" 4
.IX Item "Type Type"
Type to map this metric to. Required.
.IP "\fBTypeInstance\fR \fIInstance\fR" 4
.IX Item "TypeInstance Instance"
Type-instance to use. Optional.
.IP "\fBDataSource\fR \fIName\fR" 4
.IX Item "DataSource Name"
Data source to map this metric to. If the configured type has exactly one data
source, this is optional. Otherwise the option is required.
.RE
.RS 4
.RE
.ie n .SS "Plugin ""gps"""
.el .SS "Plugin \f(CWgps\fP"
.IX Subsection "Plugin gps"
The \f(CW\*(C`gps plugin\*(C'\fR connects to gpsd on the host machine.
The host, port, timeout and pause are configurable.
.PP
This is useful if you run an \s-1NTP\s0 server using a \s-1GPS\s0 for source and you want to
monitor it.
.PP
Mind your \s-1GPS\s0 must send $\-\-GSA for having the data reported!
.PP
The following elements are collected:
.IP "\fBsatellites\fR" 4
.IX Item "satellites"
Number of satellites used for fix (type instance \*(L"used\*(R") and in view (type
instance \*(L"visible\*(R"). 0 means no \s-1GPS\s0 satellites are visible.
.IP "\fBdilution_of_precision\fR" 4
.IX Item "dilution_of_precision"
Vertical and horizontal dilution (type instance \*(L"horizontal\*(R" or \*(L"vertical\*(R").
It should be between 0 and 3.
Look at the documentation of your \s-1GPS\s0 to know more.
.PP
Synopsis:
.PP
.Vb 10
\& LoadPlugin gps
\&
\& # Connect to localhost on gpsd regular port:
\& Host "127.0.0.1"
\& Port "2947"
\& # 15 ms timeout
\& Timeout 0.015
\& # PauseConnect of 5 sec. between connection attempts.
\& PauseConnect 5
\&
.Ve
.PP
Available configuration options:
.IP "\fBHost\fR \fIHost\fR" 4
.IX Item "Host Host"
The host on which gpsd daemon runs. Defaults to \fBlocalhost\fR.
.IP "\fBPort\fR \fIPort\fR" 4
.IX Item "Port Port"
Port to connect to gpsd on the host machine. Defaults to \fB2947\fR.
.IP "\fBTimeout\fR \fISeconds\fR" 4
.IX Item "Timeout Seconds"
Timeout in seconds (default 0.015 sec).
.Sp
The \s-1GPS\s0 data stream is fetch by the plugin form the daemon.
It waits for data to be available, if none arrives it times out
and loop for another reading.
Mind to put a low value gpsd expects value in the micro-seconds area
(recommended is 500 us) since the waiting function is blocking.
Value must be between 500 us and 5 sec., if outside that range the
default value is applied.
.Sp
This only applies from gpsd release\-2.95.
.IP "\fBPauseConnect\fR \fISeconds\fR" 4
.IX Item "PauseConnect Seconds"
Pause to apply between attempts of connection to gpsd in seconds (default 5 sec).
.ie n .SS "Plugin ""grpc"""
.el .SS "Plugin \f(CWgrpc\fP"
.IX Subsection "Plugin grpc"
The \fIgrpc\fR plugin provides an \s-1RPC\s0 interface to submit values to or query
values from collectd based on the open source gRPC framework. It exposes an
end-point for dispatching values to the daemon.
.PP
The \fBgRPC\fR homepage can be found at .
.IP "\fBServer\fR \fIHost\fR \fIPort\fR" 4
.IX Item "Server Host Port"
The \fBServer\fR statement sets the address of a server to which to send metrics
via the \f(CW\*(C`DispatchValues\*(C'\fR function.
.Sp
The argument \fIHost\fR may be a hostname, an IPv4 address, or an IPv6 address.
.Sp
Optionally, \fBServer\fR may be specified as a configuration block which supports
the following options:
.RS 4
.IP "\fBEnableSSL\fR \fBfalse\fR|\fBtrue\fR" 4
.IX Item "EnableSSL false|true"
Whether to require \s-1SSL\s0 for outgoing connections. Default: false.
.IP "\fBSSLCACertificateFile\fR \fIFilename\fR" 4
.IX Item "SSLCACertificateFile Filename"
.PD 0
.IP "\fBSSLCertificateFile\fR \fIFilename\fR" 4
.IX Item "SSLCertificateFile Filename"
.IP "\fBSSLCertificateKeyFile\fR \fIFilename\fR" 4
.IX Item "SSLCertificateKeyFile Filename"
.PD
Filenames specifying \s-1SSL\s0 certificate and key material to be used with \s-1SSL\s0
connections.
.RE
.RS 4
.RE
.IP "\fBListen\fR \fIHost\fR \fIPort\fR" 4
.IX Item "Listen Host Port"
The \fBListen\fR statement sets the network address to bind to. When multiple
statements are specified, the daemon will bind to all of them. If none are
specified, it defaults to \fB0.0.0.0:50051\fR.
.Sp
The argument \fIHost\fR may be a hostname, an IPv4 address, or an IPv6 address.
.Sp
Optionally, \fBListen\fR may be specified as a configuration block which
supports the following options:
.RS 4
.IP "\fBEnableSSL\fR \fItrue\fR|\fIfalse\fR" 4
.IX Item "EnableSSL true|false"
Whether to enable \s-1SSL\s0 for incoming connections. Default: false.
.IP "\fBSSLCACertificateFile\fR \fIFilename\fR" 4
.IX Item "SSLCACertificateFile Filename"
.PD 0
.IP "\fBSSLCertificateFile\fR \fIFilename\fR" 4
.IX Item "SSLCertificateFile Filename"
.IP "\fBSSLCertificateKeyFile\fR \fIFilename\fR" 4
.IX Item "SSLCertificateKeyFile Filename"
.PD
Filenames specifying \s-1SSL\s0 certificate and key material to be used with \s-1SSL\s0
connections.
.RE
.RS 4
.RE
.ie n .SS "Plugin ""hddtemp"""
.el .SS "Plugin \f(CWhddtemp\fP"
.IX Subsection "Plugin hddtemp"
To get values from \fBhddtemp\fR collectd connects to \fBlocalhost\fR (127.0.0.1),
port \fB7634/tcp\fR. The \fBHost\fR and \fBPort\fR options can be used to change these
default values, see below. \f(CW\*(C`hddtemp\*(C'\fR has to be running to work correctly. If
\&\f(CW\*(C`hddtemp\*(C'\fR is not running timeouts may appear which may interfere with other
statistics..
.PP
The \fBhddtemp\fR homepage can be found at
.
.IP "\fBHost\fR \fIHostname\fR" 4
.IX Item "Host Hostname"
Hostname to connect to. Defaults to \fB127.0.0.1\fR.
.IP "\fBPort\fR \fIPort\fR" 4
.IX Item "Port Port"
TCP-Port to connect to. Defaults to \fB7634\fR.
.ie n .SS "Plugin ""hugepages"""
.el .SS "Plugin \f(CWhugepages\fP"
.IX Subsection "Plugin hugepages"
To collect \fBhugepages\fR information, collectd reads directories
\&\*(L"/sys/devices/system/node/*/hugepages\*(R" and
\&\*(L"/sys/kernel/mm/hugepages\*(R".
Reading of these directories can be disabled by the following
options (default is enabled).
.IP "\fBReportPerNodeHP\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "ReportPerNodeHP true|false"
If enabled, information will be collected from the hugepage
counters in \*(L"/sys/devices/system/node/*/hugepages\*(R".
This is used to check the per-node hugepage statistics on
a \s-1NUMA\s0 system.
.IP "\fBReportRootHP\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "ReportRootHP true|false"
If enabled, information will be collected from the hugepage
counters in \*(L"/sys/kernel/mm/hugepages\*(R".
This can be used on both \s-1NUMA\s0 and non-NUMA systems to check
the overall hugepage statistics.
.IP "\fBValuesPages\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "ValuesPages true|false"
Whether to report hugepages metrics in number of pages.
Defaults to \fBtrue\fR.
.IP "\fBValuesBytes\fR \fBfalse\fR|\fBtrue\fR" 4
.IX Item "ValuesBytes false|true"
Whether to report hugepages metrics in bytes.
Defaults to \fBfalse\fR.
.IP "\fBValuesPercentage\fR \fBfalse\fR|\fBtrue\fR" 4
.IX Item "ValuesPercentage false|true"
Whether to report hugepages metrics as percentage.
Defaults to \fBfalse\fR.
.ie n .SS "Plugin ""intel_rdt"""
.el .SS "Plugin \f(CWintel_rdt\fP"
.IX Subsection "Plugin intel_rdt"
The \fIintel_rdt\fR plugin collects information provided by monitoring features of
Intel Resource Director Technology (Intel(R) \s-1RDT\s0) like Cache Monitoring
Technology (\s-1CMT\s0), Memory Bandwidth Monitoring (\s-1MBM\s0). These features provide
information about utilization of shared resources. \s-1CMT\s0 monitors last level cache
occupancy (\s-1LLC\s0). \s-1MBM\s0 supports two types of events reporting local and remote
memory bandwidth. Local memory bandwidth (\s-1MBL\s0) reports the bandwidth of
accessing memory associated with the local socket. Remote memory bandwidth (\s-1MBR\s0)
reports the bandwidth of accessing the remote socket. Also this technology
allows to monitor instructions per clock (\s-1IPC\s0).
Monitor events are hardware dependant. Monitoring capabilities are detected on
plugin initialization and only supported events are monitored.
.PP
\&\fBSynopsis:\fR
.PP
.Vb 3
\&
\& Cores "0\-2" "3,4,6" "8\-10,15"
\&
.Ve
.PP
\&\fBOptions:\fR
.IP "\fBInterval\fR \fIseconds\fR" 4
.IX Item "Interval seconds"
The interval within which to retrieve statistics on monitored events in seconds.
For milliseconds divide the time by 1000 for example if the desired interval
is 50ms, set interval to 0.05. Due to limited capacity of counters it is not
recommended to set interval higher than 1 sec.
.IP "\fBCores\fR \fIcores groups\fR" 4
.IX Item "Cores cores groups"
All events are reported on a per core basis. Monitoring of the events can be
configured for group of cores (aggregated statistics). This field defines groups
of cores on which to monitor supported events. The field is represented as list
of strings with core group values. Each string represents a list of cores in a
group. Allowed formats are:
0,1,2,3
0\-10,20\-18
1,3,5\-8,10,0x10\-12
.Sp
If an empty string is provided as value for this field default cores
configuration is applied \- a separate group is created for each core.
.PP
\&\fBNote:\fR By default global interval is used to retrieve statistics on monitored
events. To configure a plugin specific interval use \fBInterval\fR option of the
intel_rdt block. For milliseconds divide the time by 1000 for
example if the desired interval is 50ms, set interval to 0.05.
Due to limited capacity of counters it is not recommended to set interval higher
than 1 sec.
.ie n .SS "Plugin ""interface"""
.el .SS "Plugin \f(CWinterface\fP"
.IX Subsection "Plugin interface"
.IP "\fBInterface\fR \fIInterface\fR" 4
.IX Item "Interface Interface"
Select this interface. By default these interfaces will then be collected. For
a more detailed description see \fBIgnoreSelected\fR below.
.IP "\fBIgnoreSelected\fR \fItrue\fR|\fIfalse\fR" 4
.IX Item "IgnoreSelected true|false"
If no configuration if given, the \fBinterface\fR\-plugin will collect data from
all interfaces. This may not be practical, especially for loopback\- and
similar interfaces. Thus, you can use the \fBInterface\fR\-option to pick the
interfaces you're interested in. Sometimes, however, it's easier/preferred
to collect all interfaces \fIexcept\fR a few ones. This option enables you to
do that: By setting \fBIgnoreSelected\fR to \fItrue\fR the effect of
\&\fBInterface\fR is inverted: All selected interfaces are ignored and all
other interfaces are collected.
.Sp
It is possible to use regular expressions to match interface names, if the
name is surrounded by \fI/.../\fR and collectd was compiled with support for
regexps. This is useful if there's a need to collect (or ignore) data
for a group of interfaces that are similarly named, without the need to
explicitly list all of them (especially useful if the list is dynamic).
Example:
.Sp
.Vb 4
\& Interface "lo"
\& Interface "/^veth/"
\& Interface "/^tun[0\-9]+/"
\& IgnoreSelected "true"
.Ve
.Sp
This will ignore the loopback interface, all interfaces with names starting
with \fIveth\fR and all interfaces with names starting with \fItun\fR followed by
at least one digit.
.IP "\fBReportInactive\fR \fItrue\fR|\fIfalse\fR" 4
.IX Item "ReportInactive true|false"
When set to \fIfalse\fR, only interfaces with non-zero traffic will be
reported. Note that the check is done by looking into whether a
package was sent at any time from boot and the corresponding counter
is non-zero. So, if the interface has been sending data in the past
since boot, but not during the reported time-interval, it will still
be reported.
.Sp
The default value is \fItrue\fR and results in collection of the data
from all interfaces that are selected by \fBInterface\fR and
\&\fBIgnoreSelected\fR options.
.IP "\fBUniqueName\fR \fItrue\fR|\fIfalse\fR" 4
.IX Item "UniqueName true|false"
Interface name is not unique on Solaris (\s-1KSTAT\s0), interface name is unique
only within a module/instance. Following tuple is considered unique:
(ks_module, ks_instance, ks_name)
If this option is set to true, interface name contains above three fields
separated by an underscore. For more info on \s-1KSTAT,\s0 visit
.Sp
This option is only available on Solaris.
.ie n .SS "Plugin ""ipmi"""
.el .SS "Plugin \f(CWipmi\fP"
.IX Subsection "Plugin ipmi"
.IP "\fBSensor\fR \fISensor\fR" 4
.IX Item "Sensor Sensor"
Selects sensors to collect or to ignore, depending on \fBIgnoreSelected\fR.
.IP "\fBIgnoreSelected\fR \fItrue\fR|\fIfalse\fR" 4
.IX Item "IgnoreSelected true|false"
If no configuration if given, the \fBipmi\fR plugin will collect data from all
sensors found of type \*(L"temperature\*(R", \*(L"voltage\*(R", \*(L"current\*(R" and \*(L"fanspeed\*(R".
This option enables you to do that: By setting \fBIgnoreSelected\fR to \fItrue\fR
the effect of \fBSensor\fR is inverted: All selected sensors are ignored and
all other sensors are collected.
.IP "\fBNotifySensorAdd\fR \fItrue\fR|\fIfalse\fR" 4
.IX Item "NotifySensorAdd true|false"
If a sensor appears after initialization time of a minute a notification
is sent.
.IP "\fBNotifySensorRemove\fR \fItrue\fR|\fIfalse\fR" 4
.IX Item "NotifySensorRemove true|false"
If a sensor disappears a notification is sent.
.IP "\fBNotifySensorNotPresent\fR \fItrue\fR|\fIfalse\fR" 4
.IX Item "NotifySensorNotPresent true|false"
If you have for example dual power supply and one of them is (un)plugged then
a notification is sent.
.ie n .SS "Plugin ""iptables"""
.el .SS "Plugin \f(CWiptables\fP"
.IX Subsection "Plugin iptables"
.IP "\fBChain\fR \fITable\fR \fIChain\fR [\fIComment|Number\fR [\fIName\fR]]" 4
.IX Item "Chain Table Chain [Comment|Number [Name]]"
.PD 0
.IP "\fBChain6\fR \fITable\fR \fIChain\fR [\fIComment|Number\fR [\fIName\fR]]" 4
.IX Item "Chain6 Table Chain [Comment|Number [Name]]"
.PD
Select the iptables/ip6tables filter rules to count packets and bytes from.
.Sp
If only \fITable\fR and \fIChain\fR are given, this plugin will collect the counters
of all rules which have a comment-match. The comment is then used as
type-instance.
.Sp
If \fIComment\fR or \fINumber\fR is given, only the rule with the matching comment or
the \fIn\fRth rule will be collected. Again, the comment (or the number) will be
used as the type-instance.
.Sp
If \fIName\fR is supplied, it will be used as the type-instance instead of the
comment or the number.
.ie n .SS "Plugin ""irq"""
.el .SS "Plugin \f(CWirq\fP"
.IX Subsection "Plugin irq"
.IP "\fBIrq\fR \fIIrq\fR" 4
.IX Item "Irq Irq"
Select this irq. By default these irqs will then be collected. For a more
detailed description see \fBIgnoreSelected\fR below.
.IP "\fBIgnoreSelected\fR \fItrue\fR|\fIfalse\fR" 4
.IX Item "IgnoreSelected true|false"
If no configuration if given, the \fBirq\fR\-plugin will collect data from all
irqs. This may not be practical, especially if no interrupts happen. Thus, you
can use the \fBIrq\fR\-option to pick the interrupt you're interested in.
Sometimes, however, it's easier/preferred to collect all interrupts \fIexcept\fR a
few ones. This option enables you to do that: By setting \fBIgnoreSelected\fR to
\&\fItrue\fR the effect of \fBIrq\fR is inverted: All selected interrupts are ignored
and all other interrupts are collected.
.ie n .SS "Plugin ""java"""
.el .SS "Plugin \f(CWjava\fP"
.IX Subsection "Plugin java"
The \fIJava\fR plugin makes it possible to write extensions for collectd in Java.
This section only discusses the syntax and semantic of the configuration
options. For more in-depth information on the \fIJava\fR plugin, please read
\&\fIcollectd\-java\fR\|(5).
.PP
Synopsis:
.PP
.Vb 8
\&
\& JVMArg "\-verbose:jni"
\& JVMArg "\-Djava.class.path=/opt/collectd/lib/collectd/bindings/java"
\& LoadPlugin "org.collectd.java.Foobar"
\&
\& # To be parsed by the plugin
\&
\&
.Ve
.PP
Available configuration options:
.IP "\fBJVMArg\fR \fIArgument\fR" 4
.IX Item "JVMArg Argument"
Argument that is to be passed to the \fIJava Virtual Machine\fR (\s-1JVM\s0). This works
exactly the way the arguments to the \fIjava\fR binary on the command line work.
Execute \f(CW\*(C`java\ \-\-help\*(C'\fR for details.
.Sp
Please note that \fBall\fR these options must appear \fBbefore\fR (i.\ e. above)
any other options! When another option is found, the \s-1JVM\s0 will be started and
later options will have to be ignored!
.IP "\fBLoadPlugin\fR \fIJavaClass\fR" 4
.IX Item "LoadPlugin JavaClass"
Instantiates a new \fIJavaClass\fR object. The constructor of this object very
likely then registers one or more callback methods with the server.
.Sp
See \fIcollectd\-java\fR\|(5) for details.
.Sp
When the first such option is found, the virtual machine (\s-1JVM\s0) is created. This
means that all \fBJVMArg\fR options must appear before (i.\ e. above) all
\&\fBLoadPlugin\fR options!
.IP "\fBPlugin\fR \fIName\fR" 4
.IX Item "Plugin Name"
The entire block is passed to the Java plugin as an
\&\fIorg.collectd.api.OConfigItem\fR object.
.Sp
For this to work, the plugin has to register a configuration callback first,
see \*(L"config callback\*(R" in \fIcollectd\-java\fR\|(5). This means, that the \fBPlugin\fR block
must appear after the appropriate \fBLoadPlugin\fR block. Also note, that \fIName\fR
depends on the (Java) plugin registering the callback and is completely
independent from the \fIJavaClass\fR argument passed to \fBLoadPlugin\fR.
.ie n .SS "Plugin ""load"""
.el .SS "Plugin \f(CWload\fP"
.IX Subsection "Plugin load"
The \fILoad plugin\fR collects the system load. These numbers give a rough overview
over the utilization of a machine. The system load is defined as the number of
runnable tasks in the run-queue and is provided by many operating systems as a
one, five or fifteen minute average.
.PP
The following configuration options are available:
.IP "\fBReportRelative\fR \fBfalse\fR|\fBtrue\fR" 4
.IX Item "ReportRelative false|true"
When enabled, system load divided by number of available \s-1CPU\s0 cores is reported
for intervals 1 min, 5 min and 15 min. Defaults to false.
.ie n .SS "Plugin ""logfile"""
.el .SS "Plugin \f(CWlogfile\fP"
.IX Subsection "Plugin logfile"
.IP "\fBLogLevel\fR \fBdebug|info|notice|warning|err\fR" 4
.IX Item "LogLevel debug|info|notice|warning|err"
Sets the log-level. If, for example, set to \fBnotice\fR, then all events with
severity \fBnotice\fR, \fBwarning\fR, or \fBerr\fR will be written to the logfile.
.Sp
Please note that \fBdebug\fR is only available if collectd has been compiled with
debugging support.
.IP "\fBFile\fR \fIFile\fR" 4
.IX Item "File File"
Sets the file to write log messages to. The special strings \fBstdout\fR and
\&\fBstderr\fR can be used to write to the standard output and standard error
channels, respectively. This, of course, only makes much sense when \fIcollectd\fR
is running in foreground\- or non-daemon-mode.
.IP "\fBTimestamp\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "Timestamp true|false"
Prefix all lines printed by the current time. Defaults to \fBtrue\fR.
.IP "\fBPrintSeverity\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "PrintSeverity true|false"
When enabled, all lines are prefixed by the severity of the log message, for
example \*(L"warning\*(R". Defaults to \fBfalse\fR.
.PP
\&\fBNote\fR: There is no need to notify the daemon after moving or removing the
log file (e.\ g. when rotating the logs). The plugin reopens the file
for each line it writes.
.ie n .SS "Plugin ""log_logstash"""
.el .SS "Plugin \f(CWlog_logstash\fP"
.IX Subsection "Plugin log_logstash"
The \fIlog logstash plugin\fR behaves like the logfile plugin but formats
messages as \s-1JSON\s0 events for logstash to parse and input.
.IP "\fBLogLevel\fR \fBdebug|info|notice|warning|err\fR" 4
.IX Item "LogLevel debug|info|notice|warning|err"
Sets the log-level. If, for example, set to \fBnotice\fR, then all events with
severity \fBnotice\fR, \fBwarning\fR, or \fBerr\fR will be written to the logfile.
.Sp
Please note that \fBdebug\fR is only available if collectd has been compiled with
debugging support.
.IP "\fBFile\fR \fIFile\fR" 4
.IX Item "File File"
Sets the file to write log messages to. The special strings \fBstdout\fR and
\&\fBstderr\fR can be used to write to the standard output and standard error
channels, respectively. This, of course, only makes much sense when \fIcollectd\fR
is running in foreground\- or non-daemon-mode.
.PP
\&\fBNote\fR: There is no need to notify the daemon after moving or removing the
log file (e.\ g. when rotating the logs). The plugin reopens the file
for each line it writes.
.ie n .SS "Plugin ""lpar"""
.el .SS "Plugin \f(CWlpar\fP"
.IX Subsection "Plugin lpar"
The \fI\s-1LPAR\s0 plugin\fR reads \s-1CPU\s0 statistics of \fILogical Partitions\fR, a
virtualization technique for \s-1IBM POWER\s0 processors. It takes into account \s-1CPU\s0
time stolen from or donated to a partition, in addition to the usual user,
system, I/O statistics.
.PP
The following configuration options are available:
.IP "\fBCpuPoolStats\fR \fBfalse\fR|\fBtrue\fR" 4
.IX Item "CpuPoolStats false|true"
When enabled, statistics about the processor pool are read, too. The partition
needs to have pool authority in order to be able to acquire this information.
Defaults to false.
.IP "\fBReportBySerial\fR \fBfalse\fR|\fBtrue\fR" 4
.IX Item "ReportBySerial false|true"
If enabled, the serial of the physical machine the partition is currently
running on is reported as \fIhostname\fR and the logical hostname of the machine
is reported in the \fIplugin instance\fR. Otherwise, the logical hostname will be
used (just like other plugins) and the \fIplugin instance\fR will be empty.
Defaults to false.
.ie n .SS "Plugin ""lua"""
.el .SS "Plugin \f(CWlua\fP"
.IX Subsection "Plugin lua"
This plugin embeds a Lua interpreter into collectd and provides an interface
to collectd's plugin system. See \fIcollectd\-lua\fR\|(5) for its documentation.
.ie n .SS "Plugin ""mbmon"""
.el .SS "Plugin \f(CWmbmon\fP"
.IX Subsection "Plugin mbmon"
The \f(CW\*(C`mbmon plugin\*(C'\fR uses mbmon to retrieve temperature, voltage, etc.
.PP
Be default collectd connects to \fBlocalhost\fR (127.0.0.1), port \fB411/tcp\fR. The
\&\fBHost\fR and \fBPort\fR options can be used to change these values, see below.
\&\f(CW\*(C`mbmon\*(C'\fR has to be running to work correctly. If \f(CW\*(C`mbmon\*(C'\fR is not running
timeouts may appear which may interfere with other statistics..
.PP
\&\f(CW\*(C`mbmon\*(C'\fR must be run with the \-r option (\*(L"print \s-1TAG\s0 and Value format\*(R");
Debian's \fI/etc/init.d/mbmon\fR script already does this, other people
will need to ensure that this is the case.
.IP "\fBHost\fR \fIHostname\fR" 4
.IX Item "Host Hostname"
Hostname to connect to. Defaults to \fB127.0.0.1\fR.
.IP "\fBPort\fR \fIPort\fR" 4
.IX Item "Port Port"
TCP-Port to connect to. Defaults to \fB411\fR.
.ie n .SS "Plugin ""md"""
.el .SS "Plugin \f(CWmd\fP"
.IX Subsection "Plugin md"
The \f(CW\*(C`md plugin\*(C'\fR collects information from Linux Software-RAID devices (md).
.PP
All reported values are of the type \f(CW\*(C`md_disks\*(C'\fR. Reported type instances are
\&\fIactive\fR, \fIfailed\fR (present but not operational), \fIspare\fR (hot stand-by) and
\&\fImissing\fR (physically absent) disks.
.IP "\fBDevice\fR \fIDevice\fR" 4
.IX Item "Device Device"
Select md devices based on device name. The \fIdevice name\fR is the basename of
the device, i.e. the name of the block device without the leading \f(CW\*(C`/dev/\*(C'\fR.
See \fBIgnoreSelected\fR for more details.
.IP "\fBIgnoreSelected\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "IgnoreSelected true|false"
Invert device selection: If set to \fBtrue\fR, all md devices \fBexcept\fR those
listed using \fBDevice\fR are collected. If \fBfalse\fR (the default), only those
listed are collected. If no configuration is given, the \fBmd\fR plugin will
collect data from all md devices.
.ie n .SS "Plugin ""memcachec"""
.el .SS "Plugin \f(CWmemcachec\fP"
.IX Subsection "Plugin memcachec"
The \f(CW\*(C`memcachec plugin\*(C'\fR connects to a memcached server, queries one or more
given \fIpages\fR and parses the returned data according to user specification.
The \fImatches\fR used are the same as the matches used in the \f(CW\*(C`curl\*(C'\fR and \f(CW\*(C`tail\*(C'\fR
plugins.
.PP
In order to talk to the memcached server, this plugin uses the \fIlibmemcached\fR
library. Please note that there is another library with a very similar name,
libmemcache (notice the missing `d'), which is not applicable.
.PP
Synopsis of the configuration:
.PP
.Vb 12
\&
\&
\& Server "localhost"
\& Key "page_key"
\&
\& Regex "(\e\ed+) bytes sent"
\& DSType CounterAdd
\& Type "ipt_octets"
\& Instance "type_instance"
\&
\&
\&
.Ve
.PP
The configuration options are:
.IP "<\fBPage\fR \fIName\fR>" 4
.IX Item ""
Each \fBPage\fR block defines one \fIpage\fR to be queried from the memcached server.
The block requires one string argument which is used as \fIplugin instance\fR.
.IP "\fBServer\fR \fIAddress\fR" 4
.IX Item "Server Address"
Sets the server address to connect to when querying the page. Must be inside a
\&\fBPage\fR block.
.IP "\fBKey\fR \fIKey\fR" 4
.IX Item "Key Key"
When connected to the memcached server, asks for the page \fIKey\fR.
.IP "<\fBMatch\fR>" 4
.IX Item ""
Match blocks define which strings to look for and how matches substrings are
interpreted. For a description of match blocks, please see \*(L"Plugin tail\*(R".
.ie n .SS "Plugin ""memcached"""
.el .SS "Plugin \f(CWmemcached\fP"
.IX Subsection "Plugin memcached"
The \fBmemcached plugin\fR connects to a memcached server and queries statistics
about cache utilization, memory and bandwidth used.
.PP
.Vb 7
\&
\&
\& #Host "memcache.example.com"
\& Address "127.0.0.1"
\& Port 11211
\&
\&
.Ve
.PP
The plugin configuration consists of one or more \fBInstance\fR blocks which
specify one \fImemcached\fR connection each. Within the \fBInstance\fR blocks, the
following options are allowed:
.IP "\fBHost\fR \fIHostname\fR" 4
.IX Item "Host Hostname"
Sets the \fBhost\fR field of dispatched values. Defaults to the global hostname
setting.
For backwards compatibility, values are also dispatched with the global
hostname when \fBHost\fR is set to \fB127.0.0.1\fR or \fBlocalhost\fR and \fBAddress\fR is
not set.
.IP "\fBAddress\fR \fIAddress\fR" 4
.IX Item "Address Address"
Hostname or \s-1IP\s0 to connect to. For backwards compatibility, defaults to the
value of \fBHost\fR or \fB127.0.0.1\fR if \fBHost\fR is unset.
.IP "\fBPort\fR \fIPort\fR" 4
.IX Item "Port Port"
\&\s-1TCP\s0 port to connect to. Defaults to \fB11211\fR.
.IP "\fBSocket\fR \fIPath\fR" 4
.IX Item "Socket Path"
Connect to \fImemcached\fR using the \s-1UNIX\s0 domain socket at \fIPath\fR. If this
setting is given, the \fBAddress\fR and \fBPort\fR settings are ignored.
.ie n .SS "Plugin ""mic"""
.el .SS "Plugin \f(CWmic\fP"
.IX Subsection "Plugin mic"
The \fBmic plugin\fR gathers \s-1CPU\s0 statistics, memory usage and temperatures from
Intel's Many Integrated Core (\s-1MIC\s0) systems.
.PP
\&\fBSynopsis:\fR
.PP
.Vb 4
\&
\& ShowCPU true
\& ShowCPUCores true
\& ShowMemory true
\&
\& ShowTemperatures true
\& Temperature vddg
\& Temperature vddq
\& IgnoreSelectedTemperature true
\&
\& ShowPower true
\& Power total0
\& Power total1
\& IgnoreSelectedPower true
\&
.Ve
.PP
The following options are valid inside the \fBPlugin\ mic\fR block:
.IP "\fBShowCPU\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "ShowCPU true|false"
If enabled (the default) a sum of the \s-1CPU\s0 usage across all cores is reported.
.IP "\fBShowCPUCores\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "ShowCPUCores true|false"
If enabled (the default) per-core \s-1CPU\s0 usage is reported.
.IP "\fBShowMemory\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "ShowMemory true|false"
If enabled (the default) the physical memory usage of the \s-1MIC\s0 system is
reported.
.IP "\fBShowTemperatures\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "ShowTemperatures true|false"
If enabled (the default) various temperatures of the \s-1MIC\s0 system are reported.
.IP "\fBTemperature\fR \fIName\fR" 4
.IX Item "Temperature Name"
This option controls which temperatures are being reported. Whether matching
temperatures are being ignored or \fIonly\fR matching temperatures are reported
depends on the \fBIgnoreSelectedTemperature\fR setting below. By default \fIall\fR
temperatures are reported.
.IP "\fBIgnoreSelectedTemperature\fR \fBfalse\fR|\fBtrue\fR" 4
.IX Item "IgnoreSelectedTemperature false|true"
Controls the behavior of the \fBTemperature\fR setting above. If set to \fBfalse\fR
(the default) only temperatures matching a \fBTemperature\fR option are reported
or, if no \fBTemperature\fR option is specified, all temperatures are reported. If
set to \fBtrue\fR, matching temperatures are \fIignored\fR and all other temperatures
are reported.
.Sp
Known temperature names are:
.RS 4
.IP "die" 4
.IX Item "die"
Die of the \s-1CPU\s0
.IP "devmem" 4
.IX Item "devmem"
Device Memory
.IP "fin" 4
.IX Item "fin"
Fan In
.IP "fout" 4
.IX Item "fout"
Fan Out
.IP "vccp" 4
.IX Item "vccp"
Voltage ccp
.IP "vddg" 4
.IX Item "vddg"
Voltage ddg
.IP "vddq" 4
.IX Item "vddq"
Voltage ddq
.RE
.RS 4
.RE
.IP "\fBShowPower\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "ShowPower true|false"
If enabled (the default) various temperatures of the \s-1MIC\s0 system are reported.
.IP "\fBPower\fR \fIName\fR" 4
.IX Item "Power Name"
This option controls which power readings are being reported. Whether matching
power readings are being ignored or \fIonly\fR matching power readings are reported
depends on the \fBIgnoreSelectedPower\fR setting below. By default \fIall\fR
power readings are reported.
.IP "\fBIgnoreSelectedPower\fR \fBfalse\fR|\fBtrue\fR" 4
.IX Item "IgnoreSelectedPower false|true"
Controls the behavior of the \fBPower\fR setting above. If set to \fBfalse\fR
(the default) only power readings matching a \fBPower\fR option are reported
or, if no \fBPower\fR option is specified, all power readings are reported. If
set to \fBtrue\fR, matching power readings are \fIignored\fR and all other power readings
are reported.
.Sp
Known power names are:
.RS 4
.IP "total0" 4
.IX Item "total0"
Total power utilization averaged over Time Window 0 (uWatts).
.IP "total1" 4
.IX Item "total1"
Total power utilization averaged over Time Window 0 (uWatts).
.IP "inst" 4
.IX Item "inst"
Instantaneous power (uWatts).
.IP "imax" 4
.IX Item "imax"
Max instantaneous power (uWatts).
.IP "pcie" 4
.IX Item "pcie"
PCI-E connector power (uWatts).
.IP "c2x3" 4
.IX Item "c2x3"
2x3 connector power (uWatts).
.IP "c2x4" 4
.IX Item "c2x4"
2x4 connector power (uWatts).
.IP "vccp" 4
.IX Item "vccp"
Core rail (uVolts).
.IP "vddg" 4
.IX Item "vddg"
Uncore rail (uVolts).
.IP "vddq" 4
.IX Item "vddq"
Memory subsystem rail (uVolts).
.RE
.RS 4
.RE
.ie n .SS "Plugin ""memory"""
.el .SS "Plugin \f(CWmemory\fP"
.IX Subsection "Plugin memory"
The \fImemory plugin\fR provides the following configuration options:
.IP "\fBValuesAbsolute\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "ValuesAbsolute true|false"
Enables or disables reporting of physical memory usage in absolute numbers,
i.e. bytes. Defaults to \fBtrue\fR.
.IP "\fBValuesPercentage\fR \fBfalse\fR|\fBtrue\fR" 4
.IX Item "ValuesPercentage false|true"
Enables or disables reporting of physical memory usage in percentages, e.g.
percent of physical memory used. Defaults to \fBfalse\fR.
.Sp
This is useful for deploying \fIcollectd\fR in a heterogeneous environment in
which the sizes of physical memory vary.
.ie n .SS "Plugin ""modbus"""
.el .SS "Plugin \f(CWmodbus\fP"
.IX Subsection "Plugin modbus"
The \fBmodbus plugin\fR connects to a Modbus \*(L"slave\*(R" via Modbus/TCP or Modbus/RTU and
reads register values. It supports reading single registers (unsigned 16\ bit
values), large integer values (unsigned 32\ bit values) and floating point
values (two registers interpreted as \s-1IEEE\s0 floats in big endian notation).
.PP
\&\fBSynopsis:\fR
.PP
.Vb 7
\&
\& RegisterBase 0
\& RegisterType float
\& RegisterCmd ReadHolding
\& Type voltage
\& Instance "input\-1"
\&
\&
\&
\& RegisterBase 2
\& RegisterType float
\& RegisterCmd ReadHolding
\& Type voltage
\& Instance "input\-2"
\&
\&
\&
\& RegisterBase 0
\& RegisterType Int16
\& RegisterCmd ReadHolding
\& Type temperature
\& Instance "temp\-1"
\&
\&
\&
\& Address "192.168.0.42"
\& Port "502"
\& Interval 60
\&
\&
\& Instance "power\-supply"
\& Collect "voltage\-input\-1"
\& Collect "voltage\-input\-2"
\&
\&
\&
\&
\& Device "/dev/ttyUSB0"
\& Baudrate 38400
\& Interval 20
\&
\&
\& Instance "temperature"
\& Collect "supply\-temperature\-1"
\&
\&
.Ve
.IP "<\fBData\fR \fIName\fR> blocks" 4
.IX Item " blocks"
Data blocks define a mapping between register numbers and the \*(L"types\*(R" used by
\&\fIcollectd\fR.
.Sp
Within blocks, the following options are allowed:
.RS 4
.IP "\fBRegisterBase\fR \fINumber\fR" 4
.IX Item "RegisterBase Number"
Configures the base register to read from the device. If the option
\&\fBRegisterType\fR has been set to \fBUint32\fR or \fBFloat\fR, this and the next
register will be read (the register number is increased by one).
.IP "\fBRegisterType\fR \fBInt16\fR|\fBInt32\fR|\fBUint16\fR|\fBUint32\fR|\fBFloat\fR" 4
.IX Item "RegisterType Int16|Int32|Uint16|Uint32|Float"
Specifies what kind of data is returned by the device. If the type is \fBInt32\fR,
\&\fBUint32\fR or \fBFloat\fR, two 16\ bit registers will be read and the data is
combined into one value. Defaults to \fBUint16\fR.
.IP "\fBRegisterCmd\fR \fBReadHolding\fR|\fBReadInput\fR" 4
.IX Item "RegisterCmd ReadHolding|ReadInput"
Specifies register type to be collected from device. Works only with libmodbus
2.9.2 or higher. Defaults to \fBReadHolding\fR.
.IP "\fBType\fR \fIType\fR" 4
.IX Item "Type Type"
Specifies the \*(L"type\*(R" (data set) to use when dispatching the value to
\&\fIcollectd\fR. Currently, only data sets with exactly one data source are
supported.
.IP "\fBInstance\fR \fIInstance\fR" 4
.IX Item "Instance Instance"
Sets the type instance to use when dispatching the value to \fIcollectd\fR. If
unset, an empty string (no type instance) is used.
.RE
.RS 4
.RE
.IP "<\fBHost\fR \fIName\fR> blocks" 4
.IX Item " blocks"
Host blocks are used to specify to which hosts to connect and what data to read
from their \*(L"slaves\*(R". The string argument \fIName\fR is used as hostname when
dispatching the values to \fIcollectd\fR.
.Sp
Within blocks, the following options are allowed:
.RS 4
.IP "\fBAddress\fR \fIHostname\fR" 4
.IX Item "Address Hostname"
For Modbus/TCP, specifies the node name (the actual network address) used to
connect to the host. This may be an \s-1IP\s0 address or a hostname. Please note that
the used \fIlibmodbus\fR library only supports IPv4 at the moment.
.IP "\fBPort\fR \fIService\fR" 4
.IX Item "Port Service"
for Modbus/TCP, specifies the port used to connect to the host. The port can
either be given as a number or as a service name. Please note that the
\&\fIService\fR argument must be a string, even if ports are given in their numerical
form. Defaults to \*(L"502\*(R".
.IP "\fBDevice\fR \fIDevicenode\fR" 4
.IX Item "Device Devicenode"
For Modbus/RTU, specifies the path to the serial device being used.
.IP "\fBBaudrate\fR \fIBaudrate\fR" 4
.IX Item "Baudrate Baudrate"
For Modbus/RTU, specifies the baud rate of the serial device.
Note, connections currently support only 8/N/1.
.IP "\fBInterval\fR \fIInterval\fR" 4
.IX Item "Interval Interval"
Sets the interval (in seconds) in which the values will be collected from this
host. By default the global \fBInterval\fR setting will be used.
.IP "<\fBSlave\fR \fI\s-1ID\s0\fR>" 4
.IX Item ""
Over each connection, multiple Modbus devices may be reached. The slave \s-1ID\s0
is used to specify which device should be addressed. For each device you want
to query, one \fBSlave\fR block must be given.
.Sp
Within blocks, the following options are allowed:
.RS 4
.IP "\fBInstance\fR \fIInstance\fR" 4
.IX Item "Instance Instance"
Specify the plugin instance to use when dispatching the values to \fIcollectd\fR.
By default "slave_\fI\s-1ID\s0\fR" is used.
.IP "\fBCollect\fR \fIDataName\fR" 4
.IX Item "Collect DataName"
Specifies which data to retrieve from the device. \fIDataName\fR must be the same
string as the \fIName\fR argument passed to a \fBData\fR block. You can specify this
option multiple times to collect more than one value from a slave. At least one
\&\fBCollect\fR option is mandatory.
.RE
.RS 4
.RE
.RE
.RS 4
.RE
.ie n .SS "Plugin ""mqtt"""
.el .SS "Plugin \f(CWmqtt\fP"
.IX Subsection "Plugin mqtt"
The \fI\s-1MQTT\s0 plugin\fR can send metrics to \s-1MQTT \s0(\fBPublish\fR blocks) and receive
values from \s-1MQTT \s0(\fBSubscribe\fR blocks).
.PP
\&\fBSynopsis:\fR
.PP
.Vb 10
\&
\&
\& Host "mqtt.example.com"
\& Prefix "collectd"
\&
\&
\& Host "mqtt.example.com"
\& Topic "collectd/#"
\&
\&
.Ve
.PP
The plugin's configuration is in \fBPublish\fR and/or \fBSubscribe\fR blocks,
configuring the sending and receiving direction respectively. The plugin will
register a write callback named \f(CW\*(C`mqtt/\f(CIname\f(CW\*(C'\fR where \fIname\fR is the string
argument given to the \fBPublish\fR block. Both types of blocks share many but not
all of the following options. If an option is valid in only one of the blocks,
it will be mentioned explicitly.
.PP
\&\fBOptions:\fR
.IP "\fBHost\fR \fIHostname\fR" 4
.IX Item "Host Hostname"
Hostname of the \s-1MQTT\s0 broker to connect to.
.IP "\fBPort\fR \fIService\fR" 4
.IX Item "Port Service"
Port number or service name of the \s-1MQTT\s0 broker to connect to.
.IP "\fBUser\fR \fIUserName\fR" 4
.IX Item "User UserName"
Username used when authenticating to the \s-1MQTT\s0 broker.
.IP "\fBPassword\fR \fIPassword\fR" 4
.IX Item "Password Password"
Password used when authenticating to the \s-1MQTT\s0 broker.
.IP "\fBClientId\fR \fIClientId\fR" 4
.IX Item "ClientId ClientId"
\&\s-1MQTT\s0 client \s-1ID\s0 to use. Defaults to the hostname used by \fIcollectd\fR.
.IP "\fBQoS\fR [\fB0\fR\-\fB2\fR]" 4
.IX Item "QoS [0-2]"
Sets the \fIQuality of Service\fR, with the values \f(CW0\fR, \f(CW1\fR and \f(CW2\fR meaning:
.RS 4
.IP "\fB0\fR" 4
.IX Item "0"
At most once
.IP "\fB1\fR" 4
.IX Item "1"
At least once
.IP "\fB2\fR" 4
.IX Item "2"
Exactly once
.RE
.RS 4
.Sp
In \fBPublish\fR blocks, this option determines the QoS flag set on outgoing
messages and defaults to \fB0\fR. In \fBSubscribe\fR blocks, determines the maximum
QoS setting the client is going to accept and defaults to \fB2\fR. If the QoS flag
on a message is larger than the maximum accepted QoS of a subscriber, the
message's QoS will be downgraded.
.RE
.IP "\fBPrefix\fR \fIPrefix\fR (Publish only)" 4
.IX Item "Prefix Prefix (Publish only)"
This plugin will use one topic per \fIvalue list\fR which will looks like a path.
\&\fIPrefix\fR is used as the first path element and defaults to \fBcollectd\fR.
.Sp
An example topic name would be:
.Sp
.Vb 1
\& collectd/cpu\-0/cpu\-user
.Ve
.IP "\fBRetain\fR \fBfalse\fR|\fBtrue\fR (Publish only)" 4
.IX Item "Retain false|true (Publish only)"
Controls whether the \s-1MQTT\s0 broker will retain (keep a copy of) the last message
sent to each topic and deliver it to new subscribers. Defaults to \fBfalse\fR.
.IP "\fBStoreRates\fR \fBtrue\fR|\fBfalse\fR (Publish only)" 4
.IX Item "StoreRates true|false (Publish only)"
Controls whether \f(CW\*(C`DERIVE\*(C'\fR and \f(CW\*(C`COUNTER\*(C'\fR metrics are converted to a \fIrate\fR
before sending. Defaults to \fBtrue\fR.
.IP "\fBCleanSession\fR \fBtrue\fR|\fBfalse\fR (Subscribe only)" 4
.IX Item "CleanSession true|false (Subscribe only)"
Controls whether the \s-1MQTT \s0\*(L"cleans\*(R" the session up after the subscriber
disconnects or if it maintains the subscriber's subscriptions and all messages
that arrive while the subscriber is disconnected. Defaults to \fBtrue\fR.
.IP "\fBTopic\fR \fITopicName\fR (Subscribe only)" 4
.IX Item "Topic TopicName (Subscribe only)"
Configures the topic(s) to subscribe to. You can use the single level \f(CW\*(C`+\*(C'\fR and
multi level \f(CW\*(C`#\*(C'\fR wildcards. Defaults to \fBcollectd/#\fR, i.e. all topics beneath
the \fBcollectd\fR branch.
.IP "\fBCACert\fR \fIfile\fR" 4
.IX Item "CACert file"
Path to the PEM-encoded \s-1CA\s0 certificate file. Setting this option enables \s-1TLS\s0
communication with the \s-1MQTT\s0 broker, and as such, \fBPort\fR should be the TLS-enabled
port of the \s-1MQTT\s0 broker.
A valid \s-1TLS\s0 configuration requires \fBCACert\fR, \fBCertificateFile\fR and \fBCertificateKeyFile\fR.
.IP "\fBCertificateFile\fR \fIfile\fR" 4
.IX Item "CertificateFile file"
Path to the PEM-encoded certificate file to use as client certificate when
connecting to the \s-1MQTT\s0 broker.
A valid \s-1TLS\s0 configuration requires \fBCACert\fR, \fBCertificateFile\fR and \fBCertificateKeyFile\fR.
.IP "\fBCertificateKeyFile\fR \fIfile\fR" 4
.IX Item "CertificateKeyFile file"
Path to the unencrypted PEM-encoded key file corresponding to \fBCertificateFile\fR.
A valid \s-1TLS\s0 configuration requires \fBCACert\fR, \fBCertificateFile\fR and \fBCertificateKeyFile\fR.
.IP "\fBTLSProtocol\fR \fIprotocol\fR" 4
.IX Item "TLSProtocol protocol"
If configured, this specifies the string protocol version (e.g. \f(CW\*(C`tlsv1\*(C'\fR,
\&\f(CW\*(C`tlsv1.2\*(C'\fR) to use for the \s-1TLS\s0 connection to the broker. If not set a default
version is used which depends on the version of OpenSSL the Mosquitto library
was linked against.
.IP "\fBCipherSuite\fR \fIciphersuite\fR" 4
.IX Item "CipherSuite ciphersuite"
A string describing the ciphers available for use. See \fIciphers\fR\|(1) and the
\&\f(CW\*(C`openssl ciphers\*(C'\fR utility for more information. If unset, the default ciphers
will be used.
.ie n .SS "Plugin ""mysql"""
.el .SS "Plugin \f(CWmysql\fP"
.IX Subsection "Plugin mysql"
The \f(CW\*(C`mysql plugin\*(C'\fR requires \fBmysqlclient\fR to be installed. It connects to
one or more databases when started and keeps the connection up as long as
possible. When the connection is interrupted for whatever reason it will try
to re-connect. The plugin will complain loudly in case anything goes wrong.
.PP
This plugin issues the MySQL \f(CW\*(C`SHOW STATUS\*(C'\fR / \f(CW\*(C`SHOW GLOBAL STATUS\*(C'\fR command
and collects information about MySQL network traffic, executed statements,
requests, the query cache and threads by evaluating the
\&\f(CW\*(C`Bytes_{received,sent}\*(C'\fR, \f(CW\*(C`Com_*\*(C'\fR, \f(CW\*(C`Handler_*\*(C'\fR, \f(CW\*(C`Qcache_*\*(C'\fR and \f(CW\*(C`Threads_*\*(C'\fR
return values. Please refer to the \fBMySQL reference manual\fR, \fI5.1.6. Server
Status Variables\fR for an explanation of these values.
.PP
Optionally, master and slave statistics may be collected in a MySQL
replication setup. In that case, information about the synchronization state
of the nodes are collected by evaluating the \f(CW\*(C`Position\*(C'\fR return value of the
\&\f(CW\*(C`SHOW MASTER STATUS\*(C'\fR command and the \f(CW\*(C`Seconds_Behind_Master\*(C'\fR,
\&\f(CW\*(C`Read_Master_Log_Pos\*(C'\fR and \f(CW\*(C`Exec_Master_Log_Pos\*(C'\fR return values of the
\&\f(CW\*(C`SHOW SLAVE STATUS\*(C'\fR command. See the \fBMySQL reference manual\fR,
\&\fI12.5.5.21 \s-1SHOW MASTER STATUS\s0 Syntax\fR and
\&\fI12.5.5.31 \s-1SHOW SLAVE STATUS\s0 Syntax\fR for details.
.PP
Synopsis:
.PP
.Vb 10
\&
\&
\& Host "hostname"
\& User "username"
\& Password "password"
\& Port "3306"
\& MasterStats true
\& ConnectTimeout 10
\& SSLKey "/path/to/key.pem"
\& SSLCert "/path/to/cert.pem"
\& SSLCA "/path/to/ca.pem"
\& SSLCAPath "/path/to/cas/"
\& SSLCipher "DHE\-RSA\-AES256\-SHA"
\&
\&
\&
\& Alias "squeeze"
\& Host "localhost"
\& Socket "/var/run/mysql/mysqld.sock"
\& SlaveStats true
\& SlaveNotifications true
\&
\&
\&
\& Alias "galera"
\& Host "localhost"
\& Socket "/var/run/mysql/mysqld.sock"
\& WsrepStats true
\&
\&
.Ve
.PP
A \fBDatabase\fR block defines one connection to a MySQL database. It accepts a
single argument which specifies the name of the database. None of the other
options are required. MySQL will use default values as documented in the
\&\*(L"\fImysql_real_connect()\fR\*(R" and \*(L"\fImysql_ssl_set()\fR\*(R" sections in the
\&\fBMySQL reference manual\fR.
.IP "\fBAlias\fR \fIAlias\fR" 4
.IX Item "Alias Alias"
Alias to use as sender instead of hostname when reporting. This may be useful
when having cryptic hostnames.
.IP "\fBHost\fR \fIHostname\fR" 4
.IX Item "Host Hostname"
Hostname of the database server. Defaults to \fBlocalhost\fR.
.IP "\fBUser\fR \fIUsername\fR" 4
.IX Item "User Username"
Username to use when connecting to the database. The user does not have to be
granted any privileges (which is synonym to granting the \f(CW\*(C`USAGE\*(C'\fR privilege),
unless you want to collectd replication statistics (see \fBMasterStats\fR and
\&\fBSlaveStats\fR below). In this case, the user needs the \f(CW\*(C`REPLICATION CLIENT\*(C'\fR
(or \f(CW\*(C`SUPER\*(C'\fR) privileges. Else, any existing MySQL user will do.
.IP "\fBPassword\fR \fIPassword\fR" 4
.IX Item "Password Password"
Password needed to log into the database.
.IP "\fBDatabase\fR \fIDatabase\fR" 4
.IX Item "Database Database"
Select this database. Defaults to \fIno database\fR which is a perfectly reasonable
option for what this plugin does.
.IP "\fBPort\fR \fIPort\fR" 4
.IX Item "Port Port"
TCP-port to connect to. The port must be specified in its numeric form, but it
must be passed as a string nonetheless. For example:
.Sp
.Vb 1
\& Port "3306"
.Ve
.Sp
If \fBHost\fR is set to \fBlocalhost\fR (the default), this setting has no effect.
See the documentation for the \f(CW\*(C`mysql_real_connect\*(C'\fR function for details.
.IP "\fBSocket\fR \fISocket\fR" 4
.IX Item "Socket Socket"
Specifies the path to the \s-1UNIX\s0 domain socket of the MySQL server. This option
only has any effect, if \fBHost\fR is set to \fBlocalhost\fR (the default).
Otherwise, use the \fBPort\fR option above. See the documentation for the
\&\f(CW\*(C`mysql_real_connect\*(C'\fR function for details.
.IP "\fBInnodbStats\fR \fItrue|false\fR" 4
.IX Item "InnodbStats true|false"
If enabled, metrics about the InnoDB storage engine are collected.
Disabled by default.
.IP "\fBMasterStats\fR \fItrue|false\fR" 4
.IX Item "MasterStats true|false"
.PD 0
.IP "\fBSlaveStats\fR \fItrue|false\fR" 4
.IX Item "SlaveStats true|false"
.PD
Enable the collection of master / slave statistics in a replication setup. In
order to be able to get access to these statistics, the user needs special
privileges. See the \fBUser\fR documentation above. Defaults to \fBfalse\fR.
.IP "\fBSlaveNotifications\fR \fItrue|false\fR" 4
.IX Item "SlaveNotifications true|false"
If enabled, the plugin sends a notification if the replication slave I/O and /
or \s-1SQL\s0 threads are not running. Defaults to \fBfalse\fR.
.IP "\fBWsrepStats\fR \fItrue|false\fR" 4
.IX Item "WsrepStats true|false"
.Vb 3
\& Enable the collection of wsrep plugin statistics, used in Master\-Master
\& replication setups like in MySQL Galera/Percona XtraDB Cluster.
\& User needs only privileges to execute \*(AqSHOW GLOBAL STATUS\*(Aq
.Ve
.IP "\fBConnectTimeout\fR \fISeconds\fR" 4
.IX Item "ConnectTimeout Seconds"
Sets the connect timeout for the MySQL client.
.IP "\fBSSLKey\fR \fIPath\fR" 4
.IX Item "SSLKey Path"
If provided, the X509 key in \s-1PEM\s0 format.
.IP "\fBSSLCert\fR \fIPath\fR" 4
.IX Item "SSLCert Path"
If provided, the X509 cert in \s-1PEM\s0 format.
.IP "\fB\s-1SSLCA\s0\fR \fIPath\fR" 4
.IX Item "SSLCA Path"
If provided, the \s-1CA\s0 file in \s-1PEM\s0 format (check OpenSSL docs).
.IP "\fBSSLCAPath\fR \fIPath\fR" 4
.IX Item "SSLCAPath Path"
If provided, the \s-1CA\s0 directory (check OpenSSL docs).
.IP "\fBSSLCipher\fR \fIString\fR" 4
.IX Item "SSLCipher String"
If provided, the \s-1SSL\s0 cipher to use.
.ie n .SS "Plugin ""netapp"""
.el .SS "Plugin \f(CWnetapp\fP"
.IX Subsection "Plugin netapp"
The netapp plugin can collect various performance and capacity information
from a NetApp filer using the NetApp \s-1API.\s0
.PP
Please note that NetApp has a wide line of products and a lot of different
software versions for each of these products. This plugin was developed for a
NetApp \s-1FAS3040\s0 running OnTap 7.2.3P8 and tested on \s-1FAS2050 7.3.1.1L1,
FAS3140 7.2.5.1\s0 and \s-1FAS3020 7.2.4P9.\s0 It \fIshould\fR work for most combinations of
model and software version but it is very hard to test this.
If you have used this plugin with other models and/or software version, feel
free to send us a mail to tell us about the results, even if it's just a short
\&\*(L"It works\*(R".
.PP
To collect these data collectd will log in to the NetApp via \s-1HTTP\s0(S) and \s-1HTTP\s0
basic authentication.
.PP
\&\fBDo not use a regular user for this!\fR Create a special collectd user with just
the minimum of capabilities needed. The user only needs the \*(L"login-http-admin\*(R"
capability as well as a few more depending on which data will be collected.
Required capabilities are documented below.
.PP
\fISynopsis\fR
.IX Subsection "Synopsis"
.PP
.Vb 8
\&
\&
\& Protocol "https"
\& Address "10.0.0.1"
\& Port 443
\& User "username"
\& Password "aef4Aebe"
\& Interval 30
\&
\&
\& Interval 30
\& GetNameCache true
\& GetDirCache true
\& GetBufferCache true
\& GetInodeCache true
\&
\&
\&
\& Interval 30
\& GetBusy true
\&
\&
\&
\& Interval 30
\& GetIO "volume0"
\& IgnoreSelectedIO false
\& GetOps "volume0"
\& IgnoreSelectedOps false
\& GetLatency "volume0"
\& IgnoreSelectedLatency false
\&
\&
\&
\& Interval 30
\& GetCapacity "vol0"
\& GetCapacity "vol1"
\& IgnoreSelectedCapacity false
\& GetSnapshot "vol1"
\& GetSnapshot "vol3"
\& IgnoreSelectedSnapshot false
\&
\&
\&
\& Interval 60
\&
\&
\&
\& Interval 30
\&
\&
\&
\& Interval 30
\& GetCPULoad true
\& GetInterfaces true
\& GetDiskOps true
\& GetDiskIO true
\&
\&
\&
\& Interval 60
\&
\& SnapVault true
\& # ...
\&
\&
\&
.Ve
.PP
The netapp plugin accepts the following configuration options:
.IP "\fBHost\fR \fIName\fR" 4
.IX Item "Host Name"
A host block defines one NetApp filer. It will appear in collectd with the name
you specify here which does not have to be its real name nor its hostname (see
the \fBAddress\fR option below).
.IP "\fBVFiler\fR \fIName\fR" 4
.IX Item "VFiler Name"
A \fBVFiler\fR block may only be used inside a host block. It accepts all the
same options as the \fBHost\fR block (except for cascaded \fBVFiler\fR blocks) and
will execute all NetApp \s-1API\s0 commands in the context of the specified
VFiler(R). It will appear in collectd with the name you specify here which
does not have to be its real name. The VFiler name may be specified using the
\&\fBVFilerName\fR option. If this is not specified, it will default to the name
you specify here.
.Sp
The VFiler block inherits all connection related settings from the surrounding
\&\fBHost\fR block (which appear before the \fBVFiler\fR block) but they may be
overwritten inside the \fBVFiler\fR block.
.Sp
This feature is useful, for example, when using a VFiler as SnapVault target
(supported since OnTap 8.1). In that case, the SnapVault statistics are not
available in the host filer (vfiler0) but only in the respective VFiler
context.
.IP "\fBProtocol\fR \fBhttpd\fR|\fBhttp\fR" 4
.IX Item "Protocol httpd|http"
The protocol collectd will use to query this host.
.Sp
Optional
.Sp
Type: string
.Sp
Default: https
.Sp
Valid options: http, https
.IP "\fBAddress\fR \fIAddress\fR" 4
.IX Item "Address Address"
The hostname or \s-1IP\s0 address of the host.
.Sp
Optional
.Sp
Type: string
.Sp
Default: The \*(L"host\*(R" block's name.
.IP "\fBPort\fR \fIPort\fR" 4
.IX Item "Port Port"
The \s-1TCP\s0 port to connect to on the host.
.Sp
Optional
.Sp
Type: integer
.Sp
Default: 80 for protocol \*(L"http\*(R", 443 for protocol \*(L"https\*(R"
.IP "\fBUser\fR \fIUser\fR" 4
.IX Item "User User"
.PD 0
.IP "\fBPassword\fR \fIPassword\fR" 4
.IX Item "Password Password"
.PD
The username and password to use to login to the NetApp.
.Sp
Mandatory
.Sp
Type: string
.IP "\fBVFilerName\fR \fIName\fR" 4
.IX Item "VFilerName Name"
The name of the VFiler in which context to execute \s-1API\s0 commands. If not
specified, the name provided to the \fBVFiler\fR block will be used instead.
.Sp
Optional
.Sp
Type: string
.Sp
Default: name of the \fBVFiler\fR block
.Sp
\&\fBNote:\fR This option may only be used inside \fBVFiler\fR blocks.
.IP "\fBInterval\fR \fIInterval\fR" 4
.IX Item "Interval Interval"
\&\fB\s-1TODO\s0\fR
.PP
The following options decide what kind of data will be collected. You can
either use them as a block and fine tune various parameters inside this block,
use them as a single statement to just accept all default values, or omit it to
not collect any data.
.PP
The following options are valid inside all blocks:
.IP "\fBInterval\fR \fISeconds\fR" 4
.IX Item "Interval Seconds"
Collect the respective statistics every \fISeconds\fR seconds. Defaults to the
host specific setting.
.PP
\fIThe System block\fR
.IX Subsection "The System block"
.PP
This will collect various performance data about the whole system.
.PP
\&\fBNote:\fR To get this data the collectd user needs the
\&\*(L"api-perf-object-get-instances\*(R" capability.
.IP "\fBInterval\fR \fISeconds\fR" 4
.IX Item "Interval Seconds"
Collect disk statistics every \fISeconds\fR seconds.
.IP "\fBGetCPULoad\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "GetCPULoad true|false"
If you set this option to true the current \s-1CPU\s0 usage will be read. This will be
the average usage between all CPUs in your NetApp without any information about
individual CPUs.
.Sp
\&\fBNote:\fR These are the same values that the NetApp \s-1CLI\s0 command \*(L"sysstat\*(R"
returns in the \*(L"\s-1CPU\*(R"\s0 field.
.Sp
Optional
.Sp
Type: boolean
.Sp
Default: true
.Sp
Result: Two value lists of type \*(L"cpu\*(R", and type instances \*(L"idle\*(R" and \*(L"system\*(R".
.IP "\fBGetInterfaces\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "GetInterfaces true|false"
If you set this option to true the current traffic of the network interfaces
will be read. This will be the total traffic over all interfaces of your NetApp
without any information about individual interfaces.
.Sp
\&\fBNote:\fR This is the same values that the NetApp \s-1CLI\s0 command \*(L"sysstat\*(R" returns
in the \*(L"Net kB/s\*(R" field.
.Sp
\&\fBOr is it?\fR
.Sp
Optional
.Sp
Type: boolean
.Sp
Default: true
.Sp
Result: One value list of type \*(L"if_octects\*(R".
.IP "\fBGetDiskIO\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "GetDiskIO true|false"
If you set this option to true the current \s-1IO\s0 throughput will be read. This
will be the total \s-1IO\s0 of your NetApp without any information about individual
disks, volumes or aggregates.
.Sp
\&\fBNote:\fR This is the same values that the NetApp \s-1CLI\s0 command \*(L"sysstat\*(R" returns
in the \*(L"Disk\ kB/s\*(R" field.
.Sp
Optional
.Sp
Type: boolean
.Sp
Default: true
.Sp
Result: One value list of type \*(L"disk_octets\*(R".
.IP "\fBGetDiskOps\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "GetDiskOps true|false"
If you set this option to true the current number of \s-1HTTP, NFS, CIFS, FCP,\s0
iSCSI, etc. operations will be read. This will be the total number of
operations on your NetApp without any information about individual volumes or
aggregates.
.Sp
\&\fBNote:\fR These are the same values that the NetApp \s-1CLI\s0 command \*(L"sysstat\*(R"
returns in the \*(L"\s-1NFS\*(R", \*(L"CIFS\*(R", \*(L"HTTP\*(R", \*(L"FCP\*(R"\s0 and \*(L"iSCSI\*(R" fields.
.Sp
Optional
.Sp
Type: boolean
.Sp
Default: true
.Sp
Result: A variable number of value lists of type \*(L"disk_ops_complex\*(R". Each type
of operation will result in one value list with the name of the operation as
type instance.
.PP
\fIThe \s-1WAFL\s0 block\fR
.IX Subsection "The WAFL block"
.PP
This will collect various performance data about the \s-1WAFL\s0 file system. At the
moment this just means cache performance.
.PP
\&\fBNote:\fR To get this data the collectd user needs the
\&\*(L"api-perf-object-get-instances\*(R" capability.
.PP
\&\fBNote:\fR The interface to get these values is classified as \*(L"Diagnostics\*(R" by
NetApp. This means that it is not guaranteed to be stable even between minor
releases.
.IP "\fBInterval\fR \fISeconds\fR" 4
.IX Item "Interval Seconds"
Collect disk statistics every \fISeconds\fR seconds.
.IP "\fBGetNameCache\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "GetNameCache true|false"
Optional
.Sp
Type: boolean
.Sp
Default: true
.Sp
Result: One value list of type \*(L"cache_ratio\*(R" and type instance
\&\*(L"name_cache_hit\*(R".
.IP "\fBGetDirCache\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "GetDirCache true|false"
Optional
.Sp
Type: boolean
.Sp
Default: true
.Sp
Result: One value list of type \*(L"cache_ratio\*(R" and type instance \*(L"find_dir_hit\*(R".
.IP "\fBGetInodeCache\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "GetInodeCache true|false"
Optional
.Sp
Type: boolean
.Sp
Default: true
.Sp
Result: One value list of type \*(L"cache_ratio\*(R" and type instance
\&\*(L"inode_cache_hit\*(R".
.IP "\fBGetBufferCache\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "GetBufferCache true|false"
\&\fBNote:\fR This is the same value that the NetApp \s-1CLI\s0 command \*(L"sysstat\*(R" returns
in the \*(L"Cache hit\*(R" field.
.Sp
Optional
.Sp
Type: boolean
.Sp
Default: true
.Sp
Result: One value list of type \*(L"cache_ratio\*(R" and type instance \*(L"buf_hash_hit\*(R".
.PP
\fIThe Disks block\fR
.IX Subsection "The Disks block"
.PP
This will collect performance data about the individual disks in the NetApp.
.PP
\&\fBNote:\fR To get this data the collectd user needs the
\&\*(L"api-perf-object-get-instances\*(R" capability.
.IP "\fBInterval\fR \fISeconds\fR" 4
.IX Item "Interval Seconds"
Collect disk statistics every \fISeconds\fR seconds.
.IP "\fBGetBusy\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "GetBusy true|false"
If you set this option to true the busy time of all disks will be calculated
and the value of the busiest disk in the system will be written.
.Sp
\&\fBNote:\fR This is the same values that the NetApp \s-1CLI\s0 command \*(L"sysstat\*(R" returns
in the \*(L"Disk util\*(R" field. Probably.
.Sp
Optional
.Sp
Type: boolean
.Sp
Default: true
.Sp
Result: One value list of type \*(L"percent\*(R" and type instance \*(L"disk_busy\*(R".
.PP
\fIThe VolumePerf block\fR
.IX Subsection "The VolumePerf block"
.PP
This will collect various performance data about the individual volumes.
.PP
You can select which data to collect about which volume using the following
options. They follow the standard ignorelist semantic.
.PP
\&\fBNote:\fR To get this data the collectd user needs the
\&\fIapi-perf-object-get-instances\fR capability.
.IP "\fBInterval\fR \fISeconds\fR" 4
.IX Item "Interval Seconds"
Collect volume performance data every \fISeconds\fR seconds.
.IP "\fBGetIO\fR \fIVolume\fR" 4
.IX Item "GetIO Volume"
.PD 0
.IP "\fBGetOps\fR \fIVolume\fR" 4
.IX Item "GetOps Volume"
.IP "\fBGetLatency\fR \fIVolume\fR" 4
.IX Item "GetLatency Volume"
.PD
Select the given volume for \s-1IO,\s0 operations or latency statistics collection.
The argument is the name of the volume without the \f(CW\*(C`/vol/\*(C'\fR prefix.
.Sp
Since the standard ignorelist functionality is used here, you can use a string
starting and ending with a slash to specify regular expression matching: To
match the volumes \*(L"vol0\*(R", \*(L"vol2\*(R" and \*(L"vol7\*(R", you can use this regular
expression:
.Sp
.Vb 1
\& GetIO "/^vol[027]$/"
.Ve
.Sp
If no regular expression is specified, an exact match is required. Both,
regular and exact matching are case sensitive.
.Sp
If no volume was specified at all for either of the three options, that data
will be collected for all available volumes.
.IP "\fBIgnoreSelectedIO\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "IgnoreSelectedIO true|false"
.PD 0
.IP "\fBIgnoreSelectedOps\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "IgnoreSelectedOps true|false"
.IP "\fBIgnoreSelectedLatency\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "IgnoreSelectedLatency true|false"
.PD
When set to \fBtrue\fR, the volumes selected for \s-1IO,\s0 operations or latency
statistics collection will be ignored and the data will be collected for all
other volumes.
.Sp
When set to \fBfalse\fR, data will only be collected for the specified volumes and
all other volumes will be ignored.
.Sp
If no volumes have been specified with the above \fBGet*\fR options, all volumes
will be collected regardless of the \fBIgnoreSelected*\fR option.
.Sp
Defaults to \fBfalse\fR
.PP
\fIThe VolumeUsage block\fR
.IX Subsection "The VolumeUsage block"
.PP
This will collect capacity data about the individual volumes.
.PP
\&\fBNote:\fR To get this data the collectd user needs the \fIapi-volume-list-info\fR
capability.
.IP "\fBInterval\fR \fISeconds\fR" 4
.IX Item "Interval Seconds"
Collect volume usage statistics every \fISeconds\fR seconds.
.IP "\fBGetCapacity\fR \fIVolumeName\fR" 4
.IX Item "GetCapacity VolumeName"
The current capacity of the volume will be collected. This will result in two
to four value lists, depending on the configuration of the volume. All data
sources are of type \*(L"df_complex\*(R" with the name of the volume as
plugin_instance.
.Sp
There will be type_instances \*(L"used\*(R" and \*(L"free\*(R" for the number of used and
available bytes on the volume. If the volume has some space reserved for
snapshots, a type_instance \*(L"snap_reserved\*(R" will be available. If the volume
has \s-1SIS\s0 enabled, a type_instance \*(L"sis_saved\*(R" will be available. This is the
number of bytes saved by the \s-1SIS\s0 feature.
.Sp
\&\fBNote:\fR The current NetApp \s-1API\s0 has a bug that results in this value being
reported as a 32\ bit number. This plugin tries to guess the correct
number which works most of the time. If you see strange values here, bug
NetApp support to fix this.
.Sp
Repeat this option to specify multiple volumes.
.IP "\fBIgnoreSelectedCapacity\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "IgnoreSelectedCapacity true|false"
Specify whether to collect only the volumes selected by the \fBGetCapacity\fR
option or to ignore those volumes. \fBIgnoreSelectedCapacity\fR defaults to
\&\fBfalse\fR. However, if no \fBGetCapacity\fR option is specified at all, all
capacities will be selected anyway.
.IP "\fBGetSnapshot\fR \fIVolumeName\fR" 4
.IX Item "GetSnapshot VolumeName"
Select volumes from which to collect snapshot information.
.Sp
Usually, the space used for snapshots is included in the space reported as
\&\*(L"used\*(R". If snapshot information is collected as well, the space used for
snapshots is subtracted from the used space.
.Sp
To make things even more interesting, it is possible to reserve space to be
used for snapshots. If the space required for snapshots is less than that
reserved space, there is \*(L"reserved free\*(R" and \*(L"reserved used\*(R" space in addition
to \*(L"free\*(R" and \*(L"used\*(R". If the space required for snapshots exceeds the reserved
space, that part allocated in the normal space is subtracted from the \*(L"used\*(R"
space again.
.Sp
Repeat this option to specify multiple volumes.
.IP "\fBIgnoreSelectedSnapshot\fR" 4
.IX Item "IgnoreSelectedSnapshot"
Specify whether to collect only the volumes selected by the \fBGetSnapshot\fR
option or to ignore those volumes. \fBIgnoreSelectedSnapshot\fR defaults to
\&\fBfalse\fR. However, if no \fBGetSnapshot\fR option is specified at all, all
capacities will be selected anyway.
.PP
\fIThe Quota block\fR
.IX Subsection "The Quota block"
.PP
This will collect (tree) quota statistics (used disk space and number of used
files). This mechanism is useful to get usage information for single qtrees.
In case the quotas are not used for any other purpose, an entry similar to the
following in \f(CW\*(C`/etc/quotas\*(C'\fR would be sufficient:
.PP
.Vb 1
\& /vol/volA/some_qtree tree \- \- \- \- \-
.Ve
.PP
After adding the entry, issue \f(CW\*(C`quota on \-w volA\*(C'\fR on the NetApp filer.
.IP "\fBInterval\fR \fISeconds\fR" 4
.IX Item "Interval Seconds"
Collect SnapVault(R) statistics every \fISeconds\fR seconds.
.PP
\fIThe SnapVault block\fR
.IX Subsection "The SnapVault block"
.PP
This will collect statistics about the time and traffic of SnapVault(R)
transfers.
.IP "\fBInterval\fR \fISeconds\fR" 4
.IX Item "Interval Seconds"
Collect SnapVault(R) statistics every \fISeconds\fR seconds.
.ie n .SS "Plugin ""netlink"""
.el .SS "Plugin \f(CWnetlink\fP"
.IX Subsection "Plugin netlink"
The \f(CW\*(C`netlink\*(C'\fR plugin uses a netlink socket to query the Linux kernel about
statistics of various interface and routing aspects.
.IP "\fBInterface\fR \fIInterface\fR" 4
.IX Item "Interface Interface"
.PD 0
.IP "\fBVerboseInterface\fR \fIInterface\fR" 4
.IX Item "VerboseInterface Interface"
.PD
Instruct the plugin to collect interface statistics. This is basically the same
as the statistics provided by the \f(CW\*(C`interface\*(C'\fR plugin (see above) but
potentially much more detailed.
.Sp
When configuring with \fBInterface\fR only the basic statistics will be collected,
namely octets, packets, and errors. These statistics are collected by
the \f(CW\*(C`interface\*(C'\fR plugin, too, so using both at the same time is no benefit.
.Sp
When configured with \fBVerboseInterface\fR all counters \fBexcept\fR the basic ones,
so that no data needs to be collected twice if you use the \f(CW\*(C`interface\*(C'\fR plugin.
This includes dropped packets, received multicast packets, collisions and a
whole zoo of differentiated \s-1RX\s0 and \s-1TX\s0 errors. You can try the following command
to get an idea of what awaits you:
.Sp
.Vb 1
\& ip \-s \-s link list
.Ve
.Sp
If \fIInterface\fR is \fBAll\fR, all interfaces will be selected.
.IP "\fBQDisc\fR \fIInterface\fR [\fIQDisc\fR]" 4
.IX Item "QDisc Interface [QDisc]"
.PD 0
.IP "\fBClass\fR \fIInterface\fR [\fIClass\fR]" 4
.IX Item "Class Interface [Class]"
.IP "\fBFilter\fR \fIInterface\fR [\fIFilter\fR]" 4
.IX Item "Filter Interface [Filter]"
.PD
Collect the octets and packets that pass a certain qdisc, class or filter.
.Sp
QDiscs and classes are identified by their type and handle (or classid).
Filters don't necessarily have a handle, therefore the parent's handle is used.
The notation used in collectd differs from that used in \fItc\fR\|(1) in that it
doesn't skip the major or minor number if it's zero and doesn't print special
ids by their name. So, for example, a qdisc may be identified by
\&\f(CW\*(C`pfifo_fast\-1:0\*(C'\fR even though the minor number of \fBall\fR qdiscs is zero and
thus not displayed by \fItc\fR\|(1).
.Sp
If \fBQDisc\fR, \fBClass\fR, or \fBFilter\fR is given without the second argument,
i.\ .e. without an identifier, all qdiscs, classes, or filters that are
associated with that interface will be collected.
.Sp
Since a filter itself doesn't necessarily have a handle, the parent's handle is
used. This may lead to problems when more than one filter is attached to a
qdisc or class. This isn't nice, but we don't know how this could be done any
better. If you have a idea, please don't hesitate to tell us.
.Sp
As with the \fBInterface\fR option you can specify \fBAll\fR as the interface,
meaning all interfaces.
.Sp
Here are some examples to help you understand the above text more easily:
.Sp
.Vb 7
\&
\& VerboseInterface "All"
\& QDisc "eth0" "pfifo_fast\-1:0"
\& QDisc "ppp0"
\& Class "ppp0" "htb\-1:10"
\& Filter "ppp0" "u32\-1:0"
\&
.Ve
.IP "\fBIgnoreSelected\fR" 4
.IX Item "IgnoreSelected"
The behavior is the same as with all other similar plugins: If nothing is
selected at all, everything is collected. If some things are selected using the
options described above, only these statistics are collected. If you set
\&\fBIgnoreSelected\fR to \fBtrue\fR, this behavior is inverted, i.\ e. the
specified statistics will not be collected.
.ie n .SS "Plugin ""network"""
.el .SS "Plugin \f(CWnetwork\fP"
.IX Subsection "Plugin network"
The Network plugin sends data to a remote instance of collectd, receives data
from a remote instance, or both at the same time. Data which has been received
from the network is usually not transmitted again, but this can be activated, see
the \fBForward\fR option below.
.PP
The default IPv6 multicast group is \f(CW\*(C`ff18::efc0:4a42\*(C'\fR. The default IPv4
multicast group is \f(CW239.192.74.66\fR. The default \fI\s-1UDP\s0\fR port is \fB25826\fR.
.PP
Both, \fBServer\fR and \fBListen\fR can be used as single option or as block. When
used as block, given options are valid for this socket only. The following
example will export the metrics twice: Once to an \*(L"internal\*(R" server (without
encryption and signing) and one to an external server (with cryptographic
signature):
.PP
.Vb 4
\&
\& # Export to an internal server
\& # (demonstrates usage without additional options)
\& Server "collectd.internal.tld"
\&
\& # Export to an external server
\& # (demonstrates usage with signature options)
\&
\& SecurityLevel "sign"
\& Username "myhostname"
\& Password "ohl0eQue"
\&
\&
.Ve
.IP "\fB\fR" 4
.IX Item ""
The \fBServer\fR statement/block sets the server to send datagrams to. The
statement may occur multiple times to send each datagram to multiple
destinations.
.Sp
The argument \fIHost\fR may be a hostname, an IPv4 address or an IPv6 address. The
optional second argument specifies a port number or a service name. If not
given, the default, \fB25826\fR, is used.
.Sp
The following options are recognized within \fBServer\fR blocks:
.RS 4
.IP "\fBSecurityLevel\fR \fBEncrypt\fR|\fBSign\fR|\fBNone\fR" 4
.IX Item "SecurityLevel Encrypt|Sign|None"
Set the security you require for network communication. When the security level
has been set to \fBEncrypt\fR, data sent over the network will be encrypted using
\&\fI\s-1AES\-256\s0\fR. The integrity of encrypted packets is ensured using \fI\s-1SHA\-1\s0\fR. When
set to \fBSign\fR, transmitted data is signed using the \fI\s-1HMAC\-SHA\-256\s0\fR message
authentication code. When set to \fBNone\fR, data is sent without any security.
.Sp
This feature is only available if the \fInetwork\fR plugin was linked with
\&\fIlibgcrypt\fR.
.IP "\fBUsername\fR \fIUsername\fR" 4
.IX Item "Username Username"
Sets the username to transmit. This is used by the server to lookup the
password. See \fBAuthFile\fR below. All security levels except \fBNone\fR require
this setting.
.Sp
This feature is only available if the \fInetwork\fR plugin was linked with
\&\fIlibgcrypt\fR.
.IP "\fBPassword\fR \fIPassword\fR" 4
.IX Item "Password Password"
Sets a password (shared secret) for this socket. All security levels except
\&\fBNone\fR require this setting.
.Sp
This feature is only available if the \fInetwork\fR plugin was linked with
\&\fIlibgcrypt\fR.
.IP "\fBInterface\fR \fIInterface name\fR" 4
.IX Item "Interface Interface name"
Set the outgoing interface for \s-1IP\s0 packets. This applies at least
to IPv6 packets and if possible to IPv4. If this option is not applicable,
undefined or a non-existent interface name is specified, the default
behavior is to let the kernel choose the appropriate interface. Be warned
that the manual selection of an interface for unicast traffic is only
necessary in rare cases.
.IP "\fBResolveInterval\fR \fISeconds\fR" 4
.IX Item "ResolveInterval Seconds"
Sets the interval at which to re-resolve the \s-1DNS\s0 for the \fIHost\fR. This is
useful to force a regular \s-1DNS\s0 lookup to support a high availability setup. If
not specified, re-resolves are never attempted.
.RE
.RS 4
.RE
.IP "\fB\fR" 4
.IX Item ""
The \fBListen\fR statement sets the interfaces to bind to. When multiple
statements are found the daemon will bind to multiple interfaces.
.Sp
The argument \fIHost\fR may be a hostname, an IPv4 address or an IPv6 address. If
the argument is a multicast address the daemon will join that multicast group.
The optional second argument specifies a port number or a service name. If not
given, the default, \fB25826\fR, is used.
.Sp
The following options are recognized within \f(CW\*(C`\*(C'\fR blocks:
.RS 4
.IP "\fBSecurityLevel\fR \fBEncrypt\fR|\fBSign\fR|\fBNone\fR" 4
.IX Item "SecurityLevel Encrypt|Sign|None"
Set the security you require for network communication. When the security level
has been set to \fBEncrypt\fR, only encrypted data will be accepted. The integrity
of encrypted packets is ensured using \fI\s-1SHA\-1\s0\fR. When set to \fBSign\fR, only
signed and encrypted data is accepted. When set to \fBNone\fR, all data will be
accepted. If an \fBAuthFile\fR option was given (see below), encrypted data is
decrypted if possible.
.Sp
This feature is only available if the \fInetwork\fR plugin was linked with
\&\fIlibgcrypt\fR.
.IP "\fBAuthFile\fR \fIFilename\fR" 4
.IX Item "AuthFile Filename"
Sets a file in which usernames are mapped to passwords. These passwords are
used to verify signatures and to decrypt encrypted network packets. If
\&\fBSecurityLevel\fR is set to \fBNone\fR, this is optional. If given, signed data is
verified and encrypted packets are decrypted. Otherwise, signed data is
accepted without checking the signature and encrypted data cannot be decrypted.
For the other security levels this option is mandatory.
.Sp
The file format is very simple: Each line consists of a username followed by a
colon and any number of spaces followed by the password. To demonstrate, an
example file could look like this:
.Sp
.Vb 2
\& user0: foo
\& user1: bar
.Ve
.Sp
Each time a packet is received, the modification time of the file is checked
using \fIstat\fR\|(2). If the file has been changed, the contents is re-read. While
the file is being read, it is locked using \fIfcntl\fR\|(2).
.IP "\fBInterface\fR \fIInterface name\fR" 4
.IX Item "Interface Interface name"
Set the incoming interface for \s-1IP\s0 packets explicitly. This applies at least
to IPv6 packets and if possible to IPv4. If this option is not applicable,
undefined or a non-existent interface name is specified, the default
behavior is, to let the kernel choose the appropriate interface. Thus incoming
traffic gets only accepted, if it arrives on the given interface.
.RE
.RS 4
.RE
.IP "\fBTimeToLive\fR \fI1\-255\fR" 4
.IX Item "TimeToLive 1-255"
Set the time-to-live of sent packets. This applies to all, unicast and
multicast, and IPv4 and IPv6 packets. The default is to not change this value.
That means that multicast packets will be sent with a \s-1TTL\s0 of \f(CW1\fR (one) on most
operating systems.
.IP "\fBMaxPacketSize\fR \fI1024\-65535\fR" 4
.IX Item "MaxPacketSize 1024-65535"
Set the maximum size for datagrams received over the network. Packets larger
than this will be truncated. Defaults to 1452\ bytes, which is the maximum
payload size that can be transmitted in one Ethernet frame using IPv6\ /
\&\s-1UDP.\s0
.Sp
On the server side, this limit should be set to the largest value used on
\&\fIany\fR client. Likewise, the value on the client must not be larger than the
value on the server, or data will be lost.
.Sp
\&\fBCompatibility:\fR Versions prior to \fIversion\ 4.8\fR used a fixed sized
buffer of 1024\ bytes. Versions \fI4.8\fR, \fI4.9\fR and \fI4.10\fR used a default
value of 1024\ bytes to avoid problems when sending data to an older
server.
.IP "\fBForward\fR \fItrue|false\fR" 4
.IX Item "Forward true|false"
If set to \fItrue\fR, write packets that were received via the network plugin to
the sending sockets. This should only be activated when the \fBListen\fR\- and
\&\fBServer\fR\-statements differ. Otherwise packets may be send multiple times to
the same multicast group. While this results in more network traffic than
necessary it's not a huge problem since the plugin has a duplicate detection,
so the values will not loop.
.IP "\fBReportStats\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "ReportStats true|false"
The network plugin cannot only receive and send statistics, it can also create
statistics about itself. Collectd data included the number of received and
sent octets and packets, the length of the receive queue and the number of
values handled. When set to \fBtrue\fR, the \fINetwork plugin\fR will make these
statistics available. Defaults to \fBfalse\fR.
.ie n .SS "Plugin ""nginx"""
.el .SS "Plugin \f(CWnginx\fP"
.IX Subsection "Plugin nginx"
This plugin collects the number of connections and requests handled by the
\&\f(CW\*(C`nginx daemon\*(C'\fR (speak: engine\ X), a \s-1HTTP\s0 and mail server/proxy. It
queries the page provided by the \f(CW\*(C`ngx_http_stub_status_module\*(C'\fR module, which
isn't compiled by default. Please refer to
for more information on
how to compile and configure nginx and this module.
.PP
The following options are accepted by the \f(CW\*(C`nginx plugin\*(C'\fR:
.IP "\fB\s-1URL\s0\fR \fIhttp://host/nginx_status\fR" 4
.IX Item "URL http://host/nginx_status"
Sets the \s-1URL\s0 of the \f(CW\*(C`ngx_http_stub_status_module\*(C'\fR output.
.IP "\fBUser\fR \fIUsername\fR" 4
.IX Item "User Username"
Optional user name needed for authentication.
.IP "\fBPassword\fR \fIPassword\fR" 4
.IX Item "Password Password"
Optional password needed for authentication.
.IP "\fBVerifyPeer\fR \fBtrue|false\fR" 4
.IX Item "VerifyPeer true|false"
Enable or disable peer \s-1SSL\s0 certificate verification. See
for details. Enabled by default.
.IP "\fBVerifyHost\fR \fBtrue|false\fR" 4
.IX Item "VerifyHost true|false"
Enable or disable peer host name verification. If enabled, the plugin checks
if the \f(CW\*(C`Common Name\*(C'\fR or a \f(CW\*(C`Subject Alternate Name\*(C'\fR field of the \s-1SSL\s0
certificate matches the host name provided by the \fB\s-1URL\s0\fR option. If this
identity check fails, the connection is aborted. Obviously, only works when
connecting to a \s-1SSL\s0 enabled server. Enabled by default.
.IP "\fBCACert\fR \fIFile\fR" 4
.IX Item "CACert File"
File that holds one or more \s-1SSL\s0 certificates. If you want to use \s-1HTTPS\s0 you will
possibly need this option. What \s-1CA\s0 certificates come bundled with \f(CW\*(C`libcurl\*(C'\fR
and are checked by default depends on the distribution you use.
.IP "\fBTimeout\fR \fIMilliseconds\fR" 4
.IX Item "Timeout Milliseconds"
The \fBTimeout\fR option sets the overall timeout for \s-1HTTP\s0 requests to \fB\s-1URL\s0\fR, in
milliseconds. By default, the configured \fBInterval\fR is used to set the
timeout.
.ie n .SS "Plugin ""notify_desktop"""
.el .SS "Plugin \f(CWnotify_desktop\fP"
.IX Subsection "Plugin notify_desktop"
This plugin sends a desktop notification to a notification daemon, as defined
in the Desktop Notification Specification. To actually display the
notifications, \fBnotification-daemon\fR is required and \fBcollectd\fR has to be
able to access the X server (i.\ e., the \f(CW\*(C`DISPLAY\*(C'\fR and \f(CW\*(C`XAUTHORITY\*(C'\fR
environment variables have to be set correctly) and the D\-Bus message bus.
.PP
The Desktop Notification Specification can be found at
.
.IP "\fBOkayTimeout\fR \fItimeout\fR" 4
.IX Item "OkayTimeout timeout"
.PD 0
.IP "\fBWarningTimeout\fR \fItimeout\fR" 4
.IX Item "WarningTimeout timeout"
.IP "\fBFailureTimeout\fR \fItimeout\fR" 4
.IX Item "FailureTimeout timeout"
.PD
Set the \fItimeout\fR, in milliseconds, after which to expire the notification
for \f(CW\*(C`OKAY\*(C'\fR, \f(CW\*(C`WARNING\*(C'\fR and \f(CW\*(C`FAILURE\*(C'\fR severities respectively. If zero has
been specified, the displayed notification will not be closed at all \- the
user has to do so herself. These options default to 5000. If a negative number
has been specified, the default is used as well.
.ie n .SS "Plugin ""notify_email"""
.el .SS "Plugin \f(CWnotify_email\fP"
.IX Subsection "Plugin notify_email"
The \fInotify_email\fR plugin uses the \fI\s-1ESMTP\s0\fR library to send notifications to a
configured email address.
.PP
\&\fIlibESMTP\fR is available from .
.PP
Available configuration options:
.IP "\fBFrom\fR \fIAddress\fR" 4
.IX Item "From Address"
Email address from which the emails should appear to come from.
.Sp
Default: \f(CW\*(C`root@localhost\*(C'\fR
.IP "\fBRecipient\fR \fIAddress\fR" 4
.IX Item "Recipient Address"
Configures the email address(es) to which the notifications should be mailed.
May be repeated to send notifications to multiple addresses.
.Sp
At least one \fBRecipient\fR must be present for the plugin to work correctly.
.IP "\fBSMTPServer\fR \fIHostname\fR" 4
.IX Item "SMTPServer Hostname"
Hostname of the \s-1SMTP\s0 server to connect to.
.Sp
Default: \f(CW\*(C`localhost\*(C'\fR
.IP "\fBSMTPPort\fR \fIPort\fR" 4
.IX Item "SMTPPort Port"
\&\s-1TCP\s0 port to connect to.
.Sp
Default: \f(CW25\fR
.IP "\fBSMTPUser\fR \fIUsername\fR" 4
.IX Item "SMTPUser Username"
Username for \s-1ASMTP\s0 authentication. Optional.
.IP "\fBSMTPPassword\fR \fIPassword\fR" 4
.IX Item "SMTPPassword Password"
Password for \s-1ASMTP\s0 authentication. Optional.
.IP "\fBSubject\fR \fISubject\fR" 4
.IX Item "Subject Subject"
Subject-template to use when sending emails. There must be exactly two
string-placeholders in the subject, given in the standard \fI\fIprintf\fI\|(3)\fR syntax,
i.\ e. \f(CW%s\fR. The first will be replaced with the severity, the second
with the hostname.
.Sp
Default: \f(CW\*(C`Collectd notify: %s@%s\*(C'\fR
.ie n .SS "Plugin ""notify_nagios"""
.el .SS "Plugin \f(CWnotify_nagios\fP"
.IX Subsection "Plugin notify_nagios"
The \fInotify_nagios\fR plugin writes notifications to Nagios' \fIcommand file\fR as
a \fIpassive service check result\fR.
.PP
Available configuration options:
.IP "\fBCommandFile\fR \fIPath\fR" 4
.IX Item "CommandFile Path"
Sets the \fIcommand file\fR to write to. Defaults to \fI/usr/local/nagios/var/rw/nagios.cmd\fR.
.ie n .SS "Plugin ""ntpd"""
.el .SS "Plugin \f(CWntpd\fP"
.IX Subsection "Plugin ntpd"
The \f(CW\*(C`ntpd\*(C'\fR plugin collects per-peer ntp data such as time offset and time
dispersion.
.PP
For talking to \fBntpd\fR, it mimics what the \fBntpdc\fR control program does on
the wire \- using \fBmode 7\fR specific requests. This mode is deprecated with
newer \fBntpd\fR releases (4.2.7p230 and later). For the \f(CW\*(C`ntpd\*(C'\fR plugin to work
correctly with them, the ntp daemon must be explicitly configured to
enable \fBmode 7\fR (which is disabled by default). Refer to the \fI\fIntp.conf\fI\|(5)\fR
manual page for details.
.PP
Available configuration options for the \f(CW\*(C`ntpd\*(C'\fR plugin:
.IP "\fBHost\fR \fIHostname\fR" 4
.IX Item "Host Hostname"
Hostname of the host running \fBntpd\fR. Defaults to \fBlocalhost\fR.
.IP "\fBPort\fR \fIPort\fR" 4
.IX Item "Port Port"
UDP-Port to connect to. Defaults to \fB123\fR.
.IP "\fBReverseLookups\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "ReverseLookups true|false"
Sets whether or not to perform reverse lookups on peers. Since the name or
IP-address may be used in a filename it is recommended to disable reverse
lookups. The default is to do reverse lookups to preserve backwards
compatibility, though.
.IP "\fBIncludeUnitID\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "IncludeUnitID true|false"
When a peer is a refclock, include the unit \s-1ID\s0 in the \fItype instance\fR.
Defaults to \fBfalse\fR for backward compatibility.
.Sp
If two refclock peers use the same driver and this is \fBfalse\fR, the plugin will
try to write simultaneous measurements from both to the same type instance.
This will result in error messages in the log and only one set of measurements
making it through.
.ie n .SS "Plugin ""nut"""
.el .SS "Plugin \f(CWnut\fP"
.IX Subsection "Plugin nut"
.IP "\fB\s-1UPS\s0\fR \fIupsname\fR\fB@\fR\fIhostname\fR[\fB:\fR\fIport\fR]" 4
.IX Item "UPS upsname@hostname[:port]"
Add a \s-1UPS\s0 to collect data from. The format is identical to the one accepted by
\&\fIupsc\fR\|(8).
.ie n .SS "Plugin ""olsrd"""
.el .SS "Plugin \f(CWolsrd\fP"
.IX Subsection "Plugin olsrd"
The \fIolsrd\fR plugin connects to the \s-1TCP\s0 port opened by the \fItxtinfo\fR plugin of
the Optimized Link State Routing daemon and reads information about the current
state of the meshed network.
.PP
The following configuration options are understood:
.IP "\fBHost\fR \fIHost\fR" 4
.IX Item "Host Host"
Connect to \fIHost\fR. Defaults to \fB\*(L"localhost\*(R"\fR.
.IP "\fBPort\fR \fIPort\fR" 4
.IX Item "Port Port"
Specifies the port to connect to. This must be a string, even if you give the
port as a number rather than a service name. Defaults to \fB\*(L"2006\*(R"\fR.
.IP "\fBCollectLinks\fR \fBNo\fR|\fBSummary\fR|\fBDetail\fR" 4
.IX Item "CollectLinks No|Summary|Detail"
Specifies what information to collect about links, i.\ e. direct
connections of the daemon queried. If set to \fBNo\fR, no information is
collected. If set to \fBSummary\fR, the number of links and the average of all
\&\fIlink quality\fR (\s-1LQ\s0) and \fIneighbor link quality\fR (\s-1NLQ\s0) values is calculated.
If set to \fBDetail\fR \s-1LQ\s0 and \s-1NLQ\s0 are collected per link.
.Sp
Defaults to \fBDetail\fR.
.IP "\fBCollectRoutes\fR \fBNo\fR|\fBSummary\fR|\fBDetail\fR" 4
.IX Item "CollectRoutes No|Summary|Detail"
Specifies what information to collect about routes of the daemon queried. If
set to \fBNo\fR, no information is collected. If set to \fBSummary\fR, the number of
routes and the average \fImetric\fR and \fI\s-1ETX\s0\fR is calculated. If set to \fBDetail\fR
metric and \s-1ETX\s0 are collected per route.
.Sp
Defaults to \fBSummary\fR.
.IP "\fBCollectTopology\fR \fBNo\fR|\fBSummary\fR|\fBDetail\fR" 4
.IX Item "CollectTopology No|Summary|Detail"
Specifies what information to collect about the global topology. If set to
\&\fBNo\fR, no information is collected. If set to \fBSummary\fR, the number of links
in the entire topology and the average \fIlink quality\fR (\s-1LQ\s0) is calculated.
If set to \fBDetail\fR \s-1LQ\s0 and \s-1NLQ\s0 are collected for each link in the entire topology.
.Sp
Defaults to \fBSummary\fR.
.ie n .SS "Plugin ""onewire"""
.el .SS "Plugin \f(CWonewire\fP"
.IX Subsection "Plugin onewire"
\&\fB\s-1EXPERIMENTAL\s0!\fR See notes below.
.PP
The \f(CW\*(C`onewire\*(C'\fR plugin uses the \fBowcapi\fR library from the \fBowfs\fR project
to read sensors connected via the onewire bus.
.PP
It can be used in two possible modes \- standard or advanced.
.PP
In the standard mode only temperature sensors (sensors with the family code
\&\f(CW10\fR, \f(CW22\fR and \f(CW28\fR \- e.g. \s-1DS1820, DS18S20, DS1920\s0) can be read. If you have
other sensors you would like to have included, please send a sort request to
the mailing list. You can select sensors to be read or to be ignored depending
on the option \fBIgnoreSelected\fR). When no list is provided the whole bus is
walked and all sensors are read.
.PP
Hubs (the \s-1DS2409\s0 chips) are working, but read the note, why this plugin is
experimental, below.
.PP
In the advanced mode you can configure any sensor to be read (only numerical
value) using full \s-1OWFS\s0 path (e.g. \*(L"/uncached/10.F10FCA000800/temperature\*(R").
In this mode you have to list all the sensors. Neither default bus walk nor
\&\fBIgnoreSelected\fR are used here. Address and type (file) is extracted from
the path automatically and should produce compatible structure with the \*(L"standard\*(R"
mode (basically the path is expected as for example
\&\*(L"/uncached/10.F10FCA000800/temperature\*(R" where it would extract address part
\&\*(L"F10FCA000800\*(R" and the rest after the slash is considered the type \- here
\&\*(L"temperature\*(R").
There are two advantages to this mode \- you can access virtually any sensor
(not just temperature), select whether to use cached or directly read values
and it is slighlty faster. The downside is more complex configuration.
.PP
The two modes are distinguished automatically by the format of the address.
It is not possible to mix the two modes. Once a full path is detected in any
\&\fBSensor\fR then the whole addressing (all sensors) is considered to be this way
(and as standard addresses will fail parsing they will be ignored).
.IP "\fBDevice\fR \fIDevice\fR" 4
.IX Item "Device Device"
Sets the device to read the values from. This can either be a \*(L"real\*(R" hardware
device, such as a serial port or an \s-1USB\s0 port, or the address of the
\&\fIowserver\fR\|(1) socket, usually \fBlocalhost:4304\fR.
.Sp
Though the documentation claims to automatically recognize the given address
format, with version\ 2.7p4 we had to specify the type explicitly. So
with that version, the following configuration worked for us:
.Sp
.Vb 3
\&
\& Device "\-s localhost:4304"
\&
.Ve
.Sp
This directive is \fBrequired\fR and does not have a default value.
.IP "\fBSensor\fR \fISensor\fR" 4
.IX Item "Sensor Sensor"
In the standard mode selects sensors to collect or to ignore
(depending on \fBIgnoreSelected\fR, see below). Sensors are specified without
the family byte at the beginning, so you have to use for example \f(CW\*(C`F10FCA000800\*(C'\fR,
and \fBnot\fR include the leading \f(CW10.\fR family byte and point.
When no \fBSensor\fR is configured the whole Onewire bus is walked and all supported
sensors (see above) are read.
.Sp
In the advanced mode the \fBSensor\fR specifies full \s-1OWFS\s0 path \- e.g.
\&\f(CW\*(C`/uncached/10.F10FCA000800/temperature\*(C'\fR (or when cached values are \s-1OK
\&\s0\f(CW\*(C`/10.F10FCA000800/temperature\*(C'\fR). \fBIgnoreSelected\fR is not used.
.Sp
As there can be multiple devices on the bus you can list multiple sensor (use
multiple \fBSensor\fR elements).
.IP "\fBIgnoreSelected\fR \fItrue\fR|\fIfalse\fR" 4
.IX Item "IgnoreSelected true|false"
If no configuration is given, the \fBonewire\fR plugin will collect data from all
sensors found. This may not be practical, especially if sensors are added and
removed regularly. Sometimes, however, it's easier/preferred to collect only
specific sensors or all sensors \fIexcept\fR a few specified ones. This option
enables you to do that: By setting \fBIgnoreSelected\fR to \fItrue\fR the effect of
\&\fBSensor\fR is inverted: All selected interfaces are ignored and all other
interfaces are collected.
.Sp
Used only in the standard mode \- see above.
.IP "\fBInterval\fR \fISeconds\fR" 4
.IX Item "Interval Seconds"
Sets the interval in which all sensors should be read. If not specified, the
global \fBInterval\fR setting is used.
.PP
\&\fB\s-1EXPERIMENTAL\s0!\fR The \f(CW\*(C`onewire\*(C'\fR plugin is experimental, because it doesn't yet
work with big setups. It works with one sensor being attached to one
controller, but as soon as you throw in a couple more senors and maybe a hub
or two, reading all values will take more than ten seconds (the default
interval). We will probably add some separate thread for reading the sensors
and some cache or something like that, but it's not done yet. We will try to
maintain backwards compatibility in the future, but we can't promise. So in
short: If it works for you: Great! But keep in mind that the config \fImight\fR
change, though this is unlikely. Oh, and if you want to help improving this
plugin, just send a short notice to the mailing list. Thanks\ :)
.ie n .SS "Plugin ""openldap"""
.el .SS "Plugin \f(CWopenldap\fP"
.IX Subsection "Plugin openldap"
To use the \f(CW\*(C`openldap\*(C'\fR plugin you first need to configure the \fIOpenLDAP\fR
server correctly. The backend database \f(CW\*(C`monitor\*(C'\fR needs to be loaded and
working. See \fIslapd\-monitor\fR\|(5) for the details.
.PP
The configuration of the \f(CW\*(C`openldap\*(C'\fR plugin consists of one or more \fBInstance\fR
blocks. Each block requires one string argument as the instance name. For
example:
.PP
.Vb 8
\&
\&
\& URL "ldap://localhost/"
\&
\&
\& URL "ldaps://localhost/"
\&
\&
.Ve
.PP
The instance name will be used as the \fIplugin instance\fR. To emulate the old
(version\ 4) behavior, you can use an empty string (""). In order for the
plugin to work correctly, each instance name must be unique. This is not
enforced by the plugin and it is your responsibility to ensure it is.
.PP
The following options are accepted within each \fBInstance\fR block:
.IP "\fB\s-1URL\s0\fR \fIldap://host/binddn\fR" 4
.IX Item "URL ldap://host/binddn"
Sets the \s-1URL\s0 to use to connect to the \fIOpenLDAP\fR server. This option is
\&\fImandatory\fR.
.IP "\fBBindDN\fR \fIBindDN\fR" 4
.IX Item "BindDN BindDN"
Name in the form of an \s-1LDAP\s0 distinguished name intended to be used for
authentication. Defaults to empty string to establish an anonymous authorization.
.IP "\fBPassword\fR \fIPassword\fR" 4
.IX Item "Password Password"
Password for simple bind authentication. If this option is not set,
unauthenticated bind operation is used.
.IP "\fBStartTLS\fR \fBtrue|false\fR" 4
.IX Item "StartTLS true|false"
Defines whether \s-1TLS\s0 must be used when connecting to the \fIOpenLDAP\fR server.
Disabled by default.
.IP "\fBVerifyHost\fR \fBtrue|false\fR" 4
.IX Item "VerifyHost true|false"
Enables or disables peer host name verification. If enabled, the plugin checks
if the \f(CW\*(C`Common Name\*(C'\fR or a \f(CW\*(C`Subject Alternate Name\*(C'\fR field of the \s-1SSL\s0
certificate matches the host name provided by the \fB\s-1URL\s0\fR option. If this
identity check fails, the connection is aborted. Enabled by default.
.IP "\fBCACert\fR \fIFile\fR" 4
.IX Item "CACert File"
File that holds one or more \s-1SSL\s0 certificates. If you want to use \s-1TLS/SSL\s0 you
may possibly need this option. What \s-1CA\s0 certificates are checked by default
depends on the distribution you use and can be changed with the usual ldap
client configuration mechanisms. See \fIldap.conf\fR\|(5) for the details.
.IP "\fBTimeout\fR \fISeconds\fR" 4
.IX Item "Timeout Seconds"
Sets the timeout value for ldap operations, in seconds. By default, the
configured \fBInterval\fR is used to set the timeout. Use \fB\-1\fR to disable
(infinite timeout).
.IP "\fBVersion\fR \fIVersion\fR" 4
.IX Item "Version Version"
An integer which sets the \s-1LDAP\s0 protocol version number to use when connecting
to the \fIOpenLDAP\fR server. Defaults to \fB3\fR for using \fILDAPv3\fR.
.ie n .SS "Plugin ""openvpn"""
.el .SS "Plugin \f(CWopenvpn\fP"
.IX Subsection "Plugin openvpn"
The OpenVPN plugin reads a status file maintained by OpenVPN and gathers
traffic statistics about connected clients.
.PP
To set up OpenVPN to write to the status file periodically, use the
\&\fB\-\-status\fR option of OpenVPN. Since OpenVPN can write two different formats,
you need to set the required format, too. This is done by setting
\&\fB\-\-status\-version\fR to \fB2\fR.
.PP
So, in a nutshell you need:
.PP
.Vb 3
\& openvpn $OTHER_OPTIONS \e
\& \-\-status "/var/run/openvpn\-status" 10 \e
\& \-\-status\-version 2
.Ve
.PP
Available options:
.IP "\fBStatusFile\fR \fIFile\fR" 4
.IX Item "StatusFile File"
Specifies the location of the status file.
.IP "\fBImprovedNamingSchema\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "ImprovedNamingSchema true|false"
When enabled, the filename of the status file will be used as plugin instance
and the client's \*(L"common name\*(R" will be used as type instance. This is required
when reading multiple status files. Enabling this option is recommended, but to
maintain backwards compatibility this option is disabled by default.
.IP "\fBCollectCompression\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "CollectCompression true|false"
Sets whether or not statistics about the compression used by OpenVPN should be
collected. This information is only available in \fIsingle\fR mode. Enabled by
default.
.IP "\fBCollectIndividualUsers\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "CollectIndividualUsers true|false"
Sets whether or not traffic information is collected for each connected client
individually. If set to false, currently no traffic data is collected at all
because aggregating this data in a save manner is tricky. Defaults to \fBtrue\fR.
.IP "\fBCollectUserCount\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "CollectUserCount true|false"
When enabled, the number of currently connected clients or users is collected.
This is especially interesting when \fBCollectIndividualUsers\fR is disabled, but
can be configured independently from that option. Defaults to \fBfalse\fR.
.ie n .SS "Plugin ""oracle"""
.el .SS "Plugin \f(CWoracle\fP"
.IX Subsection "Plugin oracle"
The \*(L"oracle\*(R" plugin uses the OracleX Call Interface \fI(\s-1OCI\s0)\fR to connect to an
OracleX Database and lets you execute \s-1SQL\s0 statements there. It is very similar
to the \*(L"dbi\*(R" plugin, because it was written around the same time. See the \*(L"dbi\*(R"
plugin's documentation above for details.
.PP
.Vb 10
\&
\&
\& Statement "SELECT category, COUNT(*) AS value FROM products WHERE in_stock = 0 GROUP BY category"
\&
\& Type "gauge"
\& # InstancePrefix "foo"
\& InstancesFrom "category"
\& ValuesFrom "value"
\&
\&
\&
\& ConnectID "db01"
\& Username "oracle"
\& Password "secret"
\& Query "out_of_stock"
\&
\&
.Ve
.PP
\fI\f(BIQuery\fI blocks\fR
.IX Subsection "Query blocks"
.PP
The Query blocks are handled identically to the Query blocks of the \*(L"dbi\*(R"
plugin. Please see its documentation above for details on how to specify
queries.
.PP
\fI\f(BIDatabase\fI blocks\fR
.IX Subsection "Database blocks"
.PP
Database blocks define a connection to a database and which queries should be
sent to that database. Each database needs a \*(L"name\*(R" as string argument in the
starting tag of the block. This name will be used as \*(L"PluginInstance\*(R" in the
values submitted to the daemon. Other than that, that name is not used.
.IP "\fBConnectID\fR \fI\s-1ID\s0\fR" 4
.IX Item "ConnectID ID"
Defines the \*(L"database alias\*(R" or \*(L"service name\*(R" to connect to. Usually, these
names are defined in the file named \f(CW\*(C`$ORACLE_HOME/network/admin/tnsnames.ora\*(C'\fR.
.IP "\fBHost\fR \fIHost\fR" 4
.IX Item "Host Host"
Hostname to use when dispatching values for this database. Defaults to using
the global hostname of the \fIcollectd\fR instance.
.IP "\fBUsername\fR \fIUsername\fR" 4
.IX Item "Username Username"
Username used for authentication.
.IP "\fBPassword\fR \fIPassword\fR" 4
.IX Item "Password Password"
Password used for authentication.
.IP "\fBQuery\fR \fIQueryName\fR" 4
.IX Item "Query QueryName"
Associates the query named \fIQueryName\fR with this database connection. The
query needs to be defined \fIbefore\fR this statement, i.\ e. all query
blocks you want to refer to must be placed above the database block you want to
refer to them from.
.ie n .SS "Plugin ""perl"""
.el .SS "Plugin \f(CWperl\fP"
.IX Subsection "Plugin perl"
This plugin embeds a Perl-interpreter into collectd and provides an interface
to collectd's plugin system. See \fIcollectd\-perl\fR\|(5) for its documentation.
.ie n .SS "Plugin ""pinba"""
.el .SS "Plugin \f(CWpinba\fP"
.IX Subsection "Plugin pinba"
The \fIPinba plugin\fR receives profiling information from \fIPinba\fR, an extension
for the \fI\s-1PHP\s0\fR interpreter. At the end of executing a script, i.e. after a
PHP-based webpage has been delivered, the extension will send a \s-1UDP\s0 packet
containing timing information, peak memory usage and so on. The plugin will
wait for such packets, parse them and account the provided information, which
is then dispatched to the daemon once per interval.
.PP
Synopsis:
.PP
.Vb 10
\&
\& Address "::0"
\& Port "30002"
\& # Overall statistics for the website.
\&
\& Server "www.example.com"
\&
\& # Statistics for www\-a only
\&
\& Host "www\-a.example.com"
\& Server "www.example.com"
\&
\& # Statistics for www\-b only
\&
\& Host "www\-b.example.com"
\& Server "www.example.com"
\&
\&
.Ve
.PP
The plugin provides the following configuration options:
.IP "\fBAddress\fR \fINode\fR" 4
.IX Item "Address Node"
Configures the address used to open a listening socket. By default, plugin will
bind to the \fIany\fR address \f(CW\*(C`::0\*(C'\fR.
.IP "\fBPort\fR \fIService\fR" 4
.IX Item "Port Service"
Configures the port (service) to bind to. By default the default Pinba port
\&\*(L"30002\*(R" will be used. The option accepts service names in addition to port
numbers and thus requires a \fIstring\fR argument.
.IP "<\fBView\fR \fIName\fR> block" 4
.IX Item " block"
The packets sent by the Pinba extension include the hostname of the server, the
server name (the name of the virtual host) and the script that was executed.
Using \fBView\fR blocks it is possible to separate the data into multiple groups
to get more meaningful statistics. Each packet is added to all matching groups,
so that a packet may be accounted for more than once.
.RS 4
.IP "\fBHost\fR \fIHost\fR" 4
.IX Item "Host Host"
Matches the hostname of the system the webserver / script is running on. This
will contain the result of the \fIgethostname\fR\|(2) system call. If not
configured, all hostnames will be accepted.
.IP "\fBServer\fR \fIServer\fR" 4
.IX Item "Server Server"
Matches the name of the \fIvirtual host\fR, i.e. the contents of the
\&\f(CW$_SERVER["SERVER_NAME"]\fR variable when within \s-1PHP.\s0 If not configured, all
server names will be accepted.
.IP "\fBScript\fR \fIScript\fR" 4
.IX Item "Script Script"
Matches the name of the \fIscript name\fR, i.e. the contents of the
\&\f(CW$_SERVER["SCRIPT_NAME"]\fR variable when within \s-1PHP.\s0 If not configured, all
script names will be accepted.
.RE
.RS 4
.RE
.ie n .SS "Plugin ""ping"""
.el .SS "Plugin \f(CWping\fP"
.IX Subsection "Plugin ping"
The \fIPing\fR plugin starts a new thread which sends \s-1ICMP \s0\*(L"ping\*(R" packets to the
configured hosts periodically and measures the network latency. Whenever the
\&\f(CW\*(C`read\*(C'\fR function of the plugin is called, it submits the average latency, the
standard deviation and the drop rate for each host.
.PP
Available configuration options:
.IP "\fBHost\fR \fIIP-address\fR" 4
.IX Item "Host IP-address"
Host to ping periodically. This option may be repeated several times to ping
multiple hosts.
.IP "\fBInterval\fR \fISeconds\fR" 4
.IX Item "Interval Seconds"
Sets the interval in which to send \s-1ICMP\s0 echo packets to the configured hosts.
This is \fBnot\fR the interval in which statistics are queries from the plugin but
the interval in which the hosts are \*(L"pinged\*(R". Therefore, the setting here
should be smaller than or equal to the global \fBInterval\fR setting. Fractional
times, such as \*(L"1.24\*(R" are allowed.
.Sp
Default: \fB1.0\fR
.IP "\fBTimeout\fR \fISeconds\fR" 4
.IX Item "Timeout Seconds"
Time to wait for a response from the host to which an \s-1ICMP\s0 packet had been
sent. If a reply was not received after \fISeconds\fR seconds, the host is assumed
to be down or the packet to be dropped. This setting must be smaller than the
\&\fBInterval\fR setting above for the plugin to work correctly. Fractional
arguments are accepted.
.Sp
Default: \fB0.9\fR
.IP "\fB\s-1TTL\s0\fR \fI0\-255\fR" 4
.IX Item "TTL 0-255"
Sets the Time-To-Live of generated \s-1ICMP\s0 packets.
.IP "\fBSize\fR \fIsize\fR" 4
.IX Item "Size size"
Sets the size of the data payload in \s-1ICMP\s0 packet to specified \fIsize\fR (it
will be filled with regular \s-1ASCII\s0 pattern). If not set, default 56 byte
long string is used so that the packet size of an ICMPv4 packet is exactly
64 bytes, similar to the behaviour of normal \fIping\fR\|(1) command.
.IP "\fBSourceAddress\fR \fIhost\fR" 4
.IX Item "SourceAddress host"
Sets the source address to use. \fIhost\fR may either be a numerical network
address or a network hostname.
.IP "\fBDevice\fR \fIname\fR" 4
.IX Item "Device name"
Sets the outgoing network device to be used. \fIname\fR has to specify an
interface name (e.\ g. \f(CW\*(C`eth0\*(C'\fR). This might not be supported by all
operating systems.
.IP "\fBMaxMissed\fR \fIPackets\fR" 4
.IX Item "MaxMissed Packets"
Trigger a \s-1DNS\s0 resolve after the host has not replied to \fIPackets\fR packets. This
enables the use of dynamic \s-1DNS\s0 services (like dyndns.org) with the ping plugin.
.Sp
Default: \fB\-1\fR (disabled)
.ie n .SS "Plugin ""postgresql"""
.el .SS "Plugin \f(CWpostgresql\fP"
.IX Subsection "Plugin postgresql"
The \f(CW\*(C`postgresql\*(C'\fR plugin queries statistics from PostgreSQL databases. It
keeps a persistent connection to all configured databases and tries to
reconnect if the connection has been interrupted. A database is configured by
specifying a \fBDatabase\fR block as described below. The default statistics are
collected from PostgreSQL's \fBstatistics collector\fR which thus has to be
enabled for this plugin to work correctly. This should usually be the case by
default. See the section \*(L"The Statistics Collector\*(R" of the \fBPostgreSQL
Documentation\fR for details.
.PP
By specifying custom database queries using a \fBQuery\fR block as described
below, you may collect any data that is available from some PostgreSQL
database. This way, you are able to access statistics of external daemons
which are available in a PostgreSQL database or use future or special
statistics provided by PostgreSQL without the need to upgrade your collectd
installation.
.PP
Starting with version 5.2, the \f(CW\*(C`postgresql\*(C'\fR plugin supports writing data to
PostgreSQL databases as well. This has been implemented in a generic way. You
need to specify an \s-1SQL\s0 statement which will then be executed by collectd in
order to write the data (see below for details). The benefit of that approach
is that there is no fixed database layout. Rather, the layout may be optimized
for the current setup.
.PP
The \fBPostgreSQL Documentation\fR manual can be found at
.
.PP
.Vb 10
\&
\&
\& Statement "SELECT magic FROM wizard WHERE host = $1;"
\& Param hostname
\&
\& Type gauge
\& InstancePrefix "magic"
\& ValuesFrom magic
\&
\&
\&
\&
\& Statement "SELECT COUNT(type) AS count, type \e
\& FROM (SELECT CASE \e
\& WHEN resolved = \*(Aqepoch\*(Aq THEN \*(Aqopen\*(Aq \e
\& ELSE \*(Aqresolved\*(Aq END AS type \e
\& FROM tickets) type \e
\& GROUP BY type;"
\&
\& Type counter
\& InstancePrefix "rt36_tickets"
\& InstancesFrom "type"
\& ValuesFrom "count"
\&
\&
\&
\&
\& Statement "SELECT collectd_insert($1, $2, $3, $4, $5, $6, $7, $8, $9);"
\& StoreRates true
\&
\&
\&
\& Host "hostname"
\& Port "5432"
\& User "username"
\& Password "secret"
\& SSLMode "prefer"
\& KRBSrvName "kerberos_service_name"
\& Query magic
\&
\&
\&
\& Interval 300
\& Service "service_name"
\& Query backend # predefined
\& Query rt36_tickets
\&
\&
\&
\& # ...
\& Writer sqlstore
\& CommitInterval 10
\&
\&
.Ve
.PP
The \fBQuery\fR block defines one database query which may later be used by a
database definition. It accepts a single mandatory argument which specifies
the name of the query. The names of all queries have to be unique (see the
\&\fBMinVersion\fR and \fBMaxVersion\fR options below for an exception to this
rule).
.PP
In each \fBQuery\fR block, there is one or more \fBResult\fR blocks. Multiple
\&\fBResult\fR blocks may be used to extract multiple values from a single query.
.PP
The following configuration options are available to define the query:
.IP "\fBStatement\fR \fIsql query statement\fR" 4
.IX Item "Statement sql query statement"
Specify the \fIsql query statement\fR which the plugin should execute. The string
may contain the tokens \fB\f(CB$1\fB\fR, \fB\f(CB$2\fB\fR, etc. which are used to reference the
first, second, etc. parameter. The value of the parameters is specified by the
\&\fBParam\fR configuration option \- see below for details. To include a literal
\&\fB$\fR character followed by a number, surround it with single quotes (\fB'\fR).
.Sp
Any \s-1SQL\s0 command which may return data (such as \f(CW\*(C`SELECT\*(C'\fR or \f(CW\*(C`SHOW\*(C'\fR) is
allowed. Note, however, that only a single command may be used. Semicolons are
allowed as long as a single non-empty command has been specified only.
.Sp
The returned lines will be handled separately one after another.
.IP "\fBParam\fR \fIhostname\fR|\fIdatabase\fR|\fIinstance\fR|\fIusername\fR|\fIinterval\fR" 4
.IX Item "Param hostname|database|instance|username|interval"
Specify the parameters which should be passed to the \s-1SQL\s0 query. The parameters
are referred to in the \s-1SQL\s0 query as \fB\f(CB$1\fB\fR, \fB\f(CB$2\fB\fR, etc. in the same order as
they appear in the configuration file. The value of the parameter is
determined depending on the value of the \fBParam\fR option as follows:
.RS 4
.IP "\fIhostname\fR" 4
.IX Item "hostname"
The configured hostname of the database connection. If a \s-1UNIX\s0 domain socket is
used, the parameter expands to \*(L"localhost\*(R".
.IP "\fIdatabase\fR" 4
.IX Item "database"
The name of the database of the current connection.
.IP "\fIinstance\fR" 4
.IX Item "instance"
The name of the database plugin instance. See the \fBInstance\fR option of the
database specification below for details.
.IP "\fIusername\fR" 4
.IX Item "username"
The username used to connect to the database.
.IP "\fIinterval\fR" 4
.IX Item "interval"
The interval with which this database is queried (as specified by the database
specific or global \fBInterval\fR options).
.RE
.RS 4
.Sp
Please note that parameters are only supported by PostgreSQL's protocol
version 3 and above which was introduced in version 7.4 of PostgreSQL.
.RE
.IP "\fBPluginInstanceFrom\fR \fIcolumn\fR" 4
.IX Item "PluginInstanceFrom column"
Specify how to create the \*(L"PluginInstance\*(R" for reporting this query results.
Only one column is supported. You may concatenate fields and string values in
the query statement to get the required results.
.IP "\fBMinVersion\fR \fIversion\fR" 4
.IX Item "MinVersion version"
.PD 0
.IP "\fBMaxVersion\fR \fIversion\fR" 4
.IX Item "MaxVersion version"
.PD
Specify the minimum or maximum version of PostgreSQL that this query should be
used with. Some statistics might only be available with certain versions of
PostgreSQL. This allows you to specify multiple queries with the same name but
which apply to different versions, thus allowing you to use the same
configuration in a heterogeneous environment.
.Sp
The \fIversion\fR has to be specified as the concatenation of the major, minor
and patch-level versions, each represented as two-decimal-digit numbers. For
example, version 8.2.3 will become 80203.
.PP
The \fBResult\fR block defines how to handle the values returned from the query.
It defines which column holds which value and how to dispatch that value to
the daemon.
.IP "\fBType\fR \fItype\fR" 4
.IX Item "Type type"
The \fItype\fR name to be used when dispatching the values. The type describes
how to handle the data and where to store it. See \fItypes.db\fR\|(5) for more
details on types and their configuration. The number and type of values (as
selected by the \fBValuesFrom\fR option) has to match the type of the given name.
.Sp
This option is mandatory.
.IP "\fBInstancePrefix\fR \fIprefix\fR" 4
.IX Item "InstancePrefix prefix"
.PD 0
.IP "\fBInstancesFrom\fR \fIcolumn0\fR [\fIcolumn1\fR ...]" 4
.IX Item "InstancesFrom column0 [column1 ...]"
.PD
Specify how to create the \*(L"TypeInstance\*(R" for each data set (i.\ e. line).
\&\fBInstancePrefix\fR defines a static prefix that will be prepended to all type
instances. \fBInstancesFrom\fR defines the column names whose values will be used
to create the type instance. Multiple values will be joined together using the
hyphen (\f(CW\*(C`\-\*(C'\fR) as separation character.
.Sp
The plugin itself does not check whether or not all built instances are
different. It is your responsibility to assure that each is unique.
.Sp
Both options are optional. If none is specified, the type instance will be
empty.
.IP "\fBValuesFrom\fR \fIcolumn0\fR [\fIcolumn1\fR ...]" 4
.IX Item "ValuesFrom column0 [column1 ...]"
Names the columns whose content is used as the actual data for the data sets
that are dispatched to the daemon. How many such columns you need is
determined by the \fBType\fR setting as explained above. If you specify too many
or not enough columns, the plugin will complain about that and no data will be
submitted to the daemon.
.Sp
The actual data type, as seen by PostgreSQL, is not that important as long as
it represents numbers. The plugin will automatically cast the values to the
right type if it know how to do that. For that, it uses the \fIstrtoll\fR\|(3) and
\&\fIstrtod\fR\|(3) functions, so anything supported by those functions is supported
by the plugin as well.
.Sp
This option is required inside a \fBResult\fR block and may be specified multiple
times. If multiple \fBValuesFrom\fR options are specified, the columns are read
in the given order.
.PP
The following predefined queries are available (the definitions can be found
in the \fIpostgresql_default.conf\fR file which, by default, is available at
\&\f(CW\*(C`\f(CIprefix\f(CW/share/collectd/\*(C'\fR):
.IP "\fBbackends\fR" 4
.IX Item "backends"
This query collects the number of backends, i.\ e. the number of
connected clients.
.IP "\fBtransactions\fR" 4
.IX Item "transactions"
This query collects the numbers of committed and rolled-back transactions of
the user tables.
.IP "\fBqueries\fR" 4
.IX Item "queries"
This query collects the numbers of various table modifications (i.\ e.
insertions, updates, deletions) of the user tables.
.IP "\fBquery_plans\fR" 4
.IX Item "query_plans"
This query collects the numbers of various table scans and returned tuples of
the user tables.
.IP "\fBtable_states\fR" 4
.IX Item "table_states"
This query collects the numbers of live and dead rows in the user tables.
.IP "\fBdisk_io\fR" 4
.IX Item "disk_io"
This query collects disk block access counts for user tables.
.IP "\fBdisk_usage\fR" 4
.IX Item "disk_usage"
This query collects the on-disk size of the database in bytes.
.PP
In addition, the following detailed queries are available by default. Please
note that each of those queries collects information \fBby table\fR, thus,
potentially producing \fBa lot\fR of data. For details see the description of the
non\-by_table queries above.
.IP "\fBqueries_by_table\fR" 4
.IX Item "queries_by_table"
.PD 0
.IP "\fBquery_plans_by_table\fR" 4
.IX Item "query_plans_by_table"
.IP "\fBtable_states_by_table\fR" 4
.IX Item "table_states_by_table"
.IP "\fBdisk_io_by_table\fR" 4
.IX Item "disk_io_by_table"
.PD
.PP
The \fBWriter\fR block defines a PostgreSQL writer backend. It accepts a single
mandatory argument specifying the name of the writer. This will then be used
in the \fBDatabase\fR specification in order to activate the writer instance. The
names of all writers have to be unique. The following options may be
specified:
.IP "\fBStatement\fR \fIsql statement\fR" 4
.IX Item "Statement sql statement"
This mandatory option specifies the \s-1SQL\s0 statement that will be executed for
each submitted value. A single \s-1SQL\s0 statement is allowed only. Anything after
the first semicolon will be ignored.
.Sp
Nine parameters will be passed to the statement and should be specified as
tokens \fB\f(CB$1\fB\fR, \fB\f(CB$2\fB\fR, through \fB\f(CB$9\fB\fR in the statement string. The following
values are made available through those parameters:
.RS 4
.IP "\fB\f(CB$1\fB\fR" 4
.IX Item "$1"
The timestamp of the queried value as an \s-1RFC\s0 3339\-formatted local time.
.IP "\fB\f(CB$2\fB\fR" 4
.IX Item "$2"
The hostname of the queried value.
.IP "\fB\f(CB$3\fB\fR" 4
.IX Item "$3"
The plugin name of the queried value.
.IP "\fB\f(CB$4\fB\fR" 4
.IX Item "$4"
The plugin instance of the queried value. This value may be \fB\s-1NULL\s0\fR if there
is no plugin instance.
.IP "\fB\f(CB$5\fB\fR" 4
.IX Item "$5"
The type of the queried value (cf. \fItypes.db\fR\|(5)).
.IP "\fB\f(CB$6\fB\fR" 4
.IX Item "$6"
The type instance of the queried value. This value may be \fB\s-1NULL\s0\fR if there is
no type instance.
.IP "\fB\f(CB$7\fB\fR" 4
.IX Item "$7"
An array of names for the submitted values (i.\ e., the name of the data
sources of the submitted value-list).
.IP "\fB\f(CB$8\fB\fR" 4
.IX Item "$8"
An array of types for the submitted values (i.\ e., the type of the data
sources of the submitted value-list; \f(CW\*(C`counter\*(C'\fR, \f(CW\*(C`gauge\*(C'\fR, ...). Note, that if
\&\fBStoreRates\fR is enabled (which is the default, see below), all types will be
\&\f(CW\*(C`gauge\*(C'\fR.
.IP "\fB\f(CB$9\fB\fR" 4
.IX Item "$9"
An array of the submitted values. The dimensions of the value name and value
arrays match.
.RE
.RS 4
.Sp
In general, it is advisable to create and call a custom function in the
PostgreSQL database for this purpose. Any procedural language supported by
PostgreSQL will do (see chapter \*(L"Server Programming\*(R" in the PostgreSQL manual
for details).
.RE
.IP "\fBStoreRates\fR \fBfalse\fR|\fBtrue\fR" 4
.IX Item "StoreRates false|true"
If set to \fBtrue\fR (the default), convert counter values to rates. If set to
\&\fBfalse\fR counter values are stored as is, i.\ e. as an increasing integer
number.
.PP
The \fBDatabase\fR block defines one PostgreSQL database for which to collect
statistics. It accepts a single mandatory argument which specifies the
database name. None of the other options are required. PostgreSQL will use
default values as documented in the section \*(L"\s-1CONNECTING TO A DATABASE\*(R"\s0 in the
\&\fIpsql\fR\|(1) manpage. However, be aware that those defaults may be influenced by
the user collectd is run as and special environment variables. See the manpage
for details.
.IP "\fBInterval\fR \fIseconds\fR" 4
.IX Item "Interval seconds"
Specify the interval with which the database should be queried. The default is
to use the global \fBInterval\fR setting.
.IP "\fBCommitInterval\fR \fIseconds\fR" 4
.IX Item "CommitInterval seconds"
This option may be used for database connections which have \*(L"writers\*(R" assigned
(see above). If specified, it causes a writer to put several updates into a
single transaction. This transaction will last for the specified amount of
time. By default, each update will be executed in a separate transaction. Each
transaction generates a fair amount of overhead which can, thus, be reduced by
activating this option. The draw-back is, that data covering the specified
amount of time will be lost, for example, if a single statement within the
transaction fails or if the database server crashes.
.IP "\fBInstance\fR \fIname\fR" 4
.IX Item "Instance name"
Specify the plugin instance name that should be used instead of the database
name (which is the default, if this option has not been specified). This
allows one to query multiple databases of the same name on the same host (e.g.
when running multiple database server versions in parallel).
The plugin instance name can also be set from the query result using
the \fBPluginInstanceFrom\fR option in \fBQuery\fR block.
.IP "\fBHost\fR \fIhostname\fR" 4
.IX Item "Host hostname"
Specify the hostname or \s-1IP\s0 of the PostgreSQL server to connect to. If the
value begins with a slash, it is interpreted as the directory name in which to
look for the \s-1UNIX\s0 domain socket.
.Sp
This option is also used to determine the hostname that is associated with a
collected data set. If it has been omitted or either begins with with a slash
or equals \fBlocalhost\fR it will be replaced with the global hostname definition
of collectd. Any other value will be passed literally to collectd when
dispatching values. Also see the global \fBHostname\fR and \fBFQDNLookup\fR options.
.IP "\fBPort\fR \fIport\fR" 4
.IX Item "Port port"
Specify the \s-1TCP\s0 port or the local \s-1UNIX\s0 domain socket file extension of the
server.
.IP "\fBUser\fR \fIusername\fR" 4
.IX Item "User username"
Specify the username to be used when connecting to the server.
.IP "\fBPassword\fR \fIpassword\fR" 4
.IX Item "Password password"
Specify the password to be used when connecting to the server.
.IP "\fBExpireDelay\fR \fIdelay\fR" 4
.IX Item "ExpireDelay delay"
Skip expired values in query output.
.IP "\fBSSLMode\fR \fIdisable\fR|\fIallow\fR|\fIprefer\fR|\fIrequire\fR" 4
.IX Item "SSLMode disable|allow|prefer|require"
Specify whether to use an \s-1SSL\s0 connection when contacting the server. The
following modes are supported:
.RS 4
.IP "\fIdisable\fR" 4
.IX Item "disable"
Do not use \s-1SSL\s0 at all.
.IP "\fIallow\fR" 4
.IX Item "allow"
First, try to connect without using \s-1SSL.\s0 If that fails, try using \s-1SSL.\s0
.IP "\fIprefer\fR (default)" 4
.IX Item "prefer (default)"
First, try to connect using \s-1SSL.\s0 If that fails, try without using \s-1SSL.\s0
.IP "\fIrequire\fR" 4
.IX Item "require"
Use \s-1SSL\s0 only.
.RE
.RS 4
.RE
.IP "\fBInstance\fR \fIname\fR" 4
.IX Item "Instance name"
Specify the plugin instance name that should be used instead of the database
name (which is the default, if this option has not been specified). This
allows one to query multiple databases of the same name on the same host (e.g.
when running multiple database server versions in parallel).
.IP "\fBKRBSrvName\fR \fIkerberos_service_name\fR" 4
.IX Item "KRBSrvName kerberos_service_name"
Specify the Kerberos service name to use when authenticating with Kerberos 5
or \s-1GSSAPI.\s0 See the sections \*(L"Kerberos authentication\*(R" and \*(L"\s-1GSSAPI\*(R"\s0 of the
\&\fBPostgreSQL Documentation\fR for details.
.IP "\fBService\fR \fIservice_name\fR" 4
.IX Item "Service service_name"
Specify the PostgreSQL service name to use for additional parameters. That
service has to be defined in \fIpg_service.conf\fR and holds additional
connection parameters. See the section \*(L"The Connection Service File\*(R" in the
\&\fBPostgreSQL Documentation\fR for details.
.IP "\fBQuery\fR \fIquery\fR" 4
.IX Item "Query query"
Specifies a \fIquery\fR which should be executed in the context of the database
connection. This may be any of the predefined or user-defined queries. If no
such option is given, it defaults to \*(L"backends\*(R", \*(L"transactions\*(R", \*(L"queries\*(R",
\&\*(L"query_plans\*(R", \*(L"table_states\*(R", \*(L"disk_io\*(R" and \*(L"disk_usage\*(R" (unless a \fBWriter\fR
has been specified). Else, the specified queries are used only.
.IP "\fBWriter\fR \fIwriter\fR" 4
.IX Item "Writer writer"
Assigns the specified \fIwriter\fR backend to the database connection. This
causes all collected data to be send to the database using the settings
defined in the writer configuration (see the section \*(L"\s-1FILTER CONFIGURATION\*(R"\s0
below for details on how to selectively send data to certain plugins).
.Sp
Each writer will register a flush callback which may be used when having long
transactions enabled (see the \fBCommitInterval\fR option above). When issuing
the \fB\s-1FLUSH\s0\fR command (see \fIcollectd\-unixsock\fR\|(5) for details) the current
transaction will be committed right away. Two different kinds of flush
callbacks are available with the \f(CW\*(C`postgresql\*(C'\fR plugin:
.RS 4
.IP "\fBpostgresql\fR" 4
.IX Item "postgresql"
Flush all writer backends.
.IP "\fBpostgresql\-\fR\fIdatabase\fR" 4
.IX Item "postgresql-database"
Flush all writers of the specified \fIdatabase\fR only.
.RE
.RS 4
.RE
.ie n .SS "Plugin ""powerdns"""
.el .SS "Plugin \f(CWpowerdns\fP"
.IX Subsection "Plugin powerdns"
The \f(CW\*(C`powerdns\*(C'\fR plugin queries statistics from an authoritative PowerDNS
nameserver and/or a PowerDNS recursor. Since both offer a wide variety of
values, many of which are probably meaningless to most users, but may be useful
for some. So you may chose which values to collect, but if you don't, some
reasonable defaults will be collected.
.PP
.Vb 10
\&
\&
\& Collect "latency"
\& Collect "udp\-answers" "udp\-queries"
\& Socket "/var/run/pdns.controlsocket"
\&
\&
\& Collect "questions"
\& Collect "cache\-hits" "cache\-misses"
\& Socket "/var/run/pdns_recursor.controlsocket"
\&
\& LocalSocket "/opt/collectd/var/run/collectd\-powerdns"
\&
.Ve
.IP "\fBServer\fR and \fBRecursor\fR block" 4
.IX Item "Server and Recursor block"
The \fBServer\fR block defines one authoritative server to query, the \fBRecursor\fR
does the same for an recursing server. The possible options in both blocks are
the same, though. The argument defines a name for the server\ / recursor
and is required.
.RS 4
.IP "\fBCollect\fR \fIField\fR" 4
.IX Item "Collect Field"
Using the \fBCollect\fR statement you can select which values to collect. Here,
you specify the name of the values as used by the PowerDNS servers, e.\ g.
\&\f(CW\*(C`dlg\-only\-drops\*(C'\fR, \f(CW\*(C`answers10\-100\*(C'\fR.
.Sp
The method of getting the values differs for \fBServer\fR and \fBRecursor\fR blocks:
When querying the server a \f(CW\*(C`SHOW *\*(C'\fR command is issued in any case, because
that's the only way of getting multiple values out of the server at once.
collectd then picks out the values you have selected. When querying the
recursor, a command is generated to query exactly these values. So if you
specify invalid fields when querying the recursor, a syntax error may be
returned by the daemon and collectd may not collect any values at all.
.Sp
If no \fBCollect\fR statement is given, the following \fBServer\fR values will be
collected:
.RS 4
.IP "latency" 4
.IX Item "latency"
.PD 0
.IP "packetcache-hit" 4
.IX Item "packetcache-hit"
.IP "packetcache-miss" 4
.IX Item "packetcache-miss"
.IP "packetcache-size" 4
.IX Item "packetcache-size"
.IP "query-cache-hit" 4
.IX Item "query-cache-hit"
.IP "query-cache-miss" 4
.IX Item "query-cache-miss"
.IP "recursing-answers" 4
.IX Item "recursing-answers"
.IP "recursing-questions" 4
.IX Item "recursing-questions"
.IP "tcp-answers" 4
.IX Item "tcp-answers"
.IP "tcp-queries" 4
.IX Item "tcp-queries"
.IP "udp-answers" 4
.IX Item "udp-answers"
.IP "udp-queries" 4
.IX Item "udp-queries"
.RE
.RS 4
.PD
.Sp
The following \fBRecursor\fR values will be collected by default:
.IP "noerror-answers" 4
.IX Item "noerror-answers"
.PD 0
.IP "nxdomain-answers" 4
.IX Item "nxdomain-answers"
.IP "servfail-answers" 4
.IX Item "servfail-answers"
.IP "sys-msec" 4
.IX Item "sys-msec"
.IP "user-msec" 4
.IX Item "user-msec"
.IP "qa-latency" 4
.IX Item "qa-latency"
.IP "cache-entries" 4
.IX Item "cache-entries"
.IP "cache-hits" 4
.IX Item "cache-hits"
.IP "cache-misses" 4
.IX Item "cache-misses"
.IP "questions" 4
.IX Item "questions"
.RE
.RS 4
.PD
.Sp
Please note that up to that point collectd doesn't know what values are
available on the server and values that are added do not need a change of the
mechanism so far. However, the values must be mapped to collectd's naming
scheme, which is done using a lookup table that lists all known values. If
values are added in the future and collectd does not know about them, you will
get an error much like this:
.Sp
.Vb 1
\& powerdns plugin: submit: Not found in lookup table: foobar = 42
.Ve
.Sp
In this case please file a bug report with the collectd team.
.RE
.IP "\fBSocket\fR \fIPath\fR" 4
.IX Item "Socket Path"
Configures the path to the \s-1UNIX\s0 domain socket to be used when connecting to the
daemon. By default \f(CW\*(C`${localstatedir}/run/pdns.controlsocket\*(C'\fR will be used for
an authoritative server and \f(CW\*(C`${localstatedir}/run/pdns_recursor.controlsocket\*(C'\fR
will be used for the recursor.
.RE
.RS 4
.RE
.IP "\fBLocalSocket\fR \fIPath\fR" 4
.IX Item "LocalSocket Path"
Querying the recursor is done using \s-1UDP.\s0 When using \s-1UDP\s0 over \s-1UNIX\s0 domain
sockets, the client socket needs a name in the file system, too. You can set
this local name to \fIPath\fR using the \fBLocalSocket\fR option. The default is
\&\f(CW\*(C`\f(CIprefix\f(CW/var/run/collectd\-powerdns\*(C'\fR.
.ie n .SS "Plugin ""processes"""
.el .SS "Plugin \f(CWprocesses\fP"
.IX Subsection "Plugin processes"
.IP "\fBProcess\fR \fIName\fR" 4
.IX Item "Process Name"
Select more detailed statistics of processes matching this name. The statistics
collected for these selected processes are size of the resident segment size
(\s-1RSS\s0), user\- and system-time used, number of processes and number of threads,
io data (where available) and minor and major pagefaults.
.Sp
Some platforms have a limit on the length of process names. \fIName\fR must stay
below this limit.
.IP "\fBProcessMatch\fR \fIname\fR \fIregex\fR" 4
.IX Item "ProcessMatch name regex"
Similar to the \fBProcess\fR option this allows one to select more detailed
statistics of processes matching the specified \fIregex\fR (see \fIregex\fR\|(7) for
details). The statistics of all matching processes are summed up and
dispatched to the daemon using the specified \fIname\fR as an identifier. This
allows one to \*(L"group\*(R" several processes together. \fIname\fR must not contain
slashes.
.IP "\fBCollectContextSwitch\fR \fIBoolean\fR" 4
.IX Item "CollectContextSwitch Boolean"
Collect context switch of the process.
.ie n .SS "Plugin ""protocols"""
.el .SS "Plugin \f(CWprotocols\fP"
.IX Subsection "Plugin protocols"
Collects a lot of information about various network protocols, such as \fI\s-1IP\s0\fR,
\&\fI\s-1TCP\s0\fR, \fI\s-1UDP\s0\fR, etc.
.PP
Available configuration options:
.IP "\fBValue\fR \fISelector\fR" 4
.IX Item "Value Selector"
Selects whether or not to select a specific value. The string being matched is
of the form "\fIProtocol\fR:\fIValueName\fR", where \fIProtocol\fR will be used as the
plugin instance and \fIValueName\fR will be used as type instance. An example of
the string being used would be \f(CW\*(C`Tcp:RetransSegs\*(C'\fR.
.Sp
You can use regular expressions to match a large number of values with just one
configuration option. To select all \*(L"extended\*(R" \fI\s-1TCP\s0\fR values, you could use the
following statement:
.Sp
.Vb 1
\& Value "/^TcpExt:/"
.Ve
.Sp
Whether only matched values are selected or all matched values are ignored
depends on the \fBIgnoreSelected\fR. By default, only matched values are selected.
If no value is configured at all, all values will be selected.
.IP "\fBIgnoreSelected\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "IgnoreSelected true|false"
If set to \fBtrue\fR, inverts the selection made by \fBValue\fR, i.\ e. all
matching values will be ignored.
.ie n .SS "Plugin ""python"""
.el .SS "Plugin \f(CWpython\fP"
.IX Subsection "Plugin python"
This plugin embeds a Python-interpreter into collectd and provides an interface
to collectd's plugin system. See \fIcollectd\-python\fR\|(5) for its documentation.
.ie n .SS "Plugin ""routeros"""
.el .SS "Plugin \f(CWrouteros\fP"
.IX Subsection "Plugin routeros"
The \f(CW\*(C`routeros\*(C'\fR plugin connects to a device running \fIRouterOS\fR, the
Linux-based operating system for routers by \fIMikroTik\fR. The plugin uses
\&\fIlibrouteros\fR to connect and reads information about the interfaces and
wireless connections of the device. The configuration supports querying
multiple routers:
.PP
.Vb 10
\&
\&
\& Host "router0.example.com"
\& User "collectd"
\& Password "secr3t"
\& CollectInterface true
\& CollectCPULoad true
\& CollectMemory true
\&
\&
\& Host "router1.example.com"
\& User "collectd"
\& Password "5ecret"
\& CollectInterface true
\& CollectRegistrationTable true
\& CollectDF true
\& CollectDisk true
\&
\&
.Ve
.PP
As you can see above, the configuration of the \fIrouteros\fR plugin consists of
one or more \fB\fR blocks. Within each block, the following
options are understood:
.IP "\fBHost\fR \fIHost\fR" 4
.IX Item "Host Host"
Hostname or IP-address of the router to connect to.
.IP "\fBPort\fR \fIPort\fR" 4
.IX Item "Port Port"
Port name or port number used when connecting. If left unspecified, the default
will be chosen by \fIlibrouteros\fR, currently \*(L"8728\*(R". This option expects a
string argument, even when a numeric port number is given.
.IP "\fBUser\fR \fIUser\fR" 4
.IX Item "User User"
Use the user name \fIUser\fR to authenticate. Defaults to \*(L"admin\*(R".
.IP "\fBPassword\fR \fIPassword\fR" 4
.IX Item "Password Password"
Set the password used to authenticate.
.IP "\fBCollectInterface\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "CollectInterface true|false"
When set to \fBtrue\fR, interface statistics will be collected for all interfaces
present on the device. Defaults to \fBfalse\fR.
.IP "\fBCollectRegistrationTable\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "CollectRegistrationTable true|false"
When set to \fBtrue\fR, information about wireless \s-1LAN\s0 connections will be
collected. Defaults to \fBfalse\fR.
.IP "\fBCollectCPULoad\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "CollectCPULoad true|false"
When set to \fBtrue\fR, information about the \s-1CPU\s0 usage will be collected. The
number is a dimensionless value where zero indicates no \s-1CPU\s0 usage at all.
Defaults to \fBfalse\fR.
.IP "\fBCollectMemory\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "CollectMemory true|false"
When enabled, the amount of used and free memory will be collected. How used
memory is calculated is unknown, for example whether or not caches are counted
as used space.
Defaults to \fBfalse\fR.
.IP "\fBCollectDF\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "CollectDF true|false"
When enabled, the amount of used and free disk space will be collected.
Defaults to \fBfalse\fR.
.IP "\fBCollectDisk\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "CollectDisk true|false"
When enabled, the number of sectors written and bad blocks will be collected.
Defaults to \fBfalse\fR.
.ie n .SS "Plugin ""redis"""
.el .SS "Plugin \f(CWredis\fP"
.IX Subsection "Plugin redis"
The \fIRedis plugin\fR connects to one or more Redis servers and gathers
information about each server's state. For each server there is a \fINode\fR block
which configures the connection parameters for this node.
.PP
.Vb 11
\&
\&
\& Host "localhost"
\& Port "6379"
\& Timeout 2000
\&
\& Type "queue_length"
\& Instance "myqueue"
\&
\&
\&
.Ve
.PP
The information shown in the synopsis above is the \fIdefault configuration\fR
which is used by the plugin if no configuration is present.
.IP "\fBNode\fR \fINodename\fR" 4
.IX Item "Node Nodename"
The \fBNode\fR block identifies a new Redis node, that is a new Redis instance
running in an specified host and port. The name for node is a canonical
identifier which is used as \fIplugin instance\fR. It is limited to
64\ characters in length.
.IP "\fBHost\fR \fIHostname\fR" 4
.IX Item "Host Hostname"
The \fBHost\fR option is the hostname or IP-address where the Redis instance is
running on.
.IP "\fBPort\fR \fIPort\fR" 4
.IX Item "Port Port"
The \fBPort\fR option is the \s-1TCP\s0 port on which the Redis instance accepts
connections. Either a service name of a port number may be given. Please note
that numerical port numbers must be given as a string, too.
.IP "\fBPassword\fR \fIPassword\fR" 4
.IX Item "Password Password"
Use \fIPassword\fR to authenticate when connecting to \fIRedis\fR.
.IP "\fBTimeout\fR \fIMilliseconds\fR" 4
.IX Item "Timeout Milliseconds"
The \fBTimeout\fR option set the socket timeout for node response. Since the Redis
read function is blocking, you should keep this value as low as possible. Keep
in mind that the sum of all \fBTimeout\fR values for all \fBNodes\fR should be lower
than \fBInterval\fR defined globally.
.IP "\fBQuery\fR \fIQuerystring\fR" 4
.IX Item "Query Querystring"
The \fBQuery\fR block identifies a query to execute against the redis server.
There may be an arbitrary number of queries to execute.
.IP "\fBType\fR \fICollectd type\fR" 4
.IX Item "Type Collectd type"
Within a query definition, a valid collectd type to use as when submitting
the result of the query. When not supplied, will default to \fBgauge\fR.
.IP "\fBInstance\fR \fIType instance\fR" 4
.IX Item "Instance Type instance"
Within a query definition, an optional type instance to use when submitting
the result of the query. When not supplied will default to the escaped
command, up to 64 chars.
.ie n .SS "Plugin ""rrdcached"""
.el .SS "Plugin \f(CWrrdcached\fP"
.IX Subsection "Plugin rrdcached"
The \f(CW\*(C`rrdcached\*(C'\fR plugin uses the RRDtool accelerator daemon, \fIrrdcached\fR\|(1),
to store values to \s-1RRD\s0 files in an efficient manner. The combination of the
\&\f(CW\*(C`rrdcached\*(C'\fR \fBplugin\fR and the \f(CW\*(C`rrdcached\*(C'\fR \fBdaemon\fR is very similar to the
way the \f(CW\*(C`rrdtool\*(C'\fR plugin works (see below). The added abstraction layer
provides a number of benefits, though: Because the cache is not within
\&\f(CW\*(C`collectd\*(C'\fR anymore, it does not need to be flushed when \f(CW\*(C`collectd\*(C'\fR is to be
restarted. This results in much shorter (if any) gaps in graphs, especially
under heavy load. Also, the \f(CW\*(C`rrdtool\*(C'\fR command line utility is aware of the
daemon so that it can flush values to disk automatically when needed. This
allows one to integrate automated flushing of values into graphing solutions
much more easily.
.PP
There are disadvantages, though: The daemon may reside on a different host, so
it may not be possible for \f(CW\*(C`collectd\*(C'\fR to create the appropriate \s-1RRD\s0 files
anymore. And even if \f(CW\*(C`rrdcached\*(C'\fR runs on the same host, it may run in a
different base directory, so relative paths may do weird stuff if you're not
careful.
.PP
So the \fBrecommended configuration\fR is to let \f(CW\*(C`collectd\*(C'\fR and \f(CW\*(C`rrdcached\*(C'\fR run
on the same host, communicating via a \s-1UNIX\s0 domain socket. The \fBDataDir\fR
setting should be set to an absolute path, so that a changed base directory
does not result in \s-1RRD\s0 files being created\ / expected in the wrong place.
.IP "\fBDaemonAddress\fR \fIAddress\fR" 4
.IX Item "DaemonAddress Address"
Address of the daemon as understood by the \f(CW\*(C`rrdc_connect\*(C'\fR function of the \s-1RRD\s0
library. See \fIrrdcached\fR\|(1) for details. Example:
.Sp
.Vb 3
\&
\& DaemonAddress "unix:/var/run/rrdcached.sock"
\&
.Ve
.IP "\fBDataDir\fR \fIDirectory\fR" 4
.IX Item "DataDir Directory"
Set the base directory in which the \s-1RRD\s0 files reside. If this is a relative
path, it is relative to the working base directory of the \f(CW\*(C`rrdcached\*(C'\fR daemon!
Use of an absolute path is recommended.
.IP "\fBCreateFiles\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "CreateFiles true|false"
Enables or disables the creation of \s-1RRD\s0 files. If the daemon is not running
locally, or \fBDataDir\fR is set to a relative path, this will not work as
expected. Default is \fBtrue\fR.
.IP "\fBCreateFilesAsync\fR \fBfalse\fR|\fBtrue\fR" 4
.IX Item "CreateFilesAsync false|true"
When enabled, new \s-1RRD\s0 files are enabled asynchronously, using a separate thread
that runs in the background. This prevents writes to block, which is a problem
especially when many hundreds of files need to be created at once. However,
since the purpose of creating the files asynchronously is \fInot\fR to block until
the file is available, values before the file is available will be discarded.
When disabled (the default) files are created synchronously, blocking for a
short while, while the file is being written.
.IP "\fBStepSize\fR \fISeconds\fR" 4
.IX Item "StepSize Seconds"
\&\fBForce\fR the stepsize of newly created RRD-files. Ideally (and per default)
this setting is unset and the stepsize is set to the interval in which the data
is collected. Do not use this option unless you absolutely have to for some
reason. Setting this option may cause problems with the \f(CW\*(C`snmp plugin\*(C'\fR, the
\&\f(CW\*(C`exec plugin\*(C'\fR or when the daemon is set up to receive data from other hosts.
.IP "\fBHeartBeat\fR \fISeconds\fR" 4
.IX Item "HeartBeat Seconds"
\&\fBForce\fR the heartbeat of newly created RRD-files. This setting should be unset
in which case the heartbeat is set to twice the \fBStepSize\fR which should equal
the interval in which data is collected. Do not set this option unless you have
a very good reason to do so.
.IP "\fBRRARows\fR \fINumRows\fR" 4
.IX Item "RRARows NumRows"
The \f(CW\*(C`rrdtool plugin\*(C'\fR calculates the number of PDPs per \s-1CDP\s0 based on the
\&\fBStepSize\fR, this setting and a timespan. This plugin creates RRD-files with
three times five RRAs, i. e. five RRAs with the CFs \fB\s-1MIN\s0\fR, \fB\s-1AVERAGE\s0\fR, and
\&\fB\s-1MAX\s0\fR. The five RRAs are optimized for graphs covering one hour, one day, one
week, one month, and one year.
.Sp
So for each timespan, it calculates how many PDPs need to be consolidated into
one \s-1CDP\s0 by calculating:
number of PDPs = timespan / (stepsize * rrarows)
.Sp
Bottom line is, set this no smaller than the width of you graphs in pixels. The
default is 1200.
.IP "\fBRRATimespan\fR \fISeconds\fR" 4
.IX Item "RRATimespan Seconds"
Adds an RRA-timespan, given in seconds. Use this option multiple times to have
more then one \s-1RRA.\s0 If this option is never used, the built-in default of (3600,
86400, 604800, 2678400, 31622400) is used.
.Sp
For more information on how RRA-sizes are calculated see \fBRRARows\fR above.
.IP "\fB\s-1XFF\s0\fR \fIFactor\fR" 4
.IX Item "XFF Factor"
Set the \*(L"XFiles Factor\*(R". The default is 0.1. If unsure, don't set this option.
\&\fIFactor\fR must be in the range \f(CW\*(C`[0.0\-1.0)\*(C'\fR, i.e. between zero (inclusive) and
one (exclusive).
.IP "\fBCollectStatistics\fR \fBfalse\fR|\fBtrue\fR" 4
.IX Item "CollectStatistics false|true"
When set to \fBtrue\fR, various statistics about the \fIrrdcached\fR daemon will be
collected, with \*(L"rrdcached\*(R" as the \fIplugin name\fR. Defaults to \fBfalse\fR.
.Sp
Statistics are read via \fIrrdcached\fRs socket using the \s-1STATS\s0 command.
See \fIrrdcached\fR\|(1) for details.
.ie n .SS "Plugin ""rrdtool"""
.el .SS "Plugin \f(CWrrdtool\fP"
.IX Subsection "Plugin rrdtool"
You can use the settings \fBStepSize\fR, \fBHeartBeat\fR, \fBRRARows\fR, and \fB\s-1XFF\s0\fR to
fine-tune your RRD-files. Please read \fIrrdcreate\fR\|(1) if you encounter problems
using these settings. If you don't want to dive into the depths of RRDtool, you
can safely ignore these settings.
.IP "\fBDataDir\fR \fIDirectory\fR" 4
.IX Item "DataDir Directory"
Set the directory to store \s-1RRD\s0 files under. By default \s-1RRD\s0 files are generated
beneath the daemon's working directory, i.e. the \fBBaseDir\fR.
.IP "\fBCreateFilesAsync\fR \fBfalse\fR|\fBtrue\fR" 4
.IX Item "CreateFilesAsync false|true"
When enabled, new \s-1RRD\s0 files are enabled asynchronously, using a separate thread
that runs in the background. This prevents writes to block, which is a problem
especially when many hundreds of files need to be created at once. However,
since the purpose of creating the files asynchronously is \fInot\fR to block until
the file is available, values before the file is available will be discarded.
When disabled (the default) files are created synchronously, blocking for a
short while, while the file is being written.
.IP "\fBStepSize\fR \fISeconds\fR" 4
.IX Item "StepSize Seconds"
\&\fBForce\fR the stepsize of newly created RRD-files. Ideally (and per default)
this setting is unset and the stepsize is set to the interval in which the data
is collected. Do not use this option unless you absolutely have to for some
reason. Setting this option may cause problems with the \f(CW\*(C`snmp plugin\*(C'\fR, the
\&\f(CW\*(C`exec plugin\*(C'\fR or when the daemon is set up to receive data from other hosts.
.IP "\fBHeartBeat\fR \fISeconds\fR" 4
.IX Item "HeartBeat Seconds"
\&\fBForce\fR the heartbeat of newly created RRD-files. This setting should be unset
in which case the heartbeat is set to twice the \fBStepSize\fR which should equal
the interval in which data is collected. Do not set this option unless you have
a very good reason to do so.
.IP "\fBRRARows\fR \fINumRows\fR" 4
.IX Item "RRARows NumRows"
The \f(CW\*(C`rrdtool plugin\*(C'\fR calculates the number of PDPs per \s-1CDP\s0 based on the
\&\fBStepSize\fR, this setting and a timespan. This plugin creates RRD-files with
three times five RRAs, i.e. five RRAs with the CFs \fB\s-1MIN\s0\fR, \fB\s-1AVERAGE\s0\fR, and
\&\fB\s-1MAX\s0\fR. The five RRAs are optimized for graphs covering one hour, one day, one
week, one month, and one year.
.Sp
So for each timespan, it calculates how many PDPs need to be consolidated into
one \s-1CDP\s0 by calculating:
number of PDPs = timespan / (stepsize * rrarows)
.Sp
Bottom line is, set this no smaller than the width of you graphs in pixels. The
default is 1200.
.IP "\fBRRATimespan\fR \fISeconds\fR" 4
.IX Item "RRATimespan Seconds"
Adds an RRA-timespan, given in seconds. Use this option multiple times to have
more then one \s-1RRA.\s0 If this option is never used, the built-in default of (3600,
86400, 604800, 2678400, 31622400) is used.
.Sp
For more information on how RRA-sizes are calculated see \fBRRARows\fR above.
.IP "\fB\s-1XFF\s0\fR \fIFactor\fR" 4
.IX Item "XFF Factor"
Set the \*(L"XFiles Factor\*(R". The default is 0.1. If unsure, don't set this option.
\&\fIFactor\fR must be in the range \f(CW\*(C`[0.0\-1.0)\*(C'\fR, i.e. between zero (inclusive) and
one (exclusive).
.IP "\fBCacheFlush\fR \fISeconds\fR" 4
.IX Item "CacheFlush Seconds"
When the \f(CW\*(C`rrdtool\*(C'\fR plugin uses a cache (by setting \fBCacheTimeout\fR, see below)
it writes all values for a certain RRD-file if the oldest value is older than
(or equal to) the number of seconds specified. If some RRD-file is not updated
anymore for some reason (the computer was shut down, the network is broken,
etc.) some values may still be in the cache. If \fBCacheFlush\fR is set, then the
entire cache is searched for entries older than \fBCacheTimeout\fR seconds and
written to disk every \fISeconds\fR seconds. Since this is kind of expensive and
does nothing under normal circumstances, this value should not be too small.
900 seconds might be a good value, though setting this to 7200 seconds doesn't
normally do much harm either.
.IP "\fBCacheTimeout\fR \fISeconds\fR" 4
.IX Item "CacheTimeout Seconds"
If this option is set to a value greater than zero, the \f(CW\*(C`rrdtool plugin\*(C'\fR will
save values in a cache, as described above. Writing multiple values at once
reduces IO-operations and thus lessens the load produced by updating the files.
The trade off is that the graphs kind of \*(L"drag behind\*(R" and that more memory is
used.
.IP "\fBWritesPerSecond\fR \fIUpdates\fR" 4
.IX Item "WritesPerSecond Updates"
When collecting many statistics with collectd and the \f(CW\*(C`rrdtool\*(C'\fR plugin, you
will run serious performance problems. The \fBCacheFlush\fR setting and the
internal update queue assert that collectd continues to work just fine even
under heavy load, but the system may become very unresponsive and slow. This is
a problem especially if you create graphs from the \s-1RRD\s0 files on the same
machine, for example using the \f(CW\*(C`graph.cgi\*(C'\fR script included in the
\&\f(CW\*(C`contrib/collection3/\*(C'\fR directory.
.Sp
This setting is designed for very large setups. Setting this option to a value
between 25 and 80 updates per second, depending on your hardware, will leave
the server responsive enough to draw graphs even while all the cached values
are written to disk. Flushed values, i.\ e. values that are forced to disk
by the \fB\s-1FLUSH\s0\fR command, are \fBnot\fR effected by this limit. They are still
written as fast as possible, so that web frontends have up to date data when
generating graphs.
.Sp
For example: If you have 100,000 \s-1RRD\s0 files and set \fBWritesPerSecond\fR to 30
updates per second, writing all values to disk will take approximately
56\ minutes. Together with the flushing ability that's integrated into
\&\*(L"collection3\*(R" you'll end up with a responsive and fast system, up to date
graphs and basically a \*(L"backup\*(R" of your values every hour.
.IP "\fBRandomTimeout\fR \fISeconds\fR" 4
.IX Item "RandomTimeout Seconds"
When set, the actual timeout for each value is chosen randomly between
\&\fICacheTimeout\fR\-\fIRandomTimeout\fR and \fICacheTimeout\fR+\fIRandomTimeout\fR. The
intention is to avoid high load situations that appear when many values timeout
at the same time. This is especially a problem shortly after the daemon starts,
because all values were added to the internal cache at roughly the same time.
.ie n .SS "Plugin ""sensors"""
.el .SS "Plugin \f(CWsensors\fP"
.IX Subsection "Plugin sensors"
The \fISensors plugin\fR uses \fBlm_sensors\fR to retrieve sensor-values. This means
that all the needed modules have to be loaded and lm_sensors has to be
configured (most likely by editing \fI/etc/sensors.conf\fR. Read
\&\fIsensors.conf\fR\|(5) for details.
.PP
The \fBlm_sensors\fR homepage can be found at
.
.IP "\fBSensorConfigFile\fR \fIFile\fR" 4
.IX Item "SensorConfigFile File"
Read the \fIlm_sensors\fR configuration from \fIFile\fR. When unset (recommended),
the library's default will be used.
.IP "\fBSensor\fR \fIchip\-bus\-address/type\-feature\fR" 4
.IX Item "Sensor chip-bus-address/type-feature"
Selects the name of the sensor which you want to collect or ignore, depending
on the \fBIgnoreSelected\fR below. For example, the option "\fBSensor\fR
\&\fIit8712\-isa\-0290/voltage\-in1\fR" will cause collectd to gather data for the
voltage sensor \fIin1\fR of the \fIit8712\fR on the isa bus at the address 0290.
.IP "\fBIgnoreSelected\fR \fItrue\fR|\fIfalse\fR" 4
.IX Item "IgnoreSelected true|false"
If no configuration if given, the \fBsensors\fR\-plugin will collect data from all
sensors. This may not be practical, especially for uninteresting sensors.
Thus, you can use the \fBSensor\fR\-option to pick the sensors you're interested
in. Sometimes, however, it's easier/preferred to collect all sensors \fIexcept\fR a
few ones. This option enables you to do that: By setting \fBIgnoreSelected\fR to
\&\fItrue\fR the effect of \fBSensor\fR is inverted: All selected sensors are ignored
and all other sensors are collected.
.IP "\fBUseLabels\fR \fItrue\fR|\fIfalse\fR" 4
.IX Item "UseLabels true|false"
Configures how sensor readings are reported. When set to \fItrue\fR, sensor
readings are reported using their descriptive label (e.g. \*(L"VCore\*(R"). When set to
\&\fIfalse\fR (the default) the sensor name is used (\*(L"in0\*(R").
.ie n .SS "Plugin ""sigrok"""
.el .SS "Plugin \f(CWsigrok\fP"
.IX Subsection "Plugin sigrok"
The \fIsigrok plugin\fR uses \fIlibsigrok\fR to retrieve measurements from any device
supported by the sigrok project.
.PP
\&\fBSynopsis\fR
.PP
.Vb 12
\&
\& LogLevel 3
\&
\& Driver "fluke\-dmm"
\& MinimumInterval 10
\& Conn "/dev/ttyUSB2"
\&
\&
\& Driver "cem\-dt\-885x"
\& Conn "/dev/ttyUSB1"
\&
\&
.Ve
.IP "\fBLogLevel\fR \fB0\-5\fR" 4
.IX Item "LogLevel 0-5"
The \fIsigrok\fR logging level to pass on to the \fIcollectd\fR log, as a number
between \fB0\fR and \fB5\fR (inclusive). These levels correspond to \f(CW\*(C`None\*(C'\fR,
\&\f(CW\*(C`Errors\*(C'\fR, \f(CW\*(C`Warnings\*(C'\fR, \f(CW\*(C`Informational\*(C'\fR, \f(CW\*(C`Debug \*(C'\fRand \f(CW\*(C`Spew\*(C'\fR, respectively.
The default is \fB2\fR (\f(CW\*(C`Warnings\*(C'\fR). The \fIsigrok\fR log messages, regardless of
their level, are always submitted to \fIcollectd\fR at its \s-1INFO\s0 log level.
.IP "<\fBDevice\fR \fIName\fR>" 4
.IX Item ""
A sigrok-supported device, uniquely identified by this section's options. The
\&\fIName\fR is passed to \fIcollectd\fR as the \fIplugin instance\fR.
.IP "\fBDriver\fR \fIDriverName\fR" 4
.IX Item "Driver DriverName"
The sigrok driver to use for this device.
.IP "\fBConn\fR \fIConnectionSpec\fR" 4
.IX Item "Conn ConnectionSpec"
If the device cannot be auto-discovered, or more than one might be discovered
by the driver, \fIConnectionSpec\fR specifies the connection string to the device.
It can be of the form of a device path (e.g.\ \f(CW\*(C`/dev/ttyUSB2\*(C'\fR), or, in
case of a non-serial USB-connected device, the \s-1USB \s0\fIVendorID\fR\fB.\fR\fIProductID\fR
separated by a period (e.g.\ \f(CW0403.6001\fR). A \s-1USB\s0 device can also be
specified as \fIBus\fR\fB.\fR\fIAddress\fR (e.g.\ \f(CW1.41\fR).
.IP "\fBSerialComm\fR \fISerialSpec\fR" 4
.IX Item "SerialComm SerialSpec"
For serial devices with non-standard port settings, this option can be used
to specify them in a form understood by \fIsigrok\fR, e.g.\ \f(CW\*(C`9600/8n1\*(C'\fR.
This should not be necessary; drivers know how to communicate with devices they
support.
.IP "\fBMinimumInterval\fR \fISeconds\fR" 4
.IX Item "MinimumInterval Seconds"
Specifies the minimum time between measurement dispatches to \fIcollectd\fR, in
seconds. Since some \fIsigrok\fR supported devices can acquire measurements many
times per second, it may be necessary to throttle these. For example, the
\&\fI\s-1RRD\s0 plugin\fR cannot process writes more than once per second.
.Sp
The default \fBMinimumInterval\fR is \fB0\fR, meaning measurements received from the
device are always dispatched to \fIcollectd\fR. When throttled, unused
measurements are discarded.
.ie n .SS "Plugin ""smart"""
.el .SS "Plugin \f(CWsmart\fP"
.IX Subsection "Plugin smart"
The \f(CW\*(C`smart\*(C'\fR plugin collects \s-1SMART\s0 information from physical
disks. Values collectd include temperature, power cycle count, poweron
time and bad sectors. Also, all \s-1SMART\s0 attributes are collected along
with the normalized current value, the worst value, the threshold and
a human readable value.
.PP
Using the following two options you can ignore some disks or configure the
collection only of specific disks.
.IP "\fBDisk\fR \fIName\fR" 4
.IX Item "Disk Name"
Select the disk \fIName\fR. Whether it is collected or ignored depends on the
\&\fBIgnoreSelected\fR setting, see below. As with other plugins that use the
daemon's ignorelist functionality, a string that starts and ends with a slash
is interpreted as a regular expression. Examples:
.Sp
.Vb 2
\& Disk "sdd"
\& Disk "/hda[34]/"
.Ve
.IP "\fBIgnoreSelected\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "IgnoreSelected true|false"
Sets whether selected disks, i.\ e. the ones matches by any of the \fBDisk\fR
statements, are ignored or if all other disks are ignored. The behavior
(hopefully) is intuitive: If no \fBDisk\fR option is configured, all disks are
collected. If at least one \fBDisk\fR option is given and no \fBIgnoreSelected\fR or
set to \fBfalse\fR, \fBonly\fR matching disks will be collected. If \fBIgnoreSelected\fR
is set to \fBtrue\fR, all disks are collected \fBexcept\fR the ones matched.
.IP "\fBIgnoreSleepMode\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "IgnoreSleepMode true|false"
Normally, the \f(CW\*(C`smart\*(C'\fR plugin will ignore disks that are reported to be asleep.
This option disables the sleep mode check and allows the plugin to collect data
from these disks anyway. This is useful in cases where libatasmart mistakenly
reports disks as asleep because it has not been updated to incorporate support
for newer idle states in the \s-1ATA\s0 spec.
.IP "\fBUseSerial\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "UseSerial true|false"
A disk's kernel name (e.g., sda) can change from one boot to the next. If this
option is enabled, the \f(CW\*(C`smart\*(C'\fR plugin will use the disk's serial number (e.g.,
\&\s-1HGST_HUH728080ALE600_2EJ8VH8X\s0) instead of the kernel name as the key for
storing data. This ensures that the data for a given disk will be kept together
even if the kernel name changes.
.ie n .SS "Plugin ""snmp"""
.el .SS "Plugin \f(CWsnmp\fP"
.IX Subsection "Plugin snmp"
Since the configuration of the \f(CW\*(C`snmp plugin\*(C'\fR is a little more complicated than
other plugins, its documentation has been moved to an own manpage,
\&\fIcollectd\-snmp\fR\|(5). Please see there for details.
.ie n .SS "Plugin ""statsd"""
.el .SS "Plugin \f(CWstatsd\fP"
.IX Subsection "Plugin statsd"
The \fIstatsd plugin\fR listens to a \s-1UDP\s0 socket, reads \*(L"events\*(R" in the statsd
protocol and dispatches rates or other aggregates of these numbers
periodically.
.PP
The plugin implements the \fICounter\fR, \fITimer\fR, \fIGauge\fR and \fISet\fR types which
are dispatched as the \fIcollectd\fR types \f(CW\*(C`derive\*(C'\fR, \f(CW\*(C`latency\*(C'\fR, \f(CW\*(C`gauge\*(C'\fR and
\&\f(CW\*(C`objects\*(C'\fR respectively.
.PP
The following configuration options are valid:
.IP "\fBHost\fR \fIHost\fR" 4
.IX Item "Host Host"
Bind to the hostname / address \fIHost\fR. By default, the plugin will bind to the
\&\*(L"any\*(R" address, i.e. accept packets sent to any of the hosts addresses.
.IP "\fBPort\fR \fIPort\fR" 4
.IX Item "Port Port"
\&\s-1UDP\s0 port to listen to. This can be either a service name or a port number.
Defaults to \f(CW8125\fR.
.IP "\fBDeleteCounters\fR \fBfalse\fR|\fBtrue\fR" 4
.IX Item "DeleteCounters false|true"
.PD 0
.IP "\fBDeleteTimers\fR \fBfalse\fR|\fBtrue\fR" 4
.IX Item "DeleteTimers false|true"
.IP "\fBDeleteGauges\fR \fBfalse\fR|\fBtrue\fR" 4
.IX Item "DeleteGauges false|true"
.IP "\fBDeleteSets\fR \fBfalse\fR|\fBtrue\fR" 4
.IX Item "DeleteSets false|true"
.PD
These options control what happens if metrics are not updated in an interval.
If set to \fBFalse\fR, the default, metrics are dispatched unchanged, i.e. the
rate of counters and size of sets will be zero, timers report \f(CW\*(C`NaN\*(C'\fR and gauges
are unchanged. If set to \fBTrue\fR, the such metrics are not dispatched and
removed from the internal cache.
.IP "\fBCounterSum\fR \fBfalse\fR|\fBtrue\fR" 4
.IX Item "CounterSum false|true"
When enabled, creates a \f(CW\*(C`count\*(C'\fR metric which reports the change since the last
read. This option primarily exists for compatibility with the \fIstatsd\fR
implementation by Etsy.
.IP "\fBTimerPercentile\fR \fIPercent\fR" 4
.IX Item "TimerPercentile Percent"
Calculate and dispatch the configured percentile, i.e. compute the latency, so
that \fIPercent\fR of all reported timers are smaller than or equal to the
computed latency. This is useful for cutting off the long tail latency, as it's
often done in \fIService Level Agreements\fR (SLAs).
.Sp
Different percentiles can be calculated by setting this option several times.
If none are specified, no percentiles are calculated / dispatched.
.IP "\fBTimerLower\fR \fBfalse\fR|\fBtrue\fR" 4
.IX Item "TimerLower false|true"
.PD 0
.IP "\fBTimerUpper\fR \fBfalse\fR|\fBtrue\fR" 4
.IX Item "TimerUpper false|true"
.IP "\fBTimerSum\fR \fBfalse\fR|\fBtrue\fR" 4
.IX Item "TimerSum false|true"
.IP "\fBTimerCount\fR \fBfalse\fR|\fBtrue\fR" 4
.IX Item "TimerCount false|true"
.PD
Calculate and dispatch various values out of \fITimer\fR metrics received during
an interval. If set to \fBFalse\fR, the default, these values aren't calculated /
dispatched.
.ie n .SS "Plugin ""swap"""
.el .SS "Plugin \f(CWswap\fP"
.IX Subsection "Plugin swap"
The \fISwap plugin\fR collects information about used and available swap space. On
\&\fILinux\fR and \fISolaris\fR, the following options are available:
.IP "\fBReportByDevice\fR \fBfalse\fR|\fBtrue\fR" 4
.IX Item "ReportByDevice false|true"
Configures how to report physical swap devices. If set to \fBfalse\fR (the
default), the summary over all swap devices is reported only, i.e. the globally
used and available space over all devices. If \fBtrue\fR is configured, the used
and available space of each device will be reported separately.
.Sp
This option is only available if the \fISwap plugin\fR can read \f(CW\*(C`/proc/swaps\*(C'\fR
(under Linux) or use the \fIswapctl\fR\|(2) mechanism (under \fISolaris\fR).
.IP "\fBReportBytes\fR \fBfalse\fR|\fBtrue\fR" 4
.IX Item "ReportBytes false|true"
When enabled, the \fIswap I/O\fR is reported in bytes. When disabled, the default,
\&\fIswap I/O\fR is reported in pages. This option is available under Linux only.
.IP "\fBValuesAbsolute\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "ValuesAbsolute true|false"
Enables or disables reporting of absolute swap metrics, i.e. number of \fIbytes\fR
available and used. Defaults to \fBtrue\fR.
.IP "\fBValuesPercentage\fR \fBfalse\fR|\fBtrue\fR" 4
.IX Item "ValuesPercentage false|true"
Enables or disables reporting of relative swap metrics, i.e. \fIpercent\fR
available and free. Defaults to \fBfalse\fR.
.Sp
This is useful for deploying \fIcollectd\fR in a heterogeneous environment, where
swap sizes differ and you want to specify generic thresholds or similar.
.ie n .SS "Plugin ""syslog"""
.el .SS "Plugin \f(CWsyslog\fP"
.IX Subsection "Plugin syslog"
.IP "\fBLogLevel\fR \fBdebug|info|notice|warning|err\fR" 4
.IX Item "LogLevel debug|info|notice|warning|err"
Sets the log-level. If, for example, set to \fBnotice\fR, then all events with
severity \fBnotice\fR, \fBwarning\fR, or \fBerr\fR will be submitted to the
syslog-daemon.
.Sp
Please note that \fBdebug\fR is only available if collectd has been compiled with
debugging support.
.IP "\fBNotifyLevel\fR \fB\s-1OKAY\s0\fR|\fB\s-1WARNING\s0\fR|\fB\s-1FAILURE\s0\fR" 4
.IX Item "NotifyLevel OKAY|WARNING|FAILURE"
Controls which notifications should be sent to syslog. The default behaviour is
not to send any. Less severe notifications always imply logging more severe
notifications: Setting this to \fB\s-1OKAY\s0\fR means all notifications will be sent to
syslog, setting this to \fB\s-1WARNING\s0\fR will send \fB\s-1WARNING\s0\fR and \fB\s-1FAILURE\s0\fR
notifications but will dismiss \fB\s-1OKAY\s0\fR notifications. Setting this option to
\&\fB\s-1FAILURE\s0\fR will only send failures to syslog.
.ie n .SS "Plugin ""table"""
.el .SS "Plugin \f(CWtable\fP"
.IX Subsection "Plugin table"
The \f(CW\*(C`table plugin\*(C'\fR provides generic means to parse tabular data and dispatch
user specified values. Values are selected based on column numbers. For
example, this plugin may be used to get values from the Linux \fIproc\fR\|(5)
filesystem or \s-1CSV \s0(comma separated values) files.
.PP
.Vb 10
\&
\&
\&
.Ve
.PP
The configuration consists of one or more \fBTable\fR blocks, each of which
configures one file to parse. Within each \fBTable\fR block, there are one or
more \fBResult\fR blocks, which configure which data to select and how to
interpret it.
.PP
The following options are available inside a \fBTable\fR block:
.IP "\fBInstance\fR \fIinstance\fR" 4
.IX Item "Instance instance"
If specified, \fIinstance\fR is used as the plugin instance. So, in the above
example, the plugin name \f(CW\*(C`table\-slabinfo\*(C'\fR would be used. If omitted, the
filename of the table is used instead, with all special characters replaced
with an underscore (\f(CW\*(C`_\*(C'\fR).
.IP "\fBSeparator\fR \fIstring\fR" 4
.IX Item "Separator string"
Any character of \fIstring\fR is interpreted as a delimiter between the different
columns of the table. A sequence of two or more contiguous delimiters in the
table is considered to be a single delimiter, i.\ e. there cannot be any
empty columns. The plugin uses the \fIstrtok_r\fR\|(3) function to parse the lines
of a table \- see its documentation for more details. This option is mandatory.
.Sp
A horizontal tab, newline and carriage return may be specified by \f(CW\*(C`\e\et\*(C'\fR,
\&\f(CW\*(C`\e\en\*(C'\fR and \f(CW\*(C`\e\er\*(C'\fR respectively. Please note that the double backslashes are
required because of collectd's config parsing.
.PP
The following options are available inside a \fBResult\fR block:
.IP "\fBType\fR \fItype\fR" 4
.IX Item "Type type"
Sets the type used to dispatch the values to the daemon. Detailed information
about types and their configuration can be found in \fItypes.db\fR\|(5). This
option is mandatory.
.IP "\fBInstancePrefix\fR \fIprefix\fR" 4
.IX Item "InstancePrefix prefix"
If specified, prepend \fIprefix\fR to the type instance. If omitted, only the
\&\fBInstancesFrom\fR option is considered for the type instance.
.IP "\fBInstancesFrom\fR \fIcolumn0\fR [\fIcolumn1\fR ...]" 4
.IX Item "InstancesFrom column0 [column1 ...]"
If specified, the content of the given columns (identified by the column
number starting at zero) will be used to create the type instance for each
row. Multiple values (and the instance prefix) will be joined together with
dashes (\fI\-\fR) as separation character. If omitted, only the \fBInstancePrefix\fR
option is considered for the type instance.
.Sp
The plugin itself does not check whether or not all built instances are
different. ItXs your responsibility to assure that each is unique. This is
especially true, if you do not specify \fBInstancesFrom\fR: \fBYou\fR have to make
sure that the table only contains one row.
.Sp
If neither \fBInstancePrefix\fR nor \fBInstancesFrom\fR is given, the type instance
will be empty.
.IP "\fBValuesFrom\fR \fIcolumn0\fR [\fIcolumn1\fR ...]" 4
.IX Item "ValuesFrom column0 [column1 ...]"
Specifies the columns (identified by the column numbers starting at zero)
whose content is used as the actual data for the data sets that are dispatched
to the daemon. How many such columns you need is determined by the \fBType\fR
setting above. If you specify too many or not enough columns, the plugin will
complain about that and no data will be submitted to the daemon. The plugin
uses \fIstrtoll\fR\|(3) and \fIstrtod\fR\|(3) to parse counter and gauge values
respectively, so anything supported by those functions is supported by the
plugin as well. This option is mandatory.
.ie n .SS "Plugin ""tail"""
.el .SS "Plugin \f(CWtail\fP"
.IX Subsection "Plugin tail"
The \f(CW\*(C`tail plugin\*(C'\fR follows logfiles, just like \fItail\fR\|(1) does, parses
each line and dispatches found values. What is matched can be configured by the
user using (extended) regular expressions, as described in \fIregex\fR\|(7).
.PP
.Vb 10
\&
\&
\& Instance "exim"
\& Interval 60
\&
\& Regex "S=([1\-9][0\-9]*)"
\& DSType "CounterAdd"
\& Type "ipt_bytes"
\& Instance "total"
\&
\&
\& Regex "\e\e"
\& ExcludeRegex "\e\e.*mail_spool defer"
\& DSType "CounterInc"
\& Type "counter"
\& Instance "local_user"
\&
\&
\& Regex "l=([0\-9]*\e\e.[0\-9]*)"
\&
\& Percentile 99
\& Bucket 0 100
\&
\& Type "latency"
\& Instance "foo"
\&
\&
\&
.Ve
.PP
The config consists of one or more \fBFile\fR blocks, each of which configures one
logfile to parse. Within each \fBFile\fR block, there are one or more \fBMatch\fR
blocks, which configure a regular expression to search for.
.PP
The \fBInstance\fR option in the \fBFile\fR block may be used to set the plugin
instance. So in the above example the plugin name \f(CW\*(C`tail\-foo\*(C'\fR would be used.
This plugin instance is for all \fBMatch\fR blocks that \fBfollow\fR it, until the
next \fBInstance\fR option. This way you can extract several plugin instances from
one logfile, handy when parsing syslog and the like.
.PP
The \fBInterval\fR option allows you to define the length of time between reads. If
this is not set, the default Interval will be used.
.PP
Each \fBMatch\fR block has the following options to describe how the match should
be performed:
.IP "\fBRegex\fR \fIregex\fR" 4
.IX Item "Regex regex"
Sets the regular expression to use for matching against a line. The first
subexpression has to match something that can be turned into a number by
\&\fIstrtoll\fR\|(3) or \fIstrtod\fR\|(3), depending on the value of \f(CW\*(C`CounterAdd\*(C'\fR, see
below. Because \fBextended\fR regular expressions are used, you do not need to use
backslashes for subexpressions! If in doubt, please consult \fIregex\fR\|(7). Due to
collectd's config parsing you need to escape backslashes, though. So if you
want to match literal parentheses you need to do the following:
.Sp
.Vb 1
\& Regex "SPAM \e\e(Score: (\-?[0\-9]+\e\e.[0\-9]+)\e\e)"
.Ve
.IP "\fBExcludeRegex\fR \fIregex\fR" 4
.IX Item "ExcludeRegex regex"
Sets an optional regular expression to use for excluding lines from the match.
An example which excludes all connections from localhost from the match:
.Sp
.Vb 1
\& ExcludeRegex "127\e\e.0\e\e.0\e\e.1"
.Ve
.IP "\fBDSType\fR \fIType\fR" 4
.IX Item "DSType Type"
Sets how the values are cumulated. \fIType\fR is one of:
.RS 4
.IP "\fBGaugeAverage\fR" 4
.IX Item "GaugeAverage"
Calculate the average.
.IP "\fBGaugeMin\fR" 4
.IX Item "GaugeMin"
Use the smallest number only.
.IP "\fBGaugeMax\fR" 4
.IX Item "GaugeMax"
Use the greatest number only.
.IP "\fBGaugeLast\fR" 4
.IX Item "GaugeLast"
Use the last number found.
.IP "\fBGaugePersist\fR" 4
.IX Item "GaugePersist"
Use the last number found. The number is not reset at the end of an interval.
It is continously reported until another number is matched. This is intended
for cases in which only state changes are reported, for example a thermometer
that only reports the temperature when it changes.
.IP "\fBCounterSet\fR" 4
.IX Item "CounterSet"
.PD 0
.IP "\fBDeriveSet\fR" 4
.IX Item "DeriveSet"
.IP "\fBAbsoluteSet\fR" 4
.IX Item "AbsoluteSet"
.PD
The matched number is a counter. Simply \fIsets\fR the internal counter to this
value. Variants exist for \f(CW\*(C`COUNTER\*(C'\fR, \f(CW\*(C`DERIVE\*(C'\fR, and \f(CW\*(C`ABSOLUTE\*(C'\fR data sources.
.IP "\fBGaugeAdd\fR" 4
.IX Item "GaugeAdd"
.PD 0
.IP "\fBCounterAdd\fR" 4
.IX Item "CounterAdd"
.IP "\fBDeriveAdd\fR" 4
.IX Item "DeriveAdd"
.PD
Add the matched value to the internal counter. In case of \fBDeriveAdd\fR, the
matched number may be negative, which will effectively subtract from the
internal counter.
.IP "\fBGaugeInc\fR" 4
.IX Item "GaugeInc"
.PD 0
.IP "\fBCounterInc\fR" 4
.IX Item "CounterInc"
.IP "\fBDeriveInc\fR" 4
.IX Item "DeriveInc"
.PD
Increase the internal counter by one. These \fBDSType\fR are the only ones that do
not use the matched subexpression, but simply count the number of matched
lines. Thus, you may use a regular expression without submatch in this case.
.IP "\fBDistribution\fR" 4
.IX Item "Distribution"
Type to do calculations based on the distribution of values, primarily
calculating percentiles. This is primarily geared towards latency, but can be
used for other metrics as well. The range of values tracked with this setting
must be in the range (0X2^34) and can be fractional. Please note that neither
zero nor 2^34 are inclusive bounds, i.e. zero \fIcannot\fR be handled by a
distribution.
.Sp
This option must be used together with the \fBPercentile\fR and/or \fBBucket\fR
options.
.Sp
\&\fBSynopsis:\fR
.Sp
.Vb 4
\&
\& Percentile 99
\& Bucket 0 100
\&
.Ve
.RS 4
.IP "\fBPercentile\fR \fIPercent\fR" 4
.IX Item "Percentile Percent"
Calculate and dispatch the configured percentile, i.e. compute the value, so
that \fIPercent\fR of all matched values are smaller than or equal to the computed
latency.
.Sp
Metrics are reported with the \fItype\fR \fBType\fR (the value of the above option)
and the \fItype instance\fR \f(CW\*(C`[\-]\*(C'\fR.
.Sp
This option may be repeated to calculate more than one percentile.
.IP "\fBBucket\fR \fIlower_bound\fR \fIupper_bound\fR" 4
.IX Item "Bucket lower_bound upper_bound"
Export the number of values (a \f(CW\*(C`DERIVE\*(C'\fR) falling within the given range. Both,
\&\fIlower_bound\fR and \fIupper_bound\fR may be a fractional number, such as \fB0.5\fR.
Each \fBBucket\fR option specifies an interval \f(CW\*(C`(\f(CIlower_bound\f(CW,
\&\f(CIupper_bound\f(CW]\*(C'\fR, i.e. the range \fIexcludes\fR the lower bound and \fIincludes\fR
the upper bound. \fIlower_bound\fR and \fIupper_bound\fR may be zero, meaning no
lower/upper bound.
.Sp
To export the entire (0Xinf) range without overlap, use the upper bound of the
previous range as the lower bound of the following range. In other words, use
the following schema:
.Sp
.Vb 7
\& Bucket 0 1
\& Bucket 1 2
\& Bucket 2 5
\& Bucket 5 10
\& Bucket 10 20
\& Bucket 20 50
\& Bucket 50 0
.Ve
.Sp
Metrics are reported with the \fItype\fR \f(CW\*(C`bucket\*(C'\fR and the \fItype instance\fR
\&\f(CW\*(C`[\-]\-_\*(C'\fR.
.Sp
This option may be repeated to calculate more than one rate.
.RE
.RS 4
.RE
.RE
.RS 4
.Sp
The \fBGauge*\fR and \fBDistribution\fR types interpret the submatch as a floating
point number, using \fIstrtod\fR\|(3). The \fBCounter*\fR and \fBAbsoluteSet\fR types
interpret the submatch as an unsigned integer using \fIstrtoull\fR\|(3). The
\&\fBDerive*\fR types interpret the submatch as a signed integer using
\&\fIstrtoll\fR\|(3). \fBCounterInc\fR and \fBDeriveInc\fR do not use the submatch at all
and it may be omitted in this case.
.RE
.IP "\fBType\fR \fIType\fR" 4
.IX Item "Type Type"
Sets the type used to dispatch this value. Detailed information about types and
their configuration can be found in \fItypes.db\fR\|(5).
.IP "\fBInstance\fR \fITypeInstance\fR" 4
.IX Item "Instance TypeInstance"
This optional setting sets the type instance to use.
.ie n .SS "Plugin ""tail_csv"""
.el .SS "Plugin \f(CWtail_csv\fP"
.IX Subsection "Plugin tail_csv"
The \fItail_csv plugin\fR reads files in the \s-1CSV\s0 format, e.g. the statistics file
written by \fISnort\fR.
.PP
\&\fBSynopsis:\fR
.PP
.Vb 12
\&
\&
\& Type "percent"
\& Instance "dropped"
\& Index 1
\&
\&
\& Instance "snort\-eth0"
\& Interval 600
\& Collect "snort\-dropped"
\&
\&
.Ve
.PP
The configuration consists of one or more \fBMetric\fR blocks that define an index
into the line of the \s-1CSV\s0 file and how this value is mapped to \fIcollectd's\fR
internal representation. These are followed by one or more \fBInstance\fR blocks
which configure which file to read, in which interval and which metrics to
extract.
.IP "<\fBMetric\fR \fIName\fR>" 4
.IX Item ""
The \fBMetric\fR block configures a new metric to be extracted from the statistics
file and how it is mapped on \fIcollectd's\fR data model. The string \fIName\fR is
only used inside the \fBInstance\fR blocks to refer to this block, so you can use
one \fBMetric\fR block for multiple \s-1CSV\s0 files.
.RS 4
.IP "\fBType\fR \fIType\fR" 4
.IX Item "Type Type"
Configures which \fIType\fR to use when dispatching this metric. Types are defined
in the \fItypes.db\fR\|(5) file, see the appropriate manual page for more
information on specifying types. Only types with a single \fIdata source\fR are
supported by the \fItail_csv plugin\fR. The information whether the value is an
absolute value (i.e. a \f(CW\*(C`GAUGE\*(C'\fR) or a rate (i.e. a \f(CW\*(C`DERIVE\*(C'\fR) is taken from the
\&\fIType's\fR definition.
.IP "\fBInstance\fR \fITypeInstance\fR" 4
.IX Item "Instance TypeInstance"
If set, \fITypeInstance\fR is used to populate the type instance field of the
created value lists. Otherwise, no type instance is used.
.IP "\fBValueFrom\fR \fIIndex\fR" 4
.IX Item "ValueFrom Index"
Configure to read the value from the field with the zero-based index \fIIndex\fR.
If the value is parsed as signed integer, unsigned integer or double depends on
the \fBType\fR setting, see above.
.RE
.RS 4
.RE
.IP "<\fBFile\fR \fIPath\fR>" 4
.IX Item ""
Each \fBFile\fR block represents one \s-1CSV\s0 file to read. There must be at least one
\&\fIFile\fR block but there can be multiple if you have multiple \s-1CSV\s0 files.
.RS 4
.IP "\fBInstance\fR \fIPluginInstance\fR" 4
.IX Item "Instance PluginInstance"
Sets the \fIplugin instance\fR used when dispatching the values.
.IP "\fBCollect\fR \fIMetric\fR" 4
.IX Item "Collect Metric"
Specifies which \fIMetric\fR to collect. This option must be specified at least
once, and you can use this option multiple times to specify more than one
metric to be extracted from this statistic file.
.IP "\fBInterval\fR \fISeconds\fR" 4
.IX Item "Interval Seconds"
Configures the interval in which to read values from this instance / file.
Defaults to the plugin's default interval.
.IP "\fBTimeFrom\fR \fIIndex\fR" 4
.IX Item "TimeFrom Index"
Rather than using the local time when dispatching a value, read the timestamp
from the field with the zero-based index \fIIndex\fR. The value is interpreted as
seconds since epoch. The value is parsed as a double and may be factional.
.RE
.RS 4
.RE
.ie n .SS "Plugin ""teamspeak2"""
.el .SS "Plugin \f(CWteamspeak2\fP"
.IX Subsection "Plugin teamspeak2"
The \f(CW\*(C`teamspeak2 plugin\*(C'\fR connects to the query port of a teamspeak2 server and
polls interesting global and virtual server data. The plugin can query only one
physical server but unlimited virtual servers. You can use the following
options to configure it:
.IP "\fBHost\fR \fIhostname/ip\fR" 4
.IX Item "Host hostname/ip"
The hostname or ip which identifies the physical server.
Default: 127.0.0.1
.IP "\fBPort\fR \fIport\fR" 4
.IX Item "Port port"
The query port of the physical server. This needs to be a string.
Default: \*(L"51234\*(R"
.IP "\fBServer\fR \fIport\fR" 4
.IX Item "Server port"
This option has to be added once for every virtual server the plugin should
query. If you want to query the virtual server on port 8767 this is what the
option would look like:
.Sp
.Vb 1
\& Server "8767"
.Ve
.Sp
This option, although numeric, needs to be a string, i.\ e. you \fBmust\fR
use quotes around it! If no such statement is given only global information
will be collected.
.ie n .SS "Plugin ""ted"""
.el .SS "Plugin \f(CWted\fP"
.IX Subsection "Plugin ted"
The \fI\s-1TED\s0\fR plugin connects to a device of \*(L"The Energy Detective\*(R", a device to
measure power consumption. These devices are usually connected to a serial
(\s-1RS232\s0) or \s-1USB\s0 port. The plugin opens a configured device and tries to read the
current energy readings. For more information on \s-1TED,\s0 visit
.
.PP
Available configuration options:
.IP "\fBDevice\fR \fIPath\fR" 4
.IX Item "Device Path"
Path to the device on which \s-1TED\s0 is connected. collectd will need read and write
permissions on that file.
.Sp
Default: \fB/dev/ttyUSB0\fR
.IP "\fBRetries\fR \fINum\fR" 4
.IX Item "Retries Num"
Apparently reading from \s-1TED\s0 is not that reliable. You can therefore configure a
number of retries here. You only configure the \fIretries\fR here, to if you
specify zero, one reading will be performed (but no retries if that fails); if
you specify three, a maximum of four readings are performed. Negative values
are illegal.
.Sp
Default: \fB0\fR
.ie n .SS "Plugin ""tcpconns"""
.el .SS "Plugin \f(CWtcpconns\fP"
.IX Subsection "Plugin tcpconns"
The \f(CW\*(C`tcpconns plugin\*(C'\fR counts the number of currently established \s-1TCP\s0
connections based on the local port and/or the remote port. Since there may be
a lot of connections the default if to count all connections with a local port,
for which a listening socket is opened. You can use the following options to
fine-tune the ports you are interested in:
.IP "\fBListeningPorts\fR \fItrue\fR|\fIfalse\fR" 4
.IX Item "ListeningPorts true|false"
If this option is set to \fItrue\fR, statistics for all local ports for which a
listening socket exists are collected. The default depends on \fBLocalPort\fR and
\&\fBRemotePort\fR (see below): If no port at all is specifically selected, the
default is to collect listening ports. If specific ports (no matter if local or
remote ports) are selected, this option defaults to \fIfalse\fR, i.\ e. only
the selected ports will be collected unless this option is set to \fItrue\fR
specifically.
.IP "\fBLocalPort\fR \fIPort\fR" 4
.IX Item "LocalPort Port"
Count the connections to a specific local port. This can be used to see how
many connections are handled by a specific daemon, e.\ g. the mailserver.
You have to specify the port in numeric form, so for the mailserver example
you'd need to set \fB25\fR.
.IP "\fBRemotePort\fR \fIPort\fR" 4
.IX Item "RemotePort Port"
Count the connections to a specific remote port. This is useful to see how
much a remote service is used. This is most useful if you want to know how many
connections a local service has opened to remote services, e.\ g. how many
connections a mail server or news server has to other mail or news servers, or
how many connections a web proxy holds to web servers. You have to give the
port in numeric form.
.IP "\fBAllPortsSummary\fR \fItrue\fR|\fIfalse\fR" 4
.IX Item "AllPortsSummary true|false"
If this option is set to \fItrue\fR a summary of statistics from all connections
are collected. This option defaults to \fIfalse\fR.
.ie n .SS "Plugin ""thermal"""
.el .SS "Plugin \f(CWthermal\fP"
.IX Subsection "Plugin thermal"
.IP "\fBForceUseProcfs\fR \fItrue\fR|\fIfalse\fR" 4
.IX Item "ForceUseProcfs true|false"
By default, the \fIThermal plugin\fR tries to read the statistics from the Linux
\&\f(CW\*(C`sysfs\*(C'\fR interface. If that is not available, the plugin falls back to the
\&\f(CW\*(C`procfs\*(C'\fR interface. By setting this option to \fItrue\fR, you can force the
plugin to use the latter. This option defaults to \fIfalse\fR.
.IP "\fBDevice\fR \fIDevice\fR" 4
.IX Item "Device Device"
Selects the name of the thermal device that you want to collect or ignore,
depending on the value of the \fBIgnoreSelected\fR option. This option may be
used multiple times to specify a list of devices.
.IP "\fBIgnoreSelected\fR \fItrue\fR|\fIfalse\fR" 4
.IX Item "IgnoreSelected true|false"
Invert the selection: If set to true, all devices \fBexcept\fR the ones that
match the device names specified by the \fBDevice\fR option are collected. By
default only selected devices are collected if a selection is made. If no
selection is configured at all, \fBall\fR devices are selected.
.ie n .SS "Plugin ""threshold"""
.el .SS "Plugin \f(CWthreshold\fP"
.IX Subsection "Plugin threshold"
The \fIThreshold plugin\fR checks values collected or received by \fIcollectd\fR
against a configurable \fIthreshold\fR and issues \fInotifications\fR if values are
out of bounds.
.PP
Documentation for this plugin is available in the \fIcollectd\-threshold\fR\|(5)
manual page.
.ie n .SS "Plugin ""tokyotyrant"""
.el .SS "Plugin \f(CWtokyotyrant\fP"
.IX Subsection "Plugin tokyotyrant"
The \fITokyoTyrant plugin\fR connects to a TokyoTyrant server and collects a
couple metrics: number of records, and database size on disk.
.IP "\fBHost\fR \fIHostname/IP\fR" 4
.IX Item "Host Hostname/IP"
The hostname or \s-1IP\s0 which identifies the server.
Default: \fB127.0.0.1\fR
.IP "\fBPort\fR \fIService/Port\fR" 4
.IX Item "Port Service/Port"
The query port of the server. This needs to be a string, even if the port is
given in its numeric form.
Default: \fB1978\fR
.ie n .SS "Plugin ""turbostat"""
.el .SS "Plugin \f(CWturbostat\fP"
.IX Subsection "Plugin turbostat"
The \fITurbostat plugin\fR reads \s-1CPU\s0 frequency and C\-state residency on modern
Intel processors by using \fIModel Specific Registers\fR.
.IP "\fBCoreCstates\fR \fIBitmask(Integer)\fR" 4
.IX Item "CoreCstates Bitmask(Integer)"
Bit mask of the list of core C\-states supported by the processor.
This option should only be used if the automated detection fails.
Default value extracted from the \s-1CPU\s0 model and family.
.Sp
Currently supported C\-states (by this plugin): 3, 6, 7
.Sp
\&\fBExample:\fR
.Sp
.Vb 2
\& All states (3, 6 and 7):
\& (1<<3) + (1<<6) + (1<<7) = 392
.Ve
.IP "\fBPackageCstates\fR \fIBitmask(Integer)\fR" 4
.IX Item "PackageCstates Bitmask(Integer)"
Bit mask of the list of packages C\-states supported by the processor. This
option should only be used if the automated detection fails. Default value
extracted from the \s-1CPU\s0 model and family.
.Sp
Currently supported C\-states (by this plugin): 2, 3, 6, 7, 8, 9, 10
.Sp
\&\fBExample:\fR
.Sp
.Vb 2
\& States 2, 3, 6 and 7:
\& (1<<2) + (1<<3) + (1<<6) + (1<<7) = 396
.Ve
.IP "\fBSystemManagementInterrupt\fR \fItrue\fR|\fIfalse\fR" 4
.IX Item "SystemManagementInterrupt true|false"
Boolean enabling the collection of the I/O System-Management Interrupt counter.
This option should only be used if the automated detection fails or if you want
to disable this feature.
.IP "\fBDigitalTemperatureSensor\fR \fItrue\fR|\fIfalse\fR" 4
.IX Item "DigitalTemperatureSensor true|false"
Boolean enabling the collection of the temperature of each core. This option
should only be used if the automated detection fails or if you want to disable
this feature.
.IP "\fBTCCActivationTemp\fR \fITemperature\fR" 4
.IX Item "TCCActivationTemp Temperature"
\&\fIThermal Control Circuit Activation Temperature\fR of the installed \s-1CPU.\s0 This
temperature is used when collecting the temperature of cores or packages. This
option should only be used if the automated detection fails. Default value
extracted from \fB\s-1MSR_IA32_TEMPERATURE_TARGET\s0\fR.
.IP "\fBRunningAveragePowerLimit\fR \fIBitmask(Integer)\fR" 4
.IX Item "RunningAveragePowerLimit Bitmask(Integer)"
Bit mask of the list of elements to be thermally monitored. This option should
only be used if the automated detection fails or if you want to disable some
collections. The different bits of this bit mask accepted by this plugin are:
.RS 4
.IP "0 ('1'): Package" 4
.IX Item "0 ('1'): Package"
.PD 0
.IP "1 ('2'): \s-1DRAM\s0" 4
.IX Item "1 ('2'): DRAM"
.IP "2 ('4'): Cores" 4
.IX Item "2 ('4'): Cores"
.IP "3 ('8'): Embedded graphic device" 4
.IX Item "3 ('8'): Embedded graphic device"
.RE
.RS 4
.RE
.IP "\fBLogicalCoreNames\fR \fItrue\fR|\fIfalse\fR" 4
.IX Item "LogicalCoreNames true|false"
.PD
Boolean enabling the use of logical core numbering for per core statistics.
When enabled, \f(CW\*(C`cpu\*(C'\fR is used as plugin instance, where \fIn\fR is a
sequential number assigned by the kernel. Otherwise, \f(CW\*(C`core\*(C'\fR is used
where \fIn\fR is the n\-th core of the socket, causing name conflicts when there is
more than one socket.
.ie n .SS "Plugin ""unixsock"""
.el .SS "Plugin \f(CWunixsock\fP"
.IX Subsection "Plugin unixsock"
.IP "\fBSocketFile\fR \fIPath\fR" 4
.IX Item "SocketFile Path"
Sets the socket-file which is to be created.
.IP "\fBSocketGroup\fR \fIGroup\fR" 4
.IX Item "SocketGroup Group"
If running as root change the group of the UNIX-socket after it has been
created. Defaults to \fBcollectd\fR.
.IP "\fBSocketPerms\fR \fIPermissions\fR" 4
.IX Item "SocketPerms Permissions"
Change the file permissions of the UNIX-socket after it has been created. The
permissions must be given as a numeric, octal value as you would pass to
\&\fIchmod\fR\|(1). Defaults to \fB0770\fR.
.IP "\fBDeleteSocket\fR \fBfalse\fR|\fBtrue\fR" 4
.IX Item "DeleteSocket false|true"
If set to \fBtrue\fR, delete the socket file before calling \fIbind\fR\|(2), if a file
with the given name already exists. If \fIcollectd\fR crashes a socket file may be
left over, preventing the daemon from opening a new socket when restarted.
Since this is potentially dangerous, this defaults to \fBfalse\fR.
.ie n .SS "Plugin ""uuid"""
.el .SS "Plugin \f(CWuuid\fP"
.IX Subsection "Plugin uuid"
This plugin, if loaded, causes the Hostname to be taken from the machine's
\&\s-1UUID.\s0 The \s-1UUID\s0 is a universally unique designation for the machine, usually
taken from the machine's \s-1BIOS.\s0 This is most useful if the machine is running in
a virtual environment such as Xen, in which case the \s-1UUID\s0 is preserved across
shutdowns and migration.
.PP
The following methods are used to find the machine's \s-1UUID,\s0 in order:
.IP "\(bu" 4
Check \fI/etc/uuid\fR (or \fIUUIDFile\fR).
.IP "\(bu" 4
Check for \s-1UUID\s0 from \s-1HAL \s0() if
present.
.IP "\(bu" 4
Check for \s-1UUID\s0 from \f(CW\*(C`dmidecode\*(C'\fR / \s-1SMBIOS.\s0
.IP "\(bu" 4
Check for \s-1UUID\s0 from Xen hypervisor.
.PP
If no \s-1UUID\s0 can be found then the hostname is not modified.
.IP "\fBUUIDFile\fR \fIPath\fR" 4
.IX Item "UUIDFile Path"
Take the \s-1UUID\s0 from the given file (default \fI/etc/uuid\fR).
.ie n .SS "Plugin ""varnish"""
.el .SS "Plugin \f(CWvarnish\fP"
.IX Subsection "Plugin varnish"
The \fIvarnish plugin\fR collects information about Varnish, an \s-1HTTP\s0 accelerator.
It collects a subset of the values displayed by \fIvarnishstat\fR\|(1), and
organizes them in categories which can be enabled or disabled. Currently only
metrics shown in \fIvarnishstat\fR\|(1)'s \fI\s-1MAIN\s0\fR section are collected. The exact
meaning of each metric can be found in \fIvarnish\-counters\fR\|(7).
.PP
Synopsis:
.PP
.Vb 10
\&
\&
\& CollectBackend true
\& CollectBan false
\& CollectCache true
\& CollectConnections true
\& CollectDirectorDNS false
\& CollectESI false
\& CollectFetch false
\& CollectHCB false
\& CollectObjects false
\& CollectPurge false
\& CollectSession false
\& CollectSHM true
\& CollectSMA false
\& CollectSMS false
\& CollectSM false
\& CollectStruct false
\& CollectTotals false
\& CollectUptime false
\& CollectVCL false
\& CollectVSM false
\& CollectWorkers false
\&
\&
.Ve
.PP
The configuration consists of one or more <\fBInstance\fR\ \fIName\fR>
blocks. \fIName\fR is the parameter passed to \*(L"varnishd \-n\*(R". If left empty, it
will collectd statistics from the default \*(L"varnishd\*(R" instance (this should work
fine in most cases).
.PP
Inside each <\fBInstance\fR> blocks, the following options are recognized:
.IP "\fBCollectBackend\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "CollectBackend true|false"
Back-end connection statistics, such as successful, reused,
and closed connections. True by default.
.IP "\fBCollectBan\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "CollectBan true|false"
Statistics about ban operations, such as number of bans added, retired, and
number of objects tested against ban operations. Only available with Varnish
3.x and above. False by default.
.IP "\fBCollectCache\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "CollectCache true|false"
Cache hits and misses. True by default.
.IP "\fBCollectConnections\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "CollectConnections true|false"
Number of client connections received, accepted and dropped. True by default.
.IP "\fBCollectDirectorDNS\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "CollectDirectorDNS true|false"
\&\s-1DNS\s0 director lookup cache statistics. Only available with Varnish 3.x. False by
default.
.IP "\fBCollectESI\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "CollectESI true|false"
Edge Side Includes (\s-1ESI\s0) parse statistics. False by default.
.IP "\fBCollectFetch\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "CollectFetch true|false"
Statistics about fetches (\s-1HTTP\s0 requests sent to the backend). False by default.
.IP "\fBCollectHCB\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "CollectHCB true|false"
Inserts and look-ups in the crit bit tree based hash. Look-ups are
divided into locked and unlocked look-ups. False by default.
.IP "\fBCollectObjects\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "CollectObjects true|false"
Statistics on cached objects: number of objects expired, nuked (prematurely
expired), saved, moved, etc. False by default.
.IP "\fBCollectPurge\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "CollectPurge true|false"
Statistics about purge operations, such as number of purges added, retired, and
number of objects tested against purge operations. Only available with Varnish
2.x. False by default.
.IP "\fBCollectSession\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "CollectSession true|false"
Client session statistics. Number of past and current sessions, session herd and
linger counters, etc. False by default. Note that if using Varnish 4.x, some
metrics found in the Connections and Threads sections with previous versions of
Varnish have been moved here.
.IP "\fBCollectSHM\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "CollectSHM true|false"
Statistics about the shared memory log, a memory region to store
log messages which is flushed to disk when full. True by default.
.IP "\fBCollectSMA\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "CollectSMA true|false"
malloc or umem (umem_alloc(3MALLOC) based) storage statistics. The umem storage
component is Solaris specific. Only available with Varnish 2.x. False by
default.
.IP "\fBCollectSMS\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "CollectSMS true|false"
synth (synthetic content) storage statistics. This storage
component is used internally only. False by default.
.IP "\fBCollectSM\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "CollectSM true|false"
file (memory mapped file) storage statistics. Only available with Varnish 2.x.
False by default.
.IP "\fBCollectStruct\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "CollectStruct true|false"
Current varnish internal state statistics. Number of current sessions, objects
in cache store, open connections to backends (with Varnish 2.x), etc. False by
default.
.IP "\fBCollectTotals\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "CollectTotals true|false"
Collects overview counters, such as the number of sessions created,
the number of requests and bytes transferred. False by default.
.IP "\fBCollectUptime\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "CollectUptime true|false"
Varnish uptime. Only available with Varnish 3.x and above. False by default.
.IP "\fBCollectVCL\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "CollectVCL true|false"
Number of total (available + discarded) \s-1VCL \s0(config files). False by default.
.IP "\fBCollectVSM\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "CollectVSM true|false"
Collect statistics about Varnish's shared memory usage (used by the logging and
statistics subsystems). Only available with Varnish 4.x. False by default.
.IP "\fBCollectWorkers\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "CollectWorkers true|false"
Collect statistics about worker threads. False by default.
.ie n .SS "Plugin ""virt"""
.el .SS "Plugin \f(CWvirt\fP"
.IX Subsection "Plugin virt"
This plugin allows \s-1CPU,\s0 disk and network load to be collected for virtualized
guests on the machine. This means that these metrics can be collected for guest
systems without installing any software on them \- \fIcollectd\fR only runs on the
host system. The statistics are collected through libvirt
().
.PP
Only \fIConnection\fR is required.
.IP "\fBConnection\fR \fIuri\fR" 4
.IX Item "Connection uri"
Connect to the hypervisor given by \fIuri\fR. For example if using Xen use:
.Sp
.Vb 1
\& Connection "xen:///"
.Ve
.Sp
Details which URIs allowed are given at .
.IP "\fBRefreshInterval\fR \fIseconds\fR" 4
.IX Item "RefreshInterval seconds"
Refresh the list of domains and devices every \fIseconds\fR. The default is 60
seconds. Setting this to be the same or smaller than the \fIInterval\fR will cause
the list of domains and devices to be refreshed on every iteration.
.Sp
Refreshing the devices in particular is quite a costly operation, so if your
virtualization setup is static you might consider increasing this. If this
option is set to 0, refreshing is disabled completely.
.IP "\fBDomain\fR \fIname\fR" 4
.IX Item "Domain name"
.PD 0
.IP "\fBBlockDevice\fR \fIname:dev\fR" 4
.IX Item "BlockDevice name:dev"
.IP "\fBInterfaceDevice\fR \fIname:dev\fR" 4
.IX Item "InterfaceDevice name:dev"
.IP "\fBIgnoreSelected\fR \fBtrue\fR|\fBfalse\fR" 4
.IX Item "IgnoreSelected true|false"
.PD
Select which domains and devices are collected.
.Sp
If \fIIgnoreSelected\fR is not given or \fBfalse\fR then only the listed domains and
disk/network devices are collected.
.Sp
If \fIIgnoreSelected\fR is \fBtrue\fR then the test is reversed and the listed
domains and disk/network devices are ignored, while the rest are collected.
.Sp
The domain name and device names may use a regular expression, if the name is
surrounded by \fI/.../\fR and collectd was compiled with support for regexps.
.Sp
The default is to collect statistics for all domains and all their devices.
.Sp
Example:
.Sp
.Vb 2
\& BlockDevice "/:hdb/"
\& IgnoreSelected "true"
.Ve
.Sp
Ignore all \fIhdb\fR devices on any domain, but other block devices (eg. \fIhda\fR)
will be collected.
.IP "\fBBlockDeviceFormat\fR \fBtarget\fR|\fBsource\fR" 4
.IX Item "BlockDeviceFormat target|source"
If \fIBlockDeviceFormat\fR is set to \fBtarget\fR, the default, then the device name
seen by the guest will be used for reporting metrics.
This corresponds to the \f(CW\*(C`\*(C'\fR node in the \s-1XML\s0 definition of the
domain.
.Sp
If \fIBlockDeviceFormat\fR is set to \fBsource\fR, then metrics will be reported
using the path of the source, e.g. an image file.
This corresponds to the \f(CW\*(C`