.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) .\" .\" 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 .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" 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 "2020-08-04" "5.11.0.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., \fBcollectd\-perl\fR\|(5) or \&\fBcollectd\-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 \fBcollectd\-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 \&\fBtypes.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 \fBcollectd\-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 \fBgethostname\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 \fBtypes.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 \fBregex\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 0.9.1\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 \& # TLSEnabled false \& # TLSVerifyPeer true \& # TLSVerifyHostName true \& # TLSCACert "/path/to/ca.pem" \& # TLSClientCert "/path/to/client\-cert.pem" \& # TLSClientKey "/path/to/client\-key.pem" \& # 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 \& # TLSEnabled false \& # TLSVerifyPeer true \& # TLSVerifyHostName true \& # TLSCACert "/path/to/ca.pem" \& # TLSClientCert "/path/to/client\-cert.pem" \& # TLSClientKey "/path/to/client\-key.pem" \& \& .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. .IP "\fBTLSEnabled\fR \fBtrue\fR|\fBfalse\fR" 4 .IX Item "TLSEnabled true|false" If set to \fBtrue\fR then connect to the broker using a \s-1TLS\s0 connection. If set to \fBfalse\fR (the default), then a plain text connection is used. .Sp Requires rabbitmq-c >= 0.4. .IP "\fBTLSVerifyPeer\fR \fBtrue\fR|\fBfalse\fR" 4 .IX Item "TLSVerifyPeer true|false" If set to \fBtrue\fR (the default) then the server certificate chain is verified. Setting this to \fBfalse\fR will skip verification (insecure). .Sp Requires rabbitmq-c >= 0.8. .IP "\fBTLSVerifyHostName\fR \fBtrue\fR|\fBfalse\fR" 4 .IX Item "TLSVerifyHostName true|false" If set to \fBtrue\fR (the default) then the server host name is verified. Setting this to \fBfalse\fR will skip verification (insecure). .Sp Requires rabbitmq-c >= 0.8. .IP "\fBTLSCACert\fR \fIPath\fR" 4 .IX Item "TLSCACert Path" Path to the \s-1CA\s0 cert file in \s-1PEM\s0 format. .IP "\fBTLSClientCert\fR \fIPath\fR" 4 .IX Item "TLSClientCert Path" Path to the client certificate in \s-1PEM\s0 format. If this is set, then \fBTLSClientKey\fR must be set as well. .IP "\fBTLSClientKey\fR \fIPath\fR" 4 .IX Item "TLSClientKey Path" Path to the client key in \s-1PEM\s0 format. If this is set, then \fBTLSClientCert\fR must be set as well. .ie n .SS "Plugin ""amqp1""" .el .SS "Plugin \f(CWamqp1\fP" .IX Subsection "Plugin amqp1" The \fI\s-1AMQP1\s0 plugin\fR can be used to communicate with other instances of \&\fIcollectd\fR or third party applications using an \s-1AMQP 1.0\s0 message intermediary. Metric values or notifications are sent to the messaging intermediary which may handle direct messaging or queue based transfer. .PP \&\fBSynopsis:\fR .PP .Vb 10 \& \& # Send values to an AMQP 1.0 intermediary \& \& Host "localhost" \& Port "5672" \& User "guest" \& Password "guest" \& Address "collectd" \&# RetryDelay 1 \& \& Format "command" \& PreSettle false \& Notify false \& # StoreRates false \& # GraphitePrefix "collectd." \& # GraphiteEscapeChar "_" \& # GraphiteSeparateInstances false \& # GraphiteAlwaysAppendDS false \& # GraphitePreserveSeparator false \& \& \& .Ve .PP The plugin's configuration consists of a \fITransport\fR that configures communications to the \s-1AMQP 1.0\s0 messaging bus and one or more \fIInstance\fR corresponding to metric or event publishers to the messaging system. .PP The address in the \fITransport\fR block concatenated with the name given in the \&\fIInstance\fR block starting tag will be used as the send-to address for communications over the messaging link. .PP The following options are accepted within each \fITransport\fR block: .IP "\fBHost\fR \fIHost\fR" 4 .IX Item "Host Host" Hostname or IP-address of the \s-1AMQP 1.0\s0 intermediary. Defaults to the default behavior of the underlying communications library, \&\fIlibqpid-proton\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 1.0\s0 intermediary accepts connections. This argument must be a string, even if the numeric form is used. Defaults to \*(L"5672\*(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 1.0\s0 intermediary. By default \*(L"guest\*(R"/\*(L"guest\*(R" is used. .IP "\fBAddress\fR \fIAddress\fR" 4 .IX Item "Address Address" This option specifies the prefix for the send-to value in the message. By default, \*(L"collectd\*(R" will be used. .IP "\fBRetryDelay\fR \fIRetryDelay\fR" 4 .IX Item "RetryDelay RetryDelay" When the \s-1AMQP1\s0 connection is lost, defines the time in seconds to wait before attempting to reconnect. Defaults to 1, which implies attempt to reconnect at 1 second intervals. .PP The following options are accepted within each \fIInstance\fR block: .IP "\fBFormat\fR \fBCommand\fR|\fB\s-1JSON\s0\fR|\fBGraphite\fR" 4 .IX Item "Format Command|JSON|Graphite" Selects the format in which messages are sent to the intermediary. 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. .IP "\fBPreSettle\fR \fBtrue\fR|\fBfalse\fR" 4 .IX Item "PreSettle true|false" If set to \fBfalse\fR (the default), the plugin will wait for a message acknowledgement from the messaging bus before sending the next message. This indicates transfer of ownership to the messaging system. If set to \fBtrue\fR, the plugin will not wait for a message acknowledgement and the message may be dropped prior to transfer of ownership. .IP "\fBNotify\fR \fBtrue\fR|\fBfalse\fR" 4 .IX Item "Notify true|false" If set to \fBfalse\fR (the default), the plugin will service the instance write call back as a value list. If set to \fBtrue\fR the plugin will service the instance as a write notification callback for alert formatting. .IP "\fBStoreRates\fR \fBtrue\fR|\fBfalse\fR" 4 .IX Item "StoreRates true|false" 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" 4 .IX Item "GraphitePrefix" 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" 4 .IX Item "GraphitePostfix" 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" 4 .IX Item "GraphiteEscapeChar" 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 ""buddyinfo""" .el .SS "Plugin \f(CWbuddyinfo\fP" .IX Subsection "Plugin buddyinfo" The \fBbuddyinfo\fR plugin collects information by reading \*(L"/proc/buddyinfo\*(R". This file contains information about the number of available contagious physical pages at the moment. .IP "\fBZone\fR \fIZoneName\fR" 4 .IX Item "Zone ZoneName" Zone to collect info about. Will collect all zones by default. .ie n .SS "Plugin ""capabilities""" .el .SS "Plugin \f(CWcapabilities\fP" .IX Subsection "Plugin capabilities" The \f(CW\*(C`capabilities\*(C'\fR plugin collects selected static platform data using \&\fIdmidecode\fR and expose it through micro embedded webserver. The data returned by plugin is in json format. .PP \&\fBSynopsis:\fR .PP .Vb 4 \& \& Host "localhost" \& Port "9104" \& .Ve .PP Available configuration options for the \f(CW\*(C`capabilities\*(C'\fR plugin: .IP "\fBHost\fR \fIHostname\fR" 4 .IX Item "Host Hostname" 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. .Sp This option is supported only for libmicrohttpd newer than 0.9.0. .IP "\fBPort\fR \fIPort\fR" 4 .IX Item "Port Port" Port the embedded webserver should listen on. Defaults to \fB9104\fR. .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. .Sp See \fI/\*(L"\s-1IGNORELISTS\*(R"\s0\fR for details. .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 ""check_uptime""" .el .SS "Plugin \f(CWcheck_uptime\fP" .IX Subsection "Plugin check_uptime" The \fIcheck_uptime plugin\fR designed to check and notify about host or service status based on \fIuptime\fR metric. .PP When new metric of \fIuptime\fR type appears in cache, \s-1OK\s0 notification is sent. When new value for metric is less than previous value, \s-1WARNING\s0 notification is sent about host/service restart. When no new updates comes for metric and cache entry expires, then \s-1FAILURE\s0 notification is sent about unreachable host or service. .PP By default (when no explicit configuration), plugin checks for \fIuptime\fR metric. .PP \&\fBSynopsis:\fR .PP .Vb 4 \& \& Type "uptime" \& Type "my_uptime_type" \& .Ve .IP "\fBType\fR \fIType\fR" 4 .IX Item "Type Type" Metric type to check for status/values. The type should consist single \s-1GAUGE\s0 data source. .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. .SS "Plugin Connectivity" .IX Subsection "Plugin Connectivity" connectivity \- Documentation of collectd's \f(CW\*(C`connectivity plugin\*(C'\fR .PP .Vb 5 \& LoadPlugin connectivity \& # ... \& \& Interface eth0 \& .Ve .PP The \f(CW\*(C`connectivity plugin\*(C'\fR queries interface status using netlink (man 7 netlink) which provides information about network interfaces via the \s-1NETLINK_ROUTE\s0 family (man 7 rtnetlink). The plugin translates the value it receives to collectd's internal format and, depending on the write plugins you have loaded, it may be written to disk or submitted to another instance. The plugin listens to interfaces enumerated within the plugin configuration (see below). If no interfaces are listed, then the default is for all interfaces to be monitored. .PP This example shows \f(CW\*(C`connectivity plugin\*(C'\fR monitoring all interfaces. LoadPlugin connectivity .PP This example shows \f(CW\*(C`connectivity plugin\*(C'\fR monitoring 2 interfaces, \*(L"eth0\*(R" and \*(L"eth1\*(R". LoadPlugin connectivity Interface eth0 Interface eth1 .PP This example shows \f(CW\*(C`connectivity plugin\*(C'\fR monitoring all interfaces except \*(L"eth1\*(R". LoadPlugin connectivity Interface eth1 IgnoreSelected true .IP "\fBInterface\fR \fIinterface_name\fR" 4 .IX Item "Interface interface_name" interface(s) to monitor connect to. .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. .IP "\fBReportGuestState\fR \fBfalse\fR|\fBtrue\fR" 4 .IX Item "ReportGuestState false|true" When set to \fBtrue\fR, reports the \*(L"guest\*(R" and \*(L"guest_nice\*(R" \s-1CPU\s0 states. Defaults to \fBfalse\fR. .IP "\fBSubtractGuestState\fR \fBfalse\fR|\fBtrue\fR" 4 .IX Item "SubtractGuestState false|true" This option is only considered when \fBReportGuestState\fR is set to \fBtrue\fR. \&\*(L"guest\*(R" and \*(L"guest_nice\*(R" are included in respectively \*(L"user\*(R" and \*(L"nice\*(R". If set to \fBtrue\fR, \*(L"guest\*(R" will be subtracted from \*(L"user\*(R" and \*(L"guest_nice\*(R" will be subtracted from \*(L"nice\*(R". Defaults to \fBtrue\fR. .ie n .SS "Plugin ""cpufreq""" .el .SS "Plugin \f(CWcpufreq\fP" .IX Subsection "Plugin cpufreq" This plugin is available on Linux and FreeBSD only. It doesn't have any options. On Linux 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. .PP On Linux, if the system has the \fIcpufreq-stats\fR kernel module loaded, this plugin reports the rate of p\-state (cpu frequency) transitions and the percentage of time spent in each p\-state. .PP On FreeBSD it does a sysctl dev.cpu.0.freq and submits this as instance 0. At this time FreeBSD only has one frequency setting for all cores. See the \s-1BUGS\s0 section in the FreeBSD man page for \fBcpufreq\fR\|(4) for more details. .PP On FreeBSD the plugin checks the success of sysctl dev.cpu.0.freq and unregisters the plugin when this fails. A message will be logged to indicate this. .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 10 \& \& \& Plugin "quotes" \& URL "http://finance.google.com/finance?q=NYSE%3AAMD" \& AddressFamily "any" \& 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 "\fBPlugin\fR \fIPlugin\fR" 4 .IX Item "Plugin Plugin" Use \fIPlugin\fR as the plugin name when submitting values. Defaults to \f(CW\*(C`curl\*(C'\fR. .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 "\fBAddressFamily\fR \fIType\fR" 4 .IX Item "AddressFamily Type" \&\s-1IP\s0 version to resolve \s-1URL\s0 to. Useful in cases when hostname in \s-1URL\s0 resolves to both IPv4 and IPv6 addresses, and you are interested in using one of them specifically. Use \f(CW\*(C`ipv4\*(C'\fR to enforce IPv4, \f(CW\*(C`ipv6\*(C'\fR to enforce IPv6, or \f(CW\*(C`any\*(C'\fR to keep the default behavior of resolving addresses to all \s-1IP\s0 versions your system allows. If \f(CW\*(C`libcurl\*(C'\fR is compiled without IPv6 support, using \f(CW\*(C`ipv6\*(C'\fR will result in a warning and fallback to \f(CW\*(C`any\*(C'\fR. If \f(CW\*(C`Type\*(C'\fR cannot be parsed, a warning will be printed and the whole \fBPage\fR block will be ignored. .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 "\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 "\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 7 \& \& \& AddressFamily "any" \& 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 "\fBAddressFamily\fR \fIType\fR" 4 .IX Item "AddressFamily Type" \&\s-1IP\s0 version to resolve \s-1URL\s0 to. Useful in cases when hostname in \s-1URL\s0 resolves to both IPv4 and IPv6 addresses, and you are interested in using one of them specifically. Use \f(CW\*(C`ipv4\*(C'\fR to enforce IPv4, \f(CW\*(C`ipv6\*(C'\fR to enforce IPv6, or \f(CW\*(C`any\*(C'\fR to keep the default behavior of resolving addresses to all \s-1IP\s0 versions your system allows. If \f(CW\*(C`libcurl\*(C'\fR is compiled without IPv6 support, using \f(CW\*(C`ipv6\*(C'\fR will result in a warning and fallback to \f(CW\*(C`any\*(C'\fR. If \f(CW\*(C`Type\*(C'\fR cannot be parsed, a warning will be printed and the whole \fB\s-1URL\s0\fR block will be ignored. .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 "\fBPlugin\fR \fIPlugin\fR" 4 .IX Item "Plugin Plugin" Use \fIPlugin\fR as the plugin name when submitting values. Defaults to \f(CW\*(C`curl_json\*(C'\fR. .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 \fBtypes.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 10 \& \& \& AddressFamily "any" \& Host "my_host" \& #Plugin "curl_xml" \& 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]" \& #PluginInstanceFrom "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 "\fBAddressFamily\fR \fIType\fR" 4 .IX Item "AddressFamily Type" \&\s-1IP\s0 version to resolve \s-1URL\s0 to. Useful in cases when hostname in \s-1URL\s0 resolves to both IPv4 and IPv6 addresses, and you are interested in using one of them specifically. Use \f(CW\*(C`ipv4\*(C'\fR to enforce IPv4, \f(CW\*(C`ipv6\*(C'\fR to enforce IPv6, or \f(CW\*(C`any\*(C'\fR to keep the default behavior of resolving addresses to all \s-1IP\s0 versions your system allows. If \f(CW\*(C`libcurl\*(C'\fR is compiled without IPv6 support, using \f(CW\*(C`ipv6\*(C'\fR will result in a warning and fallback to \f(CW\*(C`any\*(C'\fR. If \f(CW\*(C`Type\*(C'\fR cannot be parsed, a warning will be printed and the whole \fB\s-1URL\s0\fR block will be ignored. .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 "\fBPlugin\fR \fIPlugin\fR" 4 .IX Item "Plugin Plugin" Use \fIPlugin\fR as the plugin name when submitting values. Defaults to 'curl_xml'. .IP "\fBInstance\fR \fIInstance\fR" 4 .IX Item "Instance Instance" Use \fIInstance\fR as the plugin instance when submitting values. May be overridden by \fBPluginInstanceFrom\fR option inside \fBXPath\fR blocks. Defaults to an empty string (no plugin instance). .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 "\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 \fBtypes.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). .IP "\fBPluginInstanceFrom\fR \fIPluginInstanceFrom\fR" 4 .IX Item "PluginInstanceFrom PluginInstanceFrom" Specifies a XPath expression to use for determining the \fIplugin instance\fR. The XPath expression must return exactly one element. The element's value is then used as \fIplugin instance\fR. .RE .RS 4 .Sp If the \*(L"base XPath expression\*(R" (the argument to the \fBXPath\fR block) returns exactly one argument, then \fIInstanceFrom\fR and \fIPluginInstanceFrom\fR may be omitted. Otherwise, at least one of \fIInstanceFrom\fR or \fIPluginInstanceFrom\fR is required. .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. This option is required. .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" \& \& \& \& #Plugin "warehouse" \& 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 \fBtypes.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 "\fBPlugin\fR \fIPlugin\fR" 4 .IX Item "Plugin Plugin" Use \fIPlugin\fR as the plugin name when submitting query results from this \fBDatabase\fR. Defaults to \f(CW\*(C`dbi\*(C'\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 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 ""dcpmm""" .el .SS "Plugin \f(CWdcpmm\fP" .IX Subsection "Plugin dcpmm" The \fIdcpmm plugin\fR will collect Intel(R) Optane(\s-1TM\s0) \s-1DC\s0 Persistent Memory related performance statistics. The plugin requires root privileges to perform the statistics collection. .PP \&\fBSynopsis:\fR .PP .Vb 6 \& \& Interval 10.0 \& CollectHealth false \& CollectPerfMetrics true \& EnableDispatchAll false \& .Ve .IP "\fBInterval\fR \fItime in seconds\fR" 4 .IX Item "Interval time in seconds" Sets the \fIInterval (in seconds)\fR in which the values will be collected. Defaults to \f(CW\*(C`global Interval\*(C'\fR value. This will override the \fIglobal Interval\fR for \fIdcpmm\fR plugin. None of the other plugins will be affected. .IP "\fBCollectHealth\fR \fItrue\fR|\fIfalse\fR" 4 .IX Item "CollectHealth true|false" Collects health information. \fICollectHealth and CollectPerfMetrics cannot be true at the same time\fR. Defaults to \f(CW\*(C`false\*(C'\fR. .Sp The health information metrics are the following: health_status Overall health summary (0: normal | 1: non-critical | 2: critical | 3: fatal). lifespan_remaining The moduleXs remaining life as a percentage value of factory expected life span. lifespan_used The moduleXs used life as a percentage value of factory expected life span. power_on_time The lifetime the \s-1DIMM\s0 has been powered on in seconds. uptime The current uptime of the \s-1DIMM\s0 for the current power cycle in seconds. last_shutdown_time The time the system was last shutdown. The time is represented in epoch (seconds). media_temperature The mediaXs current temperature in degree Celsius. controller_temperature The controllerXs current temperature in degree Celsius. max_media_temperature The mediaXs the highest temperature reported in degree Celsius. max_controller_temperature The controllerXs highest temperature reported in degree Celsius. tsc_cycles The number of tsc cycles during each interval. epoch The timestamp in seconds at which the metrics are collected from \s-1DCPMM\s0 DIMMs. .IP "\fBCollectPerfMetrics\fR \fItrue\fR|\fIfalse\fR" 4 .IX Item "CollectPerfMetrics true|false" Collects memory performance metrics. \fICollectHealth and CollectPerfMetrics cannot be true at the same time\fR. Defaults to \f(CW\*(C`true\*(C'\fR. .Sp The memory performance metrics are the following: total_bytes_read Number of bytes transacted by the read operations. total_bytes_written Number of bytes transacted by the write operations. read_64B_ops_rcvd Number of read operations performed to the physical media in 64 bytes granularity. write_64B_ops_rcvd Number of write operations performed to the physical media in 64 bytes granularity. media_read_ops Number of read operations performed to the physical media. media_write_ops Number of write operations performed to the physical media. host_reads Number of read operations received from the \s-1CPU\s0 (memory controller). host_writes Number of write operations received from the \s-1CPU\s0 (memory controller). read_hit_ratio Measures the efficiency of the buffer in the read path. Range of 0.0 \- 1.0. write_hit_ratio Measures the efficiency of the buffer in the write path. Range of 0.0 \- 1.0. tsc_cycles The number of tsc cycles during each interval. epoch The timestamp in seconds at which the metrics are collected from \s-1DCPMM\s0 DIMMs. .IP "\fBEnableDispatchAll\fR \fIfalse\fR" 4 .IX Item "EnableDispatchAll false" This parameter helps to seamlessly enable simultaneous health and memory perf metrics collection in future. This is unused at the moment and \fImust\fR always be \fIfalse\fR. .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. .Sp See \fI/\*(L"\s-1IGNORELISTS\*(R"\s0\fR for details. .IP "\fBMountPoint\fR \fIDirectory\fR" 4 .IX Item "MountPoint Directory" Select partitions based on the mountpoint. .Sp See \fI/\*(L"\s-1IGNORELISTS\*(R"\s0\fR for details. .IP "\fBFSType\fR \fIFSType\fR" 4 .IX Item "FSType FSType" Select partitions based on the filesystem type. .Sp See \fI/\*(L"\s-1IGNORELISTS\*(R"\s0\fR for details. .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 "\fBLogOnce\fR \fBfalse\fR|\fBfalse\fR" 4 .IX Item "LogOnce false|false" Only log \fBstat()\fR errors once. .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 .Sp See \fI/\*(L"\s-1IGNORELISTS\*(R"\s0\fR for details. .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 ""dpdkevents""" .el .SS "Plugin \f(CWdpdkevents\fP" .IX Subsection "Plugin dpdkevents" The \fIdpdkevents plugin\fR collects events from \s-1DPDK\s0 such as link status of network ports and Keep Alive status of \s-1DPDK\s0 logical cores. In order to get Keep Alive events following requirements must be met: \&\- \s-1DPDK\s0 >= 16.07 \&\- support for Keep Alive implemented in \s-1DPDK\s0 application. More details can be found here: http://dpdk.org/doc/guides/sample_app_ug/keep_alive.html .PP \&\fBSynopsis:\fR .PP .Vb 10 \& \& \& Coremask "0x1" \& MemoryChannels "4" \& FilePrefix "rte" \& \& \& SendEventsOnUpdate true \& EnabledPortMask 0xffff \& PortName "interface1" \& PortName "interface2" \& SendNotification false \& \& \& SendEventsOnUpdate true \& LCoreMask "0xf" \& KeepAliveShmName "/dpdk_keepalive_shm_name" \& SendNotification false \& \& .Ve .PP \&\fBOptions:\fR .PP \fIThe \s-1EAL\s0 block\fR .IX Subsection "The EAL block" .IP "\fBCoremask\fR \fIMask\fR" 4 .IX Item "Coremask Mask" .PD 0 .IP "\fBMemorychannels\fR \fIChannels\fR" 4 .IX Item "Memorychannels Channels" .PD Number of memory channels per processor socket. .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. .PP \fIThe Event block\fR .IX Subsection "The Event block" .PP The \fBEvent\fR block defines configuration for specific event. It accepts a single argument which specifies the name of the event. .PP Link Status event .IX Subsection "Link Status event" .IP "\fBSendEventOnUpdate\fR \fItrue|false\fR" 4 .IX Item "SendEventOnUpdate true|false" If set to true link status value will be dispatched only when it is different from previously read value. This is an optional argument \- default value is true. .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 F's means that all ports will be enabled. This is an optional argument \- by default all ports are 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. .IP "\fBSendNotification\fR \fItrue|false\fR" 4 .IX Item "SendNotification true|false" If set to true, link status notifications are sent, instead of link status being collected as a statistic. This is an optional argument \- default value is false. .PP Keep Alive event .IX Subsection "Keep Alive event" .IP "\fBSendEventOnUpdate\fR \fItrue|false\fR" 4 .IX Item "SendEventOnUpdate true|false" If set to true keep alive value will be dispatched only when it is different from previously read value. This is an optional argument \- default value is true. .IP "\fBLCoreMask\fR \fIMask\fR" 4 .IX Item "LCoreMask Mask" An hexadecimal bit mask of the logical cores to monitor keep alive state. .IP "\fBKeepAliveShmName\fR \fIName\fR" 4 .IX Item "KeepAliveShmName Name" Shared memory name identifier that is used by secondary process to monitor the keep alive cores state. .IP "\fBSendNotification\fR \fItrue|false\fR" 4 .IX Item "SendNotification true|false" If set to true, keep alive notifications are sent, instead of keep alive information being collected as a statistic. This is an optional argument \- default value is false. .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 10 \& \& \& Coremask "0x4" \& MemoryChannels "4" \& FilePrefix "rte" \& SocketMemory "1024" \& LogLevel "7" \& RteDriverLibPath "/usr/lib/dpdk\-pmd" \& \& SharedMemObj "dpdk_collectd_stats_0" \& EnabledPortMask 0xffff \& PortName "interface1" \& PortName "interface2" \& .Ve .PP \&\fBOptions:\fR .PP \fIThe \s-1EAL\s0 block\fR .IX Subsection "The EAL block" .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 "\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 This is an optional value. .IP "\fBLogLevel\fR \fILogLevel_number\fR" 4 .IX Item "LogLevel LogLevel_number" A string containing log level number. This parameter is optional. If parameter is not present then default value \*(L"7\*(R" \- (\s-1INFO\s0) is used. Value \*(L"8\*(R" \- (\s-1DEBUG\s0) can be set to enable debug traces. .IP "\fBRteDriverLibPath\fR \fIPath\fR" 4 .IX Item "RteDriverLibPath Path" A string containing path to shared pmd driver lib or path to directory, where shared pmd driver libs are available. This parameter is optional. This parameter enable loading of shared pmd driver libs from defined path. E.g.: \*(L"/usr/lib/dpdk\-pmd/librte_pmd_i40e.so\*(R" or \*(L"/usr/lib/dpdk\-pmd\*(R" .IP "\fBSharedMemObj\fR \fIMask\fR" 3 .IX Item "SharedMemObj Mask" A string containing the name of the shared memory object that should be used to share stats from the \s-1DPDK\s0 secondary process to the collectd dpdkstat plugin. Defaults to dpdk_collectd_stats if no other value is configured. .IP "\fBEnabledPortMask\fR \fIMask\fR" 3 .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" 3 .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 ""dpdk_telemetry""" .el .SS "Plugin \f(CWdpdk_telemetry\fP" .IX Subsection "Plugin dpdk_telemetry" The \fI dpdk_telemetry \fR plugin collects \s-1DPDK\s0 ethernet device metrics via dpdk_telemetry library. .PP The plugin retrieves metrics from a \s-1DPDK\s0 packet forwarding application by sending the \s-1JSON\s0 formatted message via a \s-1UNIX\s0 domain socket. The \s-1DPDK\s0 telemetry component will respond with a \s-1JSON\s0 formatted reply, delivering the requested metrics. The plugin parses the \s-1JSON\s0 data, and publishes the metric values to collectd for further use. .PP \&\fBSynopsis:\fR .PP .Vb 4 \& \& ClientSocketPath "/var/run/.client" \& DpdkSocketPath "/var/run/dpdk/rte/telemetry" \& .Ve .PP \&\fBOptions:\fR .IP "\fBClientSocketPath\fR \fIClient_Path\fR" 2 .IX Item "ClientSocketPath Client_Path" The \s-1UNIX\s0 domain client socket at \fIClient_Path\fR to receive messages from \s-1DPDK\s0 telemetry library. Defaults to \fB\*(L"/var/run/.client\*(R"\fR. .IP "\fBDpdkSocketPath\fR \fIDpdk_Path\fR" 2 .IX Item "DpdkSocketPath Dpdk_Path" The \s-1UNIX\s0 domain \s-1DPDK\s0 telemetry socket to be connected at \fIDpdk_Path\fR to send messages. Defaults to \fB\*(L"/var/run/dpdk/rte/telemetry\*(R"\fR. .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 \&\fBchmod\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 \fBioctl\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 \fBcollectd\-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 \fBcollectd\-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 "\fBPlugin\fR \fIPlugin\fR" 4 .IX Item "Plugin Plugin" Use \fIPlugin\fR as the plugin name when submitting values. Defaults to \fBfilecount\fR. .IP "\fBInstance\fR \fIInstance\fR" 4 .IX Item "Instance Instance" Sets the plugin instance to \fIInstance\fR. If not given, the instance is set to the directory name with all slashes replaced by underscores and all leading underscores removed. Empty value is allowed. .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 \fBfnmatch\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 \fBfind\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. .IP "\fBRegularOnly\fR \fItrue\fR|\fIfalse\fR" 4 .IX Item "RegularOnly true|false" Controls whether or not to include only regular files in the count. Defaults to \fItrue\fR, i.e. by default non regular files are ignored. .IP "\fBFilesSizeType\fR \fIType\fR" 4 .IX Item "FilesSizeType Type" Sets the type used to dispatch files combined size. Empty value ("") disables reporting. Defaults to \fBbytes\fR. .IP "\fBFilesCountType\fR \fIType\fR" 4 .IX Item "FilesCountType Type" Sets the type used to dispatch number of files. Empty value ("") disables reporting. Defaults to \fBfiles\fR. .IP "\fBTypeInstance\fR \fIInstance\fR" 4 .IX Item "TypeInstance Instance" Sets the \fItype instance\fR used to dispatch values. Defaults to an empty string (no plugin instance). .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 \&\fBcollectd\-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 ""gpu_nvidia""" .el .SS "Plugin \f(CWgpu_nvidia\fP" .IX Subsection "Plugin gpu_nvidia" Efficiently collects various statistics from the system's \s-1NVIDIA\s0 GPUs using the \&\s-1NVML\s0 library. Currently collected are fan speed, core temperature, percent load, percent memory used, compute and memory frequencies, and power consumption. .IP "\fBGPUIndex\fR" 4 .IX Item "GPUIndex" If one or more of these options is specified, only GPUs at that index (as determined by nvidia-utils through \fInvidia-smi\fR) have statistics collected. If no instance of this option is specified, all GPUs are monitored. .IP "\fBIgnoreSelected\fR" 4 .IX Item "IgnoreSelected" If set to true, all detected GPUs \fBexcept\fR the ones at indices specified by \&\fBGPUIndex\fR entries are collected. For greater clarity, setting IgnoreSelected without any GPUIndex directives will result in \fBno\fR statistics being collected. .IP "\fBInstanceByGPUIndex\fR" 4 .IX Item "InstanceByGPUIndex" If set to false, the \s-1GPU ID\s0 will not be part of the plugin instance. The default is '\s-1GPU ID\s0'-'\s-1GPU\s0 name' .IP "\fBInstanceByGPUName\fR" 4 .IX Item "InstanceByGPUName" If set to false, the \s-1GPU\s0 name will not be part of the plugin instance. The default is '\s-1GPU ID\s0'-'\s-1GPU\s0 name' .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. .IP "\fBVerifyPeer\fR \fBtrue\fR|\fBfalse\fR" 4 .IX Item "VerifyPeer true|false" When enabled, a valid client certificate is required to connect to the server. When disabled, a client certifiacte is not requested and any unsolicited client certificate is accepted. Enabled by default. .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_pmu""" .el .SS "Plugin \f(CWintel_pmu\fP" .IX Subsection "Plugin intel_pmu" The \fIintel_pmu\fR plugin collects performance counters data on Intel CPUs using Linux perf interface. All events are reported on a per core basis. .PP \&\fBSynopsis:\fR .PP .Vb 9 \& \& ReportHardwareCacheEvents true \& ReportKernelPMUEvents true \& ReportSoftwareEvents true \& EventList "/var/cache/pmu/GenuineIntel\-6\-2D\-core.json" \& HardwareEvents "L2_RQSTS.CODE_RD_HIT,L2_RQSTS.CODE_RD_MISS" "L2_RQSTS.ALL_CODE_RD" \& Cores "0\-3" "4,6" "[12\-15]" \& DispatchMultiPmu false \& .Ve .PP \&\fBOptions:\fR .IP "\fBReportHardwareCacheEvents\fR \fBfalse\fR|\fBtrue\fR" 4 .IX Item "ReportHardwareCacheEvents false|true" Enable or disable measuring of hardware \s-1CPU\s0 cache events: \- L1\-dcache\-loads \- L1\-dcache\-load\-misses \- L1\-dcache\-stores \- L1\-dcache\-store\-misses \- L1\-dcache\-prefetches \- L1\-dcache\-prefetch\-misses \- L1\-icache\-loads \- L1\-icache\-load\-misses \- L1\-icache\-prefetches \- L1\-icache\-prefetch\-misses \- LLC-loads \- LLC-load-misses \- LLC-stores \- LLC-store-misses \- LLC-prefetches \- LLC-prefetch-misses \- dTLB-loads \- dTLB-load-misses \- dTLB-stores \- dTLB-store-misses \- dTLB-prefetches \- dTLB-prefetch-misses \- iTLB-loads \- iTLB-load-misses \- branch-loads \- branch-load-misses .IP "\fBReportKernelPMUEvents\fR \fBfalse\fR|\fBtrue\fR" 4 .IX Item "ReportKernelPMUEvents false|true" Enable or disable measuring of the following events: \- cpu-cycles \- instructions \- cache-references \- cache-misses \- branches \- branch-misses \- bus-cycles .IP "\fBReportSoftwareEvents\fR \fBfalse\fR|\fBtrue\fR" 4 .IX Item "ReportSoftwareEvents false|true" Enable or disable measuring of software events provided by kernel: \- cpu-clock \- task-clock \- context-switches \- cpu-migrations \- page-faults \- minor-faults \- major-faults \- alignment-faults \- emulation-faults .IP "\fBEventList\fR \fIfilename\fR" 4 .IX Item "EventList filename" \&\s-1JSON\s0 performance counter event list file name. To be able to monitor all Intel \&\s-1CPU\s0 specific events \s-1JSON\s0 event list file should be downloaded. Use the pmu-tools event_download.py script to download event list for current \s-1CPU.\s0 .IP "\fBHardwareEvents\fR \fIevents\fR" 4 .IX Item "HardwareEvents events" This field is a list of event names or groups of comma separated event names. This option requires \fBEventList\fR option to be configured. .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 a 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. If a group is enclosed in square brackets each core is added individually to a separate group (that is statistics are not aggregated). Allowed formats are: 0,1,2,3 0\-10,20\-18 1,3,5\-8,10,0x10\-12 [4\-15,32\-63] .Sp If an empty string is provided as value for this field default cores configuration is applied \- that is separate group is created for each core. .IP "\fBDispatchMultiPmu\fR \fBfalse\fR|\fBtrue\fR" 4 .IX Item "DispatchMultiPmu false|true" Enable or disable dispatching of cloned multi \s-1PMU\s0 for uncore events. If disabled only total sum is dispatched as single event. If enabled separate metric is dispatched for every counter. .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 \&\fBNote:\fR \fIintel_rdt\fR plugin is using model-specific registers (MSRs), which require an additional capability to be enabled if collectd is run as a service. Please refer to \fIcontrib/systemd.collectd.service\fR file for more details. .PP \&\fBSynopsis:\fR .PP .Vb 4 \& \& Cores "0\-2" "3,4,6" "8\-10,15" \& Processes "sshd,qemu\-system\-x86" "bash" \& .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" 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. .IP "\fBProcesses\fR \fIprocess names groups\fR" 4 .IX Item "Processes process names groups" Monitoring of the events can be configured for group of processes (aggregated statistics). This field defines groups of processes on which to monitor supported events. The field is represented as list of strings with process names group values. Each string represents a list of processes in a group. Allowed format is: sshd,bash,qemu .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. .Sp See \fI/\*(L"\s-1IGNORELISTS\*(R"\s0\fR for details. .IP "\fBIgnoreSelected\fR \fItrue\fR|\fIfalse\fR" 4 .IX Item "IgnoreSelected true|false" If no configuration is 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" The \fBipmi plugin\fR allows to monitor server platform status using the Intelligent Platform Management Interface (\s-1IPMI\s0). Local and remote interfaces are supported. .PP The plugin configuration consists of one or more \fBInstance\fR blocks which specify one \fIipmi\fR connection each. Each block requires one unique string argument as the instance name. If instances are not configured, an instance with the default option values will be created. .PP For backwards compatibility, any option other than \fBInstance\fR block will trigger legacy config handling and it will be treated as an option within \fBInstance\fR block. This support will go away in the next major version of Collectd. .PP Within the \fBInstance\fR blocks, the following options are allowed: .IP "\fBAddress\fR \fIAddress\fR" 4 .IX Item "Address Address" Hostname or \s-1IP\s0 to connect to. If not specified, plugin will try to connect to local management controller (\s-1BMC\s0). .IP "\fBUsername\fR \fIUsername\fR" 4 .IX Item "Username Username" .PD 0 .IP "\fBPassword\fR \fIPassword\fR" 4 .IX Item "Password Password" .PD The username and the password to use for the connection to remote \s-1BMC.\s0 .IP "\fBAuthType\fR \fI\s-1MD5\s0\fR|\fIrmcp+\fR" 4 .IX Item "AuthType MD5|rmcp+" Forces the authentication type to use for the connection to remote \s-1BMC.\s0 By default most secure type is seleted. .IP "\fBHost\fR \fIHostname\fR" 4 .IX Item "Host Hostname" Sets the \fBhost\fR field of dispatched values. Defaults to the global hostname setting. .IP "\fBSensor\fR \fISensor\fR" 4 .IX Item "Sensor Sensor" Selects sensors to collect or to ignore, depending on \fBIgnoreSelected\fR. .Sp See \fI/\*(L"\s-1IGNORELISTS\*(R"\s0\fR for details. .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. .IP "\fBNotifyIPMIConnectionState\fR \fItrue\fR|\fIfalse\fR" 4 .IX Item "NotifyIPMIConnectionState true|false" If a \s-1IPMI\s0 connection state changes after initialization time of a minute a notification is sent. Defaults to \fBfalse\fR. .IP "\fBSELEnabled\fR \fItrue\fR|\fIfalse\fR" 4 .IX Item "SELEnabled true|false" If system event log (\s-1SEL\s0) is enabled, plugin will listen for sensor threshold and discrete events. When event is received the notification is sent. \&\s-1SEL\s0 event filtering can be configured using \fBSELSensor\fR and \fBSELIgnoreSelected\fR config options. Defaults to \fBfalse\fR. .IP "\fBSELSensor\fR \fISELSensor\fR" 4 .IX Item "SELSensor SELSensor" Selects sensors to get events from or to ignore, depending on \fBSELIgnoreSelected\fR. .Sp See \fI/\*(L"\s-1IGNORELISTS\*(R"\s0\fR for details. .IP "\fBSELIgnoreSelected\fR \fItrue\fR|\fIfalse\fR" 4 .IX Item "SELIgnoreSelected true|false" If no configuration is given, the \fBipmi\fR plugin will pass events from all sensors. This option enables you to do that: By setting \fBSELIgnoreSelected\fR to \fItrue\fR the effect of \fBSELSensor\fR is inverted: All events from selected sensors are ignored and all events from other sensors are passed. .IP "\fBSELClearEvent\fR \fItrue\fR|\fIfalse\fR" 4 .IX Item "SELClearEvent true|false" If \s-1SEL\s0 clear event is enabled, plugin will delete event from \s-1SEL\s0 list after it is received and successfully handled. In this case other tools that are subscribed for \s-1SEL\s0 events will receive an empty event. Defaults to \fBfalse\fR. .ie n .SS "Plugin ""ipstats""" .el .SS "Plugin \f(CWipstats\fP" .IX Subsection "Plugin ipstats" This plugin collects counts for ipv4 and ipv6 various types of packets passing through the system in total. At the moment it's only supported on FreeBSD. .PP The full list of options available to include in the counted statistics is: ip4receive IPv4 total packets received ip4badsum IPv4 checksum bad ip4tooshort IPv4 packet too short ip4toosmall IPv4 not enough data ip4badhlen IPv4 ip header length < data size ip4badlen IPv4 ip length < ip header length ip4fragment IPv4 fragments received ip4fragdrop IPv4 frags dropped (dups, out of space) ip4fragtimeout IPv4 fragments timed out ip4forward IPv4 packets forwarded ip4fastforward IPv4 packets fast forwarded ip4cantforward IPv4 packets rcvd for unreachable dest ip4redirectsent IPv4 packets forwarded on same net ip4noproto IPv4 unknown or unsupported protocol ip4deliver IPv4 datagrams delivered to upper level ip4transmit IPv4 total ip packets generated here ip4odrop IPv4 lost packets due to nobufs, etc. ip4reassemble IPv4 total packets reassembled ok ip4fragmented IPv4 datagrams successfully fragmented ip4ofragment IPv4 output fragments created ip4cantfrag IPv4 don't fragment flag was set, etc. ip4badoptions IPv4 error in option processing ip4noroute IPv4 packets discarded due to no route ip4badvers IPv4 ip version != 4 ip4rawout IPv4 total raw ip packets generated ip4toolong IPv4 ip length > max ip packet size ip4notmember IPv4 multicasts for unregistered grps ip4nogif IPv4 no match gif found ip4badaddr IPv4 invalid address on header .PP .Vb 10 \& ip6receive IPv6 total packets received \& ip6tooshort IPv6 packet too short \& ip6toosmall IPv6 not enough data \& ip6fragment IPv6 fragments received \& ip6fragdrop IPv6 frags dropped(dups, out of space) \& ip6fragtimeout IPv6 fragments timed out \& ip6fragoverflow IPv6 fragments that exceeded limit \& ip6forward IPv6 packets forwarded \& ip6cantforward IPv6 packets rcvd for unreachable dest \& ip6redirectsent IPv6 packets forwarded on same net \& ip6deliver IPv6 datagrams delivered to upper level \& ip6transmit IPv6 total ip packets generated here \& ip6odrop IPv6 lost packets due to nobufs, etc. \& ip6reassemble IPv6 total packets reassembled ok \& ip6fragmented IPv6 datagrams successfully fragmented \& ip6ofragment IPv6 output fragments created \& ip6cantfrag IPv6 don\*(Aqt fragment flag was set, etc. \& ip6badoptions IPv6 error in option processing \& ip6noroute IPv6 packets discarded due to no route \& ip6badvers IPv6 ip6 version != 6 \& ip6rawout IPv6 total raw ip packets generated \& ip6badscope IPv6 scope error \& ip6notmember IPv6 don\*(Aqt join this multicast group \& ip6nogif IPv6 no match gif found \& ip6toomanyhdr IPv6 discarded due to too many headers .Ve .PP By default the following options are included in the counted packets: .PP \&\- ip4receive \&\- ip4forward \&\- ip4transmit .PP \&\- ip6receive \&\- ip6forward \&\- ip6transmit .PP For example to also count IPv4 and IPv6 fragments received, include the following configuration: .PP .Vb 4 \& \& ip4fragment true \& ip6fragment true \& .Ve .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. .Sp See \fI/\*(L"\s-1IGNORELISTS\*(R"\s0\fR for details. .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 \&\fBcollectd\-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 \fBcollectd\-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 \fBcollectd\-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 ""logparser""" .el .SS "Plugin \f(CWlogparser\fP" .IX Subsection "Plugin logparser" The \fIlogparser\fR plugin is used to parse different kinds of logs. Setting proper options you can choose strings to collect. Plugin searches the log file for messages which contain several matches (two or more). When all mandatory matches are found then it sends proper notification containing all fetched values. .PP \&\fBSynopsis:\fR .PP .Vb 10 \& \& \& FirstFullRead false \& \& DefaultType "pcie_error" \& DefaultSeverity "warning" \& \& Regex "AER:.*error received" \& SubmatchIdx \-1 \& \& \& Regex "(... .. ..:..:..) .* pcieport.*AER" \& SubmatchIdx 1 \& IsMandatory false \& \& \& Regex "pcieport (.*): AER:" \& SubmatchIdx 1 \& IsMandatory true \& \& \& PluginInstance true \& Regex " ([0\-9a\-fA\-F:\e\e.]*): PCIe Bus Error" \& SubmatchIdx 1 \& IsMandatory false \& \& \& Regex "severity=" \& SubMatchIdx \-1 \& \& \& Regex "severity=.*\e\e([nN]on\-[fF]atal" \& TypeInstance "non_fatal" \& IsMandatory false \& \& \& Regex "severity=.*\e\e([fF]atal" \& Severity "failure" \& TypeInstance "fatal" \& IsMandatory false \& \& \& Regex "severity=Corrected" \& TypeInstance "correctable" \& IsMandatory false \& \& \& Regex "type=(.*)," \& SubmatchIdx 1 \& IsMandatory false \& \& \& Regex ", id=(.*)" \& SubmatchIdx 1 \& \& \& \& .Ve .PP \&\fBOptions:\fR .IP "\fBLogfile\fR \fIFile\fR" 4 .IX Item "Logfile File" The \fBLogfile\fR block defines file to search. It may contain one or more \&\fBMessage\fR blocks which are defined below. .IP "\fBFirstFullRead\fR \fItrue\fR|\fIfalse\fR" 4 .IX Item "FirstFullRead true|false" Set to true if the file has to be parsed from the beginning on the first read. If false only subsequent writes to log file will be parsed. .IP "\fBMessage\fR \fIName\fR" 4 .IX Item "Message Name" \&\fBMessage\fR block contains matches to search the log file for. Each \fBMessage\fR block builds a notification message using matched elements if its mandatory \&\fBMatch\fR blocks are matched. .IP "\fBDefaultPluginInstance\fR \fIString\fR" 4 .IX Item "DefaultPluginInstance String" Sets the default value for the plugin instance of the notification. .IP "\fBDefaultType\fR \fIString\fR" 4 .IX Item "DefaultType String" Sets the default value for the type of the notification. .IP "\fBDefaultTypeInstance\fR \fIString\fR" 4 .IX Item "DefaultTypeInstance String" Sets the default value for the type instance of the notification. .IP "\fBDefaultSeverity\fR \fIString\fR" 4 .IX Item "DefaultSeverity String" Sets the default severity. Must be set to \*(L"\s-1OK\*(R", \*(L"WARNING\*(R"\s0 or \*(L"\s-1FAILURE\*(R".\s0 Default value is \*(L"\s-1OK\*(R".\s0 .IP "\fBMatch\fR \fIName\fR" 4 .IX Item "Match Name" Multiple \fIMatch\fR blocks define regular expression patterns for extracting or excluding specific string patterns from parsing. First and last \fIMatch\fR items in the same \fIMessage\fR set boundaries of multiline message and are mandatory. If these matches are not found then the whole message is discarded. .IP "\fBRegex\fR \fIRegex\fR" 4 .IX Item "Regex Regex" Regular expression with pattern matching string. It may contain subexpressions, so next option \fBSubmatchIdx\fR specifies which subexpression should be stored. .IP "\fBSubmatchIdx\fR \fIInteger\fR" 4 .IX Item "SubmatchIdx Integer" Index of subexpression to be used for notification. Multiple subexpressions are allowed. Index value 0 takes whole regular expression match as a result. Index value \-1 does not add result to message item. Can be omitted, default value is 0. .IP "\fBExcluderegex\fR \fIRegex\fR" 4 .IX Item "Excluderegex Regex" Regular expression for excluding lines containing specific matching strings. This is processed before checking \fIRegex\fR pattern. It is optional and can be omitted. .IP "\fBIsMandatory\fR \fItrue\fR|\fIfalse\fR" 4 .IX Item "IsMandatory true|false" Flag indicating if \fIMatch\fR item is mandatory for message validation. If set to true, whole message is discarded if it's missing. For false its presence is optional. Default value is set to true. .IP "\fBPluginInstance\fR \fItrue\fR|\fIString\fR" 4 .IX Item "PluginInstance true|String" If set to true, it sets plugin instance to string returned by regex. It can be overridden by user string. .IP "\fBType\fR \fItrue\fR|\fIString\fR" 4 .IX Item "Type true|String" Sets notification type using rules like \fBPluginInstance\fR. .IP "\fBTypeInstance\fR \fItrue\fR|\fIString\fR" 4 .IX Item "TypeInstance true|String" Sets notification type instance using rules like above. .IP "\fBSeverity\fR \fIString\fR" 4 .IX Item "Severity String" Sets notification severity to one of the options: \*(L"\s-1OK\*(R", \*(L"WARNING\*(R", \*(L"FAILURE\*(R".\s0 .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 \fBcollectd\-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 ""mcelog""" .el .SS "Plugin \f(CWmcelog\fP" .IX Subsection "Plugin mcelog" The \f(CW\*(C`mcelog plugin\*(C'\fR uses mcelog to retrieve machine check exceptions. .PP By default the plugin connects to \fB\*(L"/var/run/mcelog\-client\*(R"\fR to check if the mcelog server is running. When the server is running, the plugin will tail the specified logfile to retrieve machine check exception information and send a notification with the details from the logfile. The plugin will use the mcelog client protocol to retrieve memory related machine check exceptions. Note that for memory exceptions, notifications are only sent when there is a change in the number of corrected/uncorrected memory errors. .PP \fIThe Memory block\fR .IX Subsection "The Memory block" .PP Note: these options cannot be used in conjunction with the logfile options, they are mutually exclusive. .ie n .IP "\fBMcelogClientSocket\fR \fIPath\fR Connect to the mcelog client socket using the \s-1UNIX\s0 domain socket at \fIPath\fR. Defaults to \fB""/var/run/mcelog\-client""\fR." 3 .el .IP "\fBMcelogClientSocket\fR \fIPath\fR Connect to the mcelog client socket using the \s-1UNIX\s0 domain socket at \fIPath\fR. Defaults to \fB``/var/run/mcelog\-client''\fR." 3 .IX Item "McelogClientSocket Path Connect to the mcelog client socket using the UNIX domain socket at Path. Defaults to /var/run/mcelog-client." .PD 0 .IP "\fBPersistentNotification\fR \fBtrue\fR|\fBfalse\fR Override default configuration to only send notifications when sent when there is a change in the number of corrected/uncorrected memory errors. When set to true notifications will be sent for every read cycle. Default is false. Does not affect the stats being dispatched." 3 .IX Item "PersistentNotification true|false Override default configuration to only send notifications when sent when there is a change in the number of corrected/uncorrected memory errors. When set to true notifications will be sent for every read cycle. Default is false. Does not affect the stats being dispatched." .IP "\fBMcelogLogfile\fR \fIPath\fR" 4 .IX Item "McelogLogfile Path" .PD The mcelog file to parse. Defaults to \fB\*(L"/var/log/mcelog\*(R"\fR. Note: this option cannot be used in conjunction with the memory block options, they are mutually exclusive. .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. .Sp See \fI/\*(L"\s-1IGNORELISTS\*(R"\s0\fR for 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 10 \& \& \& Server "localhost" \& Key "page_key" \& Plugin "plugin_name" \& \& 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 "\fBPlugin\fR \fIPlugin\fR" 4 .IX Item "Plugin Plugin" Use \fIPlugin\fR as the plugin name when submitting values. Defaults to \f(CW\*(C`memcachec\*(C'\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 and 64\ bit values) and floating point values (two registers interpreted as \s-1IEEE\s0 floats in big endian notation). .PP \&\fBSynopsis:\fR .PP .Vb 9 \& \& RegisterBase 0 \& RegisterType float \& RegisterCmd ReadHolding \& Type voltage \& Instance "input\-1" \& #Scale 1.0 \& #Shift 0.0 \& \& \& \& 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|\fBInt64\fR|\fBUint16\fR|\fBUint32\fR|\fBUInt64\fR|\fBFloat\fR|\fBInt32LE\fR|\fBUint32LE\fR|\fBFloatLE\fR" 4 .IX Item "RegisterType Int16|Int32|Int64|Uint16|Uint32|UInt64|Float|Int32LE|Uint32LE|FloatLE" Specifies what kind of data is returned by the device. This defaults to \&\fBUint16\fR. If the type is \fBInt32\fR, \fBInt32LE\fR, \fBUint32\fR, \fBUint32LE\fR, \&\fBFloat\fR or \fBFloatLE\fR, two 16\ bit registers at \fBRegisterBase\fR and \fBRegisterBase+1\fR will be read and the data is combined into one 32\ value. For \fBInt32\fR, \fBUint32\fR and \fBFloat\fR the most significant 16\ bits are in the register at \fBRegisterBase\fR and the least significant 16\ bits are in the register at \fBRegisterBase+1\fR. For \fBInt32LE\fR, \fBUint32LE\fR, or \fBFloat32LE\fR, the high and low order registers are swapped with the most significant 16\ bits in the \fBRegisterBase+1\fR and the least significant 16\ bits in \&\fBRegisterBase\fR. If the type is \fBInt64\fR or \fBUInt64\fR, four 16\ bit registers at \fBRegisterBase\fR, \fBRegisterBase+1\fR, \fBRegisterBase+2\fR and \&\fBRegisterBase+3\fR will be read and the data combined into one 64\ value. .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 \fIInstance\fR. If unset, an empty string (no type instance) is used. .IP "\fBScale\fR \fIValue\fR" 4 .IX Item "Scale Value" The values taken from device are multiplied by \fIValue\fR. The field is optional and the default is \fB1.0\fR. .IP "\fBShift\fR \fIValue\fR" 4 .IX Item "Shift Value" \&\fIValue\fR is added to values from device after they have been multiplied by \&\fBScale\fR value. The field is optional and the default value is \fB0.0\fR. .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 "\fBUARTType\fR \fIUARTType\fR" 4 .IX Item "UARTType UARTType" For Modbus/RTU, specifies the type of the serial device. \&\s-1RS232, RS422\s0 and \s-1RS485\s0 are supported. Defaults to \s-1RS232.\s0 Available only on Linux systems with libmodbus>=2.9.4. .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. This option enables the use of \s-1TLS.\s0 .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. Only valid if \fBCACert\fR and \fBCertificateKeyFile\fR are also set. .IP "\fBCertificateKeyFile\fR \fIfile\fR" 4 .IX Item "CertificateKeyFile file" Path to the unencrypted PEM-encoded key file corresponding to \fBCertificateFile\fR. Only valid if \fBCACert\fR and \fBCertificateFile\fR are also set. .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. Only valid if \fBCACert\fR is set. .IP "\fBCipherSuite\fR \fIciphersuite\fR" 4 .IX Item "CipherSuite ciphersuite" A string describing the ciphers available for use. See \fBciphers\fR\|(1) and the \&\f(CW\*(C`openssl ciphers\*(C'\fR utility for more information. If unset, the default ciphers will be used. Only valid if \fBCACert\fR is set. .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"\fBmysql_real_connect()\fR\*(R" and \*(L"\fBmysql_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 collect 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" 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 '\s-1SHOW GLOBAL STATUS\s0'. Defaults to \fBfalse\fR. .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. .Sp See \fI/\*(L"\s-1IGNORELISTS\*(R"\s0\fR for details. .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 will be collected, 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 \fBtc\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 \fBtc\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 .Sp See \fI/\*(L"\s-1IGNORELISTS\*(R"\s0\fR for details. .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 "\fBBindAddress\fR \fI\s-1IP\s0 Address\fR" 4 .IX Item "BindAddress IP Address" Set the outgoing \s-1IP\s0 address for \s-1IP\s0 packets. This option can be used instead of the \fIInterface\fR option to explicitly define the \s-1IP\s0 address which will be used to send Packets to the remote server. .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 \fBstat\fR\|(2). If the file has been changed, the contents is re-read. While the file is being read, it is locked using \fBfcntl\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 ""nfs""" .el .SS "Plugin \f(CWnfs\fP" .IX Subsection "Plugin nfs" The \fInfs plugin\fR collects information about the usage of the Network File System (\s-1NFS\s0). It counts the number of procedure calls for each procedure, grouped by version and whether the system runs as server or client. .PP It is possibly to omit metrics for a specific \s-1NFS\s0 version by setting one or more of the following options to \fBfalse\fR (all of them default to \fBtrue\fR). .IP "\fBReportV2\fR \fBtrue\fR|\fBfalse\fR" 4 .IX Item "ReportV2 true|false" .PD 0 .IP "\fBReportV3\fR \fBtrue\fR|\fBfalse\fR" 4 .IX Item "ReportV3 true|false" .IP "\fBReportV4\fR \fBtrue\fR|\fBfalse\fR" 4 .IX Item "ReportV4 true|false" .PD .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\f(BIprintf\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\f(BIntp.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 \&\fBupsc\fR\|(8). .IP "\fBForceSSL\fR \fBtrue\fR|\fBfalse\fR" 4 .IX Item "ForceSSL true|false" Stops connections from falling back to unsecured if an \s-1SSL\s0 connection cannot be established. Defaults to false if undeclared. .IP "\fBVerifyPeer\fR \fItrue\fR|\fIfalse\fR" 4 .IX Item "VerifyPeer true|false" If set to true, requires a CAPath be provided. Will use the CAPath to find certificates to use as Trusted Certificates to validate a upsd server certificate. If validation of the upsd server certificate fails, the connection will not be established. If ForceSSL is undeclared or set to false, setting VerifyPeer to true will override and set ForceSSL to true. .IP "\fBCAPath\fR I/path/to/certs/folder" 4 .IX Item "CAPath I/path/to/certs/folder" If VerifyPeer is set to true, this is required. Otherwise this is ignored. The folder pointed at must contain certificate(s) named according to their hash. Ex: \s-1XXXXXXXX.Y\s0 where X is the hash value of a cert and Y is 0. If name collisions occur because two different certs have the same hash value, Y can be incremented in order to avoid conflict. To create a symbolic link to a certificate the following command can be used from within the directory where the cert resides: .Sp \&\f(CW\*(C`ln \-s some.crt ./$(openssl x509 \-hash \-noout \-in some.crt).0\*(C'\fR .Sp Alternatively, the package openssl-perl provides a command \f(CW\*(C`c_rehash\*(C'\fR that will generate links like the one described above for \s-1ALL\s0 certs in a given folder. Example usage: \&\f(CW\*(C`c_rehash /path/to/certs/folder\*(C'\fR .IP "\fBConnectTimeout\fR \fIMilliseconds\fR" 4 .IX Item "ConnectTimeout Milliseconds" The \fBConnectTimeout\fR option sets the connect timeout, in milliseconds. By default, the configured \fBInterval\fR is used to set the timeout. .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 \&\fBowserver\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). .Sp See \fI/\*(L"\s-1IGNORELISTS\*(R"\s0\fR for details. .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 \fBslapd\-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 \fBldap.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. .PP So, in a nutshell you need: .PP .Vb 2 \& openvpn $OTHER_OPTIONS \e \& \-\-status "/var/run/openvpn\-status" 10 .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" \& \& \& \& #Plugin "warehouse" \& 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 "\fBPlugin\fR \fIPlugin\fR" 4 .IX Item "Plugin Plugin" Use \fIPlugin\fR as the plugin name when submitting query results from this \fBDatabase\fR. Defaults to \f(CW\*(C`oracle\*(C'\fR. .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 ""ovs_events""" .el .SS "Plugin \f(CWovs_events\fP" .IX Subsection "Plugin ovs_events" The \fIovs_events\fR plugin monitors the link status of \fIOpen vSwitch\fR (\s-1OVS\s0) connected interfaces, dispatches the values to collectd and sends the notification whenever the link state change occurs. This plugin uses \s-1OVS\s0 database to get a link state change notification. .PP \&\fBSynopsis:\fR .PP .Vb 8 \& \& Port 6640 \& Address "127.0.0.1" \& Socket "/var/run/openvswitch/db.sock" \& Interfaces "br0" "veth0" \& SendNotification true \& DispatchValues false \& .Ve .PP The plugin provides the following configuration options: .IP "\fBAddress\fR \fInode\fR" 4 .IX Item "Address node" The address of the \s-1OVS DB\s0 server JSON-RPC interface used by the plugin. To enable the interface, \s-1OVS DB\s0 daemon should be running with \f(CW\*(C`\-\-remote=ptcp:\*(C'\fR option. See \fBovsdb\-server\fR\|(1) for more details. The option may be either network hostname, IPv4 numbers-and-dots notation or IPv6 hexadecimal string format. Defaults to \f(CW\*(C`localhost\*(C'\fR. .IP "\fBPort\fR \fIservice\fR" 4 .IX Item "Port service" TCP-port to connect to. Either a service name or a port number may be given. Defaults to \fB6640\fR. .IP "\fBSocket\fR \fIpath\fR" 4 .IX Item "Socket path" The \s-1UNIX\s0 domain socket path of \s-1OVS DB\s0 server JSON-RPC interface used by the plugin. To enable the interface, the \s-1OVS DB\s0 daemon should be running with \&\f(CW\*(C`\-\-remote=punix:\*(C'\fR option. See \fBovsdb\-server\fR\|(1) for more details. If this option is set, \fBAddress\fR and \fBPort\fR options are ignored. .IP "\fBInterfaces\fR [\fIifname\fR ...]" 4 .IX Item "Interfaces [ifname ...]" List of interface names to be monitored by this plugin. If this option is not specified or is empty then all \s-1OVS\s0 connected interfaces on all bridges are monitored. .Sp Default: empty (all interfaces on all bridges are monitored) .IP "\fBSendNotification\fR \fItrue|false\fR" 4 .IX Item "SendNotification true|false" If set to true, \s-1OVS\s0 link notifications (interface status and \s-1OVS DB\s0 connection terminate) are sent to collectd. Default value is true. .IP "\fBDispatchValues\fR \fItrue|false\fR" 4 .IX Item "DispatchValues true|false" Dispatch the \s-1OVS DB\s0 interface link status value with configured plugin interval. Defaults to false. Please note, if \fBSendNotification\fR and \fBDispatchValues\fR options are false, no \s-1OVS\s0 information will be provided by the plugin. .PP \&\fBNote:\fR By default, the global interval setting is used within which to retrieve the \s-1OVS\s0 link status. To configure a plugin-specific interval, please use \fBInterval\fR option of the \s-1OVS\s0 \fBLoadPlugin\fR block settings. For milliseconds simple divide the time by 1000 for example if the desired interval is 50ms, set interval to 0.05. .ie n .SS "Plugin ""ovs_stats""" .el .SS "Plugin \f(CWovs_stats\fP" .IX Subsection "Plugin ovs_stats" The \fIovs_stats\fR plugin collects statistics of \s-1OVS\s0 connected interfaces. This plugin uses \s-1OVSDB\s0 management protocol (\s-1RFC7047\s0) monitor mechanism to get statistics from \s-1OVSDB\s0 .PP \&\fBSynopsis:\fR .PP .Vb 7 \& \& Port 6640 \& Address "127.0.0.1" \& Socket "/var/run/openvswitch/db.sock" \& Bridges "br0" "br_ext" \& InterfaceStats false \& .Ve .PP The plugin provides the following configuration options: .IP "\fBAddress\fR \fInode\fR" 4 .IX Item "Address node" The address of the \s-1OVS DB\s0 server JSON-RPC interface used by the plugin. To enable the interface, \s-1OVS DB\s0 daemon should be running with \f(CW\*(C`\-\-remote=ptcp:\*(C'\fR option. See \fBovsdb\-server\fR\|(1) for more details. The option may be either network hostname, IPv4 numbers-and-dots notation or IPv6 hexadecimal string format. Defaults to \f(CW\*(C`localhost\*(C'\fR. .IP "\fBPort\fR \fIservice\fR" 4 .IX Item "Port service" TCP-port to connect to. Either a service name or a port number may be given. Defaults to \fB6640\fR. .IP "\fBSocket\fR \fIpath\fR" 4 .IX Item "Socket path" The \s-1UNIX\s0 domain socket path of \s-1OVS DB\s0 server JSON-RPC interface used by the plugin. To enable the interface, the \s-1OVS DB\s0 daemon should be running with \&\f(CW\*(C`\-\-remote=punix:\*(C'\fR option. See \fBovsdb\-server\fR\|(1) for more details. If this option is set, \fBAddress\fR and \fBPort\fR options are ignored. .IP "\fBBridges\fR [\fIbrname\fR ...]" 4 .IX Item "Bridges [brname ...]" List of \s-1OVS\s0 bridge names to be monitored by this plugin. If this option is omitted or is empty then all \s-1OVS\s0 bridges will be monitored. .Sp Default: empty (monitor all bridges) .IP "\fBInterfaceStats\fR \fBfalse\fR|\fBtrue\fR" 4 .IX Item "InterfaceStats false|true" Indicates that the plugin should gather statistics for individual interfaces in addition to ports. This can be useful when monitoring an \s-1OVS\s0 setup with bond ports, where you might wish to know individual statistics for the interfaces included in the bonds. Defaults to \fBfalse\fR. .ie n .SS "Plugin ""pcie_errors""" .el .SS "Plugin \f(CWpcie_errors\fP" .IX Subsection "Plugin pcie_errors" The \fIpcie_errors\fR plugin collects \s-1PCI\s0 Express errors from Device Status in Capability structure and from Advanced Error Reporting Extended Capability where available. At every read it polls config space of \s-1PCI\s0 Express devices and dispatches notification for every error that is set. It checks for new errors at every read. The device is indicated in plugin_instance according to format \*(L"domain:bus:dev.fn\*(R". Errors are divided into categories indicated by type_instance: \*(L"correctable\*(R", and for uncorrectable errors \*(L"non_fatal\*(R" or \*(L"fatal\*(R". Fatal errors are reported as \fI\s-1NOTIF_FAILURE\s0\fR and all others as \fI\s-1NOTIF_WARNING\s0\fR. .PP \&\fBSynopsis:\fR .PP .Vb 6 \& \& Source "sysfs" \& AccessDir "/sys/bus/pci" \& ReportMasked false \& PersistentNotifications false \& .Ve .PP \&\fBOptions:\fR .IP "\fBSource\fR \fBsysfs\fR|\fBproc\fR" 4 .IX Item "Source sysfs|proc" Use \fBsysfs\fR or \fBproc\fR to read data from /sysfs or /proc. The default value is \fBsysfs\fR. .IP "\fBAccessDir\fR \fIdir\fR" 4 .IX Item "AccessDir dir" Directory used to access device config space. It is optional and defaults to /sys/bus/pci for \fBsysfs\fR and to /proc/bus/pci for \fBproc\fR. .IP "\fBReportMasked\fR \fBfalse\fR|\fBtrue\fR" 4 .IX Item "ReportMasked false|true" If true plugin will notify about errors that are set to masked in Error Mask register. Such errors are not reported to the \s-1PCI\s0 Express Root Complex. Defaults to \fBfalse\fR. .IP "\fBPersistentNotifications\fR \fBfalse\fR|\fBtrue\fR" 4 .IX Item "PersistentNotifications false|true" If false plugin will dispatch notification only on set/clear of error. The ones already reported will be ignored. Defaults to \fBfalse\fR. .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 \fBcollectd\-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 \fBgethostname\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 metrics are read 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 \fBping\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 "\fBAddressFamily\fR \fIaf\fR" 4 .IX Item "AddressFamily af" Sets the address family to use. \fIaf\fR may be \*(L"any\*(R", \*(L"ipv4\*(R" or \*(L"ipv6\*(R". This option will be ignored if you set a \fBSourceAddress\fR. .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 \& \& \& \& Plugin "kingdom" \& Host "hostname" \& Port "5432" \& User "username" \& Password "secret" \& SSLMode "prefer" \& KRBSrvName "kerberos_service_name" \& Query magic \& \& \& \& Interval 300 \& Service "service_name" \& Query backends # 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 \fBtypes.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 \fBstrtoll\fR\|(3) and \&\fBstrtod\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. \fBtypes.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 \&\fBpsql\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 "\fBPlugin\fR \fIPlugin\fR" 4 .IX Item "Plugin Plugin" Use \fIPlugin\fR as the plugin name when submitting query results from this \fBDatabase\fR. Defaults to \f(CW\*(C`postgresql\*(C'\fR. .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 \fBcollectd\-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" Collects information about processes of local system. .PP By default, with no process matches configured, only general statistics is collected: the number of processes in each state and fork rate. .PP Process matches can be configured by \fBProcess\fR and \fBProcessMatch\fR options. These may also be a block in which further options may be specified. .PP The statistics collected for matched processes are: \- size of the resident segment size (\s-1RSS\s0) \- user\- and system-time used \- number of processes \- number of threads \- number of open files (under Linux) \- number of memory mapped files (under Linux) \- io data (where available) \- context switches (under Linux) \- minor and major pagefaults \- Delay Accounting information (Linux only, requires libmnl) .PP \&\fBSynopsis:\fR .PP .Vb 10 \& \& CollectFileDescriptor true \& CollectContextSwitch true \& CollectDelayAccounting false \& Process "name" \& ProcessMatch "name" "regex" \& \& CollectFileDescriptor false \& CollectContextSwitch false \& CollectDelayAccounting true \& \& \& CollectFileDescriptor false \& CollectContextSwitch true \& \& .Ve .IP "\fBProcess\fR \fIName\fR" 4 .IX Item "Process Name" Select more detailed statistics of processes matching this name. .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" Select more detailed statistics of processes matching the specified \fIregex\fR (see \fBregex\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 the number of context switches for matched processes. Disabled by default. .IP "\fBCollectDelayAccounting\fR \fIBoolean\fR" 4 .IX Item "CollectDelayAccounting Boolean" If enabled, collect Linux Delay Accounding information for matching processes. Delay Accounting provides the time processes wait for the \s-1CPU\s0 to become available, for I/O operations to finish, for pages to be swapped in and for freed pages to be reclaimed. The metrics are reported as \*(L"seconds per second\*(R" using the \f(CW\*(C`delay_rate\*(C'\fR type, e.g. \f(CW\*(C`delay_rate\-delay\-cpu\*(C'\fR. Disabled by default. .Sp This option is only available on Linux, requires the \f(CW\*(C`libmnl\*(C'\fR library and requires the \f(CW\*(C`CAP_NET_ADMIN\*(C'\fR capability at runtime. .IP "\fBCollectFileDescriptor\fR \fIBoolean\fR" 4 .IX Item "CollectFileDescriptor Boolean" Collect number of file descriptors of matched processes. Disabled by default. .IP "\fBCollectMemoryMaps\fR \fIBoolean\fR" 4 .IX Item "CollectMemoryMaps Boolean" Collect the number of memory mapped files of the process. The limit for this number is configured via \fI/proc/sys/vm/max_map_count\fR in the Linux kernel. .PP The \fBCollectContextSwitch\fR, \fBCollectDelayAccounting\fR, \&\fBCollectFileDescriptor\fR and \fBCollectMemoryMaps\fR options may be used inside \&\fBProcess\fR and \fBProcessMatch\fR blocks. When used there, these options affect reporting the corresponding processes only. Outside of \fBProcess\fR and \&\fBProcessMatch\fR blocks these options set the default value for subsequent matches. .ie n .SS "Plugin ""procevent""" .el .SS "Plugin \f(CWprocevent\fP" .IX Subsection "Plugin procevent" The \fIprocevent\fR plugin monitors when processes start (\s-1EXEC\s0) and stop (\s-1EXIT\s0). .PP \&\fBSynopsis:\fR .PP .Vb 5 \& \& BufferLength 10 \& Process "name" \& ProcessRegex "regex" \& .Ve .PP \&\fBOptions:\fR .IP "\fBBufferLength\fR \fIlength\fR" 4 .IX Item "BufferLength length" Maximum number of process events that can be stored in plugin's ring buffer. By default, this is set to 10. Once an event has been read, its location becomes available for storing a new event. .IP "\fBProcess\fR \fIname\fR" 4 .IX Item "Process name" Enumerate a process name to monitor. All processes that match this exact name will be monitored for EXECs and EXITs. .IP "\fBProcessRegex\fR \fIregex\fR" 4 .IX Item "ProcessRegex regex" Enumerate a process pattern to monitor. All processes that match this regular expression will be monitored for EXECs and EXITs. .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. .Sp See \fI/\*(L"\s-1IGNORELISTS\*(R"\s0\fR for details. .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 \fBcollectd\-python\fR\|(5) for its documentation. .ie n .SS "Plugin ""redfish""" .el .SS "Plugin \f(CWredfish\fP" .IX Subsection "Plugin redfish" The \f(CW\*(C`redfish\*(C'\fR plugin collects sensor data using \s-1REST\s0 protocol called Redfish. .PP \&\fBSample configuration:\fR .PP .Vb 10 \& \& \& Endpoint "/redfish/v1/Chassis/Chassis\-1/Thermal" \& \& \& PluginInstance "chassis\-1" \& Type "rpm" \& \& \& \& \& Endpoint "/redfish/v1/Chassis/Chassis\-1/Thermal" \& \& \& PluginInstance "chassis\-1" \& Type "degrees" \& \& \& \& \& Endpoint "/redfish/v1/Chassis/Chassis\-1/Power" \& \& \& PluginInstance "chassis\-1" \& Type "volts" \& \& \& \& \& Host "127.0.0.1:5000" \& User "user" \& Passwd "passwd" \& Queries "fans" "voltages" "temperatures" \& \& .Ve .IP "\fBQuery\fR" 4 .IX Item "Query" Section defining a query performed on Redfish interface .IP "\fBEndpoint\fR" 4 .IX Item "Endpoint" \&\s-1URI\s0 of the \s-1REST API\s0 Endpoint for accessing the \s-1BMC\s0 .IP "\fBResource\fR" 4 .IX Item "Resource" Selects single resource or array to collect data. .IP "\fBProperty\fR" 4 .IX Item "Property" Selects property from which data is gathered .IP "\fBPluginInstance\fR" 4 .IX Item "PluginInstance" Plugin instance of dispatched collectd metric .IP "\fBType\fR" 4 .IX Item "Type" Type of dispatched collectd metric .IP "\fBTypeInstance\fR" 4 .IX Item "TypeInstance" Type instance of collectd metric .IP "\fBService\fR" 4 .IX Item "Service" Section defining service to be sent requests .IP "\fBUsername\fR" 4 .IX Item "Username" \&\s-1BMC\s0 username .IP "\fBPassword\fR" 4 .IX Item "Password" \&\s-1BMC\s0 password .IP "\fBQueries\fR" 4 .IX Item "Queries" Queries to run .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 \& CollectHealth 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. .IP "\fBCollectHealth\fR \fBtrue\fR|\fBfalse\fR" 4 .IX Item "CollectHealth true|false" When enabled, the health statistics will be collected. This includes the voltage and temperature on supported hardware. 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, gathers information about each server's state and executes user-defined queries. For each server there is a \fINode\fR block which configures the connection parameters and set of user-defined queries for this node. .PP .Vb 10 \& \& \& Host "localhost" \& Port "6379" \& #Socket "/var/run/redis/redis.sock" \& Timeout 2000 \& ReportCommandStats false \& ReportCpuUsage true \& \& #Database 0 \& Type "queue_length" \& Instance "myqueue" \& \& \& .Ve .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 128\ characters in length. .Sp When no \fBNode\fR is configured explicitly, plugin connects to \*(L"localhost:6379\*(R". .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 "\fBSocket\fR \fIPath\fR" 4 .IX Item "Socket Path" Connect to Redis using the \s-1UNIX\s0 domain socket at \fIPath\fR. If this setting is given, the \fBHostname\fR and \fBPort\fR settings are ignored. .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. It is expected what \fBTimeout\fR values should be lower than \fBInterval\fR defined globally. .Sp Defaults to 2000 (2 seconds). .IP "\fBReportCommandStats\fR \fBfalse\fR|\fBtrue\fR" 4 .IX Item "ReportCommandStats false|true" Enables or disables reporting of statistics based on the command type, including rate of command calls and average \s-1CPU\s0 time consumed by command processing. Defaults to \fBfalse\fR. .IP "\fBReportCpuUsage\fR \fBtrue\fR|\fBfalse\fR" 4 .IX Item "ReportCpuUsage true|false" Enables or disables reporting of \s-1CPU\s0 consumption statistics. Defaults to \fBtrue\fR. .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. Each query should return single string or integer. .IP "\fBType\fR \fICollectd type\fR" 4 .IX Item "Type Collectd type" Within a query definition, a valid \fIcollectd type\fR to use as when submitting the result of the query. When not supplied, will default to \fBgauge\fR. .Sp Currently only types with one datasource are supported. See \fBtypes.db\fR\|(5) for more details on types and their configuration. .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 128 chars. .IP "\fBDatabase\fR \fIIndex\fR" 4 .IX Item "Database Index" This index selects the Redis logical database to use for query. Defaults to \f(CW0\fR. .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, \fBrrdcached\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 \fBrrdcached\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 \fBrrdcached\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 \fBrrdcreate\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 by \fBCacheTimeout\fR. That check happens on new values arriwal. 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 every \fISeconds\fR seconds the entire cache is searched for entries older than \&\fBCacheTimeout\fR + \fBRandomTimeout\fR seconds. The entries found are written to disk. Since scanning the entire cache 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. .Sp Defaults to 10x \fBCacheTimeout\fR. \&\fBCacheFlush\fR must be larger than or equal to \fBCacheTimeout\fR, otherwise the above default is used. .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 \&\fBsensors.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. .Sp See \fI/\*(L"\s-1IGNORELISTS\*(R"\s0\fR for details. .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 ""slurm""" .el .SS "Plugin \f(CWslurm\fP" .IX Subsection "Plugin slurm" This plugin collects per-partition \s-1SLURM\s0 node and job state information, as well as internal health statistics. It takes no options. It should run on a node that is capable of running the \&\fIsinfo\fR and \fIsqueue\fR commands, i.e. it has a running slurmd and a valid slurm.conf. Note that this plugin needs the \fBGlobals\fR option set to \fItrue\fR in order to function properly. .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 .Sp See \fI/\*(L"\s-1IGNORELISTS\*(R"\s0\fR for details. .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, \&\fBcollectd\-snmp\fR\|(5). Please see there for details. .ie n .SS "Plugin ""snmp_agent""" .el .SS "Plugin \f(CWsnmp_agent\fP" .IX Subsection "Plugin snmp_agent" The \fIsnmp_agent\fR plugin is an AgentX subagent that receives and handles queries from \s-1SNMP\s0 master agent and returns the data collected by read plugins. The \fIsnmp_agent\fR plugin handles requests only for OIDs specified in configuration file. To handle \s-1SNMP\s0 queries the plugin gets data from collectd and translates requested values from collectd's internal format to \s-1SNMP\s0 format. This plugin is a generic plugin and cannot work without configuration. For more details on AgentX subagent see .PP \&\fBSynopsis:\fR .PP .Vb 10 \& \& \& Plugin "memory" \& #PluginInstance "some" \& Type "memory" \& TypeInstance "free" \& OIDs "1.3.6.1.4.1.2021.4.6.0" \& \& \& IndexOID "IF\-MIB::ifIndex" \& SizeOID "IF\-MIB::ifNumber" \& \& \& Source "PluginInstance" \& \& Plugin "interface" \& OIDs "IF\-MIB::ifDescr" \& \& \& Plugin "interface" \& Type "if_octets" \& TypeInstance "" \& OIDs "IF\-MIB::ifInOctets" "IF\-MIB::ifOutOctets" \& \&
\& \& \& \& Source "PluginInstance" \& \& Plugin "virt" \& OIDs "LIBVIRT\-HYPERVISOR\-MIB::lvhAffinityDomainName" \& \& \& Plugin "virt" \& \& Source "TypeInstance" \& Regex "^vcpu_([0\-9]{1,3})\-cpu_[0\-9]{1,3}$" \& Group 1 \& \& OIDs "LIBVIRT\-HYPERVISOR\-MIB::lvhVCPUIndex" \& \& \& Plugin "virt" \& \& Source "TypeInstance" \& Regex "^vcpu_[0\-9]{1,3}\-cpu_([0\-9]{1,3})$" \& Group 1 \& \& OIDs "LIBVIRT\-HYPERVISOR\-MIB::lvhCPUIndex" \& \& \& Plugin "virt" \& Type "cpu_affinity" \& OIDs "LIBVIRT\-HYPERVISOR\-MIB::lvhCPUAffinity" \& \&
\&
.Ve .PP There are two types of blocks that can be contained in the \&\f(CW\*(C`\*(C'\fR block: \fBData\fR and \fBTable\fR: .PP \fI\f(BIData\fI block\fR .IX Subsection "Data block" .PP The \fBData\fR block defines a list OIDs that are to be handled. This block can define scalar or table OIDs. If \fBData\fR block is defined inside of \fBTable\fR block it reperesents table OIDs. The following options can be set: .IP "\fBIndexKey\fR block" 4 .IX Item "IndexKey block" \&\fBIndexKey\fR block contains all data needed for proper index build of snmp table. In case more than one table \fBData\fR block has \fBIndexKey\fR block present then multiple key index is built. If \fBData\fR block defines scalar data type \fBIndexKey\fR has no effect and can be omitted. .RS 4 .IP "\fBSource\fR \fIString\fR" 8 .IX Item "Source String" \&\fBSource\fR can be set to one of the following values: \*(L"Hostname\*(R", \*(L"Plugin\*(R", \&\*(L"PluginInstance\*(R", \*(L"Type\*(R", \*(L"TypeInstance\*(R". This value indicates which field of corresponding collectd metric is taken as a \s-1SNMP\s0 table index. .IP "\fBRegex\fR \fIString\fR" 8 .IX Item "Regex String" \&\fBRegex\fR option can also be used to parse strings or numbers out of specific field. For example: type-instance field which is \*(L"vcpu1\-cpu2\*(R" can be parsed into two numeric fields \s-1CPU\s0 = 2 and \s-1VCPU\s0 = 1 and can be later used as a table index. .IP "\fBGroup\fR \fINumber\fR" 8 .IX Item "Group Number" \&\fBGroup\fR number can be specified in case groups are used in regex. .RE .RS 4 .RE .IP "\fBPlugin\fR \fIString\fR" 4 .IX Item "Plugin String" Read plugin name whose collected data will be mapped to specified OIDs. .IP "\fBPluginInstance\fR \fIString\fR" 4 .IX Item "PluginInstance String" Read plugin instance whose collected data will be mapped to specified OIDs. The field is optional and by default there is no plugin instance check. Allowed only if \fBData\fR block defines scalar data type. .IP "\fBType\fR \fIString\fR" 4 .IX Item "Type String" Collectd's type that is to be used for specified \s-1OID,\s0 e.\ g. \*(L"if_octets\*(R" for example. The types are read from the \fBTypesDB\fR (see \fBcollectd.conf\fR\|(5)). .IP "\fBTypeInstance\fR \fIString\fR" 4 .IX Item "TypeInstance String" Collectd's type-instance that is to be used for specified \s-1OID.\s0 .IP "\fBOIDs\fR \fI\s-1OID\s0\fR [\fI\s-1OID\s0\fR ...]" 4 .IX Item "OIDs OID [OID ...]" Configures the OIDs to be handled by \fIsnmp_agent\fR plugin. Values for these OIDs are taken from collectd data type specified by \fBPlugin\fR, \fBPluginInstance\fR, \&\fBType\fR, \fBTypeInstance\fR fields of this \fBData\fR block. Number of the OIDs configured should correspond to number of values in specified \fBType\fR. For example two OIDs \*(L"IF\-MIB::ifInOctets\*(R" \*(L"IF\-MIB::ifOutOctets\*(R" can be mapped to \&\*(L"rx\*(R" and \*(L"tx\*(R" values of \*(L"if_octets\*(R" type. .IP "\fBScale\fR \fIValue\fR" 4 .IX Item "Scale Value" The values taken from collectd are multiplied by \fIValue\fR. The field is optional and the default is \fB1.0\fR. .IP "\fBShift\fR \fIValue\fR" 4 .IX Item "Shift Value" \&\fIValue\fR is added to values from collectd after they have been multiplied by \&\fBScale\fR value. The field is optional and the default value is \fB0.0\fR. .PP \fIThe \f(BITable\fI block\fR .IX Subsection "The Table block" .PP The \fBTable\fR block defines a collection of \fBData\fR blocks that belong to one snmp table. In addition to multiple \fBData\fR blocks the following options can be set: .IP "\fBIndexOID\fR \fI\s-1OID\s0\fR" 4 .IX Item "IndexOID OID" \&\s-1OID\s0 that is handled by the plugin and is mapped to numerical index value that is generated by the plugin for each table record. .IP "\fBSizeOID\fR \fI\s-1OID\s0\fR" 4 .IX Item "SizeOID OID" \&\s-1OID\s0 that is handled by the plugin. Returned value is the number of records in the table. The field is optional. .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. .Sp Please note what reported timer values less than 0.001 are ignored in all \fBTimer*\fR reports. .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 \fBswapctl\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. .IP "\fBReportIO\fR \fBtrue\fR|\fBfalse\fR" 4 .IX Item "ReportIO true|false" Enables or disables reporting swap \s-1IO.\s0 Defaults to \fBtrue\fR. .Sp This is useful for the cases when swap \s-1IO\s0 is not neccessary, is not available, or is not reliable. .ie n .SS "Plugin ""sysevent""" .el .SS "Plugin \f(CWsysevent\fP" .IX Subsection "Plugin sysevent" The \fIsysevent\fR plugin monitors rsyslog messages. .PP \&\fBSynopsis:\fR .PP .Vb 6 \& \& Listen "192.168.0.2" "6666" \& BufferSize 1024 \& BufferLength 10 \& RegexFilter "regex" \& \& \& rsyslog should be configured such that it sends data to the IP and port you \& include in the plugin configuration. For example, given the configuration \& above, something like this would be set in /etc/rsyslog.conf: \& \& if $programname != \*(Aqcollectd\*(Aq then \& *.* @192.168.0.2:6666 \& \& This plugin is designed to consume JSON rsyslog data, so a more complete \& rsyslog configuration would look like so (where we define a JSON template \& and use it when sending data to our IP and port): \& \& $template ls_json,"{%timestamp:::date\-rfc3339,jsonf:@timestamp%, \e \& %source:::jsonf:@source_host%,\e"@source\e":\e"syslog://%fromhost\-ip:::json%\e", \e \& \e"@message\e":\e"%timestamp% %app\-name%:%msg:::json%\e",\e"@fields\e": \e \& {%syslogfacility\-text:::jsonf:facility%,%syslogseverity:::jsonf:severity\-num%, \e \& %syslogseverity\-text:::jsonf:severity%,%programname:::jsonf:program%, \e \& %procid:::jsonf:processid%}}" \& \& if $programname != \*(Aqcollectd\*(Aq then \& *.* @192.168.0.2:6666;ls_json \& \& Please note that these rsyslog.conf examples are *not* complete, as rsyslog \& requires more than these options in the configuration file. These examples \& are meant to demonstration the proper remote logging and JSON format syntax. .Ve .PP \&\fBOptions:\fR .IP "\fBListen\fR \fIhost\fR \fIport\fR" 4 .IX Item "Listen host port" Listen on this \s-1IP\s0 on this port for incoming rsyslog messages. .IP "\fBBufferSize\fR \fIlength\fR" 4 .IX Item "BufferSize length" Maximum allowed size for incoming rsyslog messages. Messages that exceed this number will be truncated to this size. Default is 4096 bytes. .IP "\fBBufferLength\fR \fIlength\fR" 4 .IX Item "BufferLength length" Maximum number of rsyslog events that can be stored in plugin's ring buffer. By default, this is set to 10. Once an event has been read, its location becomes available for storing a new event. .IP "\fBRegexFilter\fR \fIregex\fR" 4 .IX Item "RegexFilter regex" Enumerate a regex filter to apply to all incoming rsyslog messages. If a message matches this filter, it will be published. .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 \fBproc\fR\|(5) filesystem or \s-1CSV\s0 (comma separated values) files. .PP .Vb 10 \& \& \& #Plugin "slab" \& Instance "slabinfo" \& Separator " " \& \& Type gauge \& InstancePrefix "active_objs" \& InstancesFrom 0 \& ValuesFrom 1 \& \& \& Type gauge \& InstancePrefix "objperslab" \& InstancesFrom 0 \& ValuesFrom 4 \& \&
\&
.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 "\fBPlugin\fR \fIPlugin\fR" 4 .IX Item "Plugin Plugin" If specified, \fIPlugin\fR is used as the plugin name when submitting values. Defaults to \fBtable\fR. .IP "\fBInstance\fR \fIinstance\fR" 4 .IX Item "Instance instance" If specified, \fIinstance\fR is used as the plugin instance. 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 \fBstrtok_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 \fBtypes.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 \fBstrtoll\fR\|(3) and \fBstrtod\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 \fBtail\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 \fBregex\fR\|(7). .PP .Vb 10 \& \& \& Plugin "mail" \& 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 \& #BucketType "bucket" \& \& 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 \fBPlugin\fR and \fBInstance\fR options in the \fBFile\fR block may be used to set the plugin name and instance respectively. So in the above example the plugin name \&\f(CW\*(C`mail\-exim\*(C'\fR would be used. .PP These options are applied for all \fBMatch\fR blocks that \fBfollow\fR it, until the next \fBPlugin\fR or \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 \&\fBstrtoll\fR\|(3) or \fBstrtod\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 \fBregex\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 of all values matched during the interval. .IP "\fBGaugeMin\fR" 4 .IX Item "GaugeMin" Report the smallest value matched during the interval. .IP "\fBGaugeMax\fR" 4 .IX Item "GaugeMax" Report the greatest value matched during the interval. .IP "\fBGaugeLast\fR" 4 .IX Item "GaugeLast" Report the last value matched during the interval. .IP "\fBGaugePersist\fR" 4 .IX Item "GaugePersist" Report the last matching value. The metric is \fInot\fR reset to \f(CW\*(C`NaN\*(C'\fR at the end of an interval. It is continuously reported until another value 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. .Sp \&\fBGaugeInc\fR is reset to \fIzero\fR after every read, unlike other \fBGauge*\fR metrics which are reset to \f(CW\*(C`NaN\*(C'\fR. .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 5 \& \& Percentile 99 \& Bucket 0 100 \& BucketType "bucket" \& .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 set by \fBBucketType\fR option (\f(CW\*(C`bucket\*(C'\fR by default) and the \fItype instance\fR \&\f(CW\*(C`[\-]\-_\*(C'\fR. .Sp This option may be repeated to calculate more than one rate. .IP "\fBBucketType\fR \fIType\fR" 4 .IX Item "BucketType Type" Sets the type used to dispatch \fBBucket\fR metrics. Optional, by default \f(CW\*(C`bucket\*(C'\fR will be used. .RE .RS 4 .RE .RE .RS 4 .Sp The \fBGauge*\fR and \fBDistribution\fR types interpret the submatch as a floating point number, using \fBstrtod\fR\|(3). The \fBCounter*\fR and \fBAbsoluteSet\fR types interpret the submatch as an unsigned integer using \fBstrtoull\fR\|(3). The \&\fBDerive*\fR types interpret the submatch as a signed integer using \&\fBstrtoll\fR\|(3). \fBCounterInc\fR, \fBDeriveInc\fR and \fBGaugeInc\fR do not use the submatch at all and it may be omitted in this case. .Sp The \fBGauge*\fR types, unless noted otherwise, are reset to \f(CW\*(C`NaN\*(C'\fR after being reported. In other words, \fBGaugeAverage\fR reports the average of all values matched since the last metric was reported (or \f(CW\*(C`NaN\*(C'\fR if there was no match). .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 \fBtypes.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 10 \& \& \& Type "percent" \& Instance "dropped" \& ValueFrom 1 \& \& \& Plugin "snortstats" \& Instance "eth0" \& Interval 600 \& Collect "snort\-dropped" \& FieldSeparator "," \& #TimeFrom 0 \& \& .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 \fBtypes.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 "\fBPlugin\fR \fIPlugin\fR" 4 .IX Item "Plugin Plugin" Use \fIPlugin\fR as the plugin name when submitting values. Defaults to \f(CW\*(C`tail_csv\*(C'\fR. .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. .IP "\fBFieldSeparator\fR \fICharacter\fR" 4 .IX Item "FieldSeparator Character" Specify the character to use as field separator while parsing the \s-1CSV.\s0 Defaults to ',' if not specified. The value can only be a single character. .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. .Sp See \fI/\*(L"\s-1IGNORELISTS\*(R"\s0\fR for details. .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 \fBcollectd\-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 dynamic number assigned by the kernel. Otherwise, \f(CW\*(C`core\*(C'\fR is used if there is only one package and \f(CW\*(C`pkg\-core\*(C'\fR if there is more than one, where \fIn\fR is the n\-th core of package \fIm\fR. .IP "\fBRestoreAffinityPolicy\fR \fIAllCPUs\fR|\fIRestore\fR" 4 .IX Item "RestoreAffinityPolicy AllCPUs|Restore" Reading data from \s-1CPU\s0 has side-effect: collectd process's \s-1CPU\s0 affinity mask changes. After reading data is completed, affinity mask needs to be restored. This option allows to set restore policy. .Sp \&\fBAllCPUs\fR (the default): Restore the affinity by setting affinity to any/all CPUs. .Sp \&\fBRestore\fR: Save affinity using \fBsched_getaffinity()\fR before reading data and restore it after. .Sp On some systems, \fBsched_getaffinity()\fR will fail due to inconsistency of the \s-1CPU\s0 set size between userspace and kernel. In these cases plugin will detect the unsuccessful call and fail with an error, preventing data collection. Most of configurations does not need to save affinity as Collectd process is allowed to run on any/all available CPUs. .Sp If you need to save and restore affinity and get errors like 'Unable to save the \s-1CPU\s0 affinity', setting 'possible_cpus' kernel boot option may also help. .Sp See following links for details: .Sp .ie n .SS "Plugin ""ubi""" .el .SS "Plugin \f(CWubi\fP" .IX Subsection "Plugin ubi" The \fIUbi plugin\fR collects some statistics about the \s-1UBI\s0 (Unsorted Block Image). Values collected are the number of bad physical eraseblocks on the underlying \s-1MTD\s0 (Memory Technology Device) and the maximum erase counter value concerning one volume. .PP See following links for details: .PP .IP "\fBDevice\fR \fIName\fR" 4 .IX Item "Device Name" Select the device \fIName\fR of the \s-1UBI\s0 volume. Whether it is collected or ignored depends on the \fBIgnoreSelected\fR setting, see below. .Sp See \fI/\*(L"\s-1IGNORELISTS\*(R"\s0\fR for details. .IP "\fBIgnoreSelected\fR \fBtrue\fR|\fBfalse\fR" 4 .IX Item "IgnoreSelected true|false" Sets whether selected devices, i.\ e. the ones matches by any of the \fBDevice\fR statements, are ignored or if all other devices are ignored. If no \fBDevice\fR option is configured, all devices are collected. If at least one \fBDevice\fR is given and no \&\fBIgnoreSelected\fR or set to \fBfalse\fR, \fBonly\fR matching disks will be collected. If \&\fBIgnoreSelected\fRis set to \fBtrue\fR, all devices are collected \fBexcept\fR the ones matched. .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 \&\fBchmod\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 \fBbind\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 \fBvarnishstat\fR\|(1), and organizes them in categories which can be enabled or disabled. Currently only metrics shown in \fBvarnishstat\fR\|(1)'s \fI\s-1MAIN\s0\fR section are collected. The exact meaning of each metric can be found in \fBvarnish\-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 \& CollectLock false \& CollectMempool false \& CollectManagement false \& CollectSMF false \& CollectVBE false \& CollectMSE 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. Note: \s-1SMA, SMF\s0 and \s-1MSE\s0 share counters, enable only the one used by the Varnish instance. 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., in varnish 4.x. use CollectSMF. 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. .IP "\fBCollectVBE\fR \fBtrue\fR|\fBfalse\fR" 4 .IX Item "CollectVBE true|false" Backend counters. Only available with Varnish 4.x. False by default. .IP "\fBCollectSMF\fR \fBtrue\fR|\fBfalse\fR" 4 .IX Item "CollectSMF true|false" file (memory mapped file) storage statistics. Only available with Varnish 4.x. Note: \s-1SMA, SMF\s0 and \s-1MSE\s0 share counters, enable only the one used by the Varnish instance. Used to be called \s-1SM\s0 in Varnish 2.x. False by default. .IP "\fBCollectManagement\fR \fBtrue\fR|\fBfalse\fR" 4 .IX Item "CollectManagement true|false" Management process counters. Only available with Varnish 4.x. False by default. .IP "\fBCollectLock\fR \fBtrue\fR|\fBfalse\fR" 4 .IX Item "CollectLock true|false" Lock counters. Only available with Varnish 4.x. False by default. .IP "\fBCollectMempool\fR \fBtrue\fR|\fBfalse\fR" 4 .IX Item "CollectMempool true|false" Memory pool counters. Only available with Varnish 4.x. False by default. .IP "\fBCollectMSE\fR \fBtrue\fR|\fBfalse\fR" 4 .IX Item "CollectMSE true|false" Varnish Massive Storage Engine 2.0 (\s-1MSE2\s0) is an improved storage backend for Varnish, replacing the traditional malloc and file storages. Only available with Varnish-Plus 4.x. Note: \s-1SMA, SMF\s0 and \s-1MSE\s0 share counters, enable only the one used by the Varnish instance. 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, network load and other metrics to be collected for virtualized guests on the machine. The statistics are collected through libvirt \&\s-1API\s0 (). Majority of metrics can be gathered without installing any additional software on guests, especially \fIcollectd\fR, which runs only on the host system. .PP Only \fIConnection\fR is required. .PP Consider the following example config: .PP .Vb 6 \& \& Connection "qemu:///system" \& HostnameFormat "hostname" \& InterfaceFormat "address" \& PluginInstanceFormat "name" \& .Ve .PP It will generate the following values: .PP .Vb 10 \& node42.example.com/virt\-instance\-0006f26c/disk_octets\-vda \& node42.example.com/virt\-instance\-0006f26c/disk_ops\-vda \& node42.example.com/virt\-instance\-0006f26c/if_dropped\-ca:fe:ca:fe:ca:fe \& node42.example.com/virt\-instance\-0006f26c/if_errors\-ca:fe:ca:fe:ca:fe \& node42.example.com/virt\-instance\-0006f26c/if_octets\-ca:fe:ca:fe:ca:fe \& node42.example.com/virt\-instance\-0006f26c/if_packets\-ca:fe:ca:fe:ca:fe \& node42.example.com/virt\-instance\-0006f26c/memory\-actual_balloon \& node42.example.com/virt\-instance\-0006f26c/memory\-available \& node42.example.com/virt\-instance\-0006f26c/memory\-last_update \& node42.example.com/virt\-instance\-0006f26c/memory\-major_fault \& node42.example.com/virt\-instance\-0006f26c/memory\-minor_fault \& node42.example.com/virt\-instance\-0006f26c/memory\-rss \& node42.example.com/virt\-instance\-0006f26c/memory\-swap_in \& node42.example.com/virt\-instance\-0006f26c/memory\-swap_out \& node42.example.com/virt\-instance\-0006f26c/memory\-total \& node42.example.com/virt\-instance\-0006f26c/memory\-unused \& node42.example.com/virt\-instance\-0006f26c/memory\-usable \& node42.example.com/virt\-instance\-0006f26c/virt_cpu_total \& node42.example.com/virt\-instance\-0006f26c/virt_vcpu\-0 .Ve .PP You can get information on the metric's units from the online libvirt documentation. For instance, \fIvirt_cpu_total\fR is in nanoseconds. .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 \&\fBNote:\fR \fBBlockDevice\fR and \fBInterfaceDevice\fR options are related to corresponding \fB*Format\fR options. Specifically, \fBBlockDevice\fR filtering depends on \fBBlockDeviceFormat\fR setting \- if user wants to filter block devices by \&'target' name then \fBBlockDeviceFormat\fR option has to be set to 'target' and \&\fBBlockDevice\fR option must be set to a valid block device target name(\*(L"/:hdb/\*(R"). Mixing formats and filter values from different worlds (i.e., using 'target' name as \fBBlockDevice\fR value with \fBBlockDeviceFormat\fR set to \&'source') may lead to unexpected results (all devices filtered out or all visible, depending on the value of \fBIgnoreSelected\fR option). Similarly, option \fBInterfaceDevice\fR is related to \fBInterfaceFormat\fR setting (i.e., when user wants to use \s-1MAC\s0 address as a filter then \fBInterfaceFormat\fR has to be set to 'address' \- using wrong type here may filter out all of the interfaces). .Sp \&\fBExample 1:\fR .Sp Ignore all \fIhdb\fR devices on any domain, but other block devices (eg. \fIhda\fR) will be collected: .Sp .Vb 3 \& BlockDevice "/:hdb/" \& IgnoreSelected "true" \& BlockDeviceFormat "target" .Ve .Sp \&\fBExample 2:\fR .Sp Collect metrics only for block device on 'baremetal0' domain when its \&'source' matches given path: .Sp .Vb 2 \& BlockDevice "baremetal0:/var/lib/libvirt/images/baremetal0.qcow2" \& BlockDeviceFormat source .Ve .Sp As you can see it is possible to filter devices/interfaces using various formats \- for block devices 'target' or 'source' name can be used. Interfaces can be filtered using 'name', 'address' or 'number'. .Sp \&\fBExample 3:\fR .Sp Collect metrics only for domains 'baremetal0' and 'baremetal1' and ignore any other domain: .Sp .Vb 2 \& Domain "baremetal0" \& Domain "baremetal1" .Ve .Sp It is possible to filter multiple block devices/domains/interfaces by adding multiple filtering entries in separate lines. .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`\*(C'\fR node in the \s-1XML\s0 definition of the domain. .Sp \&\fBExample:\fR .Sp If the domain \s-1XML\s0 have the following device defined: .Sp .Vb 7 \& \& \& \& \& \&
\& .Ve .Sp Setting \f(CW\*(C`BlockDeviceFormat target\*(C'\fR will cause the \fItype instance\fR to be set to \f(CW\*(C`sda\*(C'\fR. Setting \f(CW\*(C`BlockDeviceFormat source\*(C'\fR will cause the \fItype instance\fR to be set to \f(CW\*(C`var_lib_libvirt_images_image1.qcow2\*(C'\fR. .Sp \&\fBNote:\fR this option determines also what field will be used for filtering over block devices (filter value in \fBBlockDevice\fR will be applied to target or source). More info about filtering block devices can be found in the description of \fBBlockDevice\fR. .IP "\fBBlockDeviceFormatBasename\fR \fBfalse\fR|\fBtrue\fR" 4 .IX Item "BlockDeviceFormatBasename false|true" The \fBBlockDeviceFormatBasename\fR controls whether the full path or the \&\fBbasename\fR\|(1) of the source is being used as the \fItype instance\fR when \&\fBBlockDeviceFormat\fR is set to \fBsource\fR. Defaults to \fBfalse\fR. .Sp \&\fBExample:\fR .Sp Assume the device path (source tag) is \f(CW\*(C`/var/lib/libvirt/images/image1.qcow2\*(C'\fR. Setting \f(CW\*(C`BlockDeviceFormatBasename false\*(C'\fR will cause the \fItype instance\fR to be set to \f(CW\*(C`var_lib_libvirt_images_image1.qcow2\*(C'\fR. Setting \f(CW\*(C`BlockDeviceFormatBasename true\*(C'\fR will cause the \fItype instance\fR to be set to \f(CW\*(C`image1.qcow2\*(C'\fR. .IP "\fBHostnameFormat\fR \fBname|uuid|hostname|metadata...\fR" 4 .IX Item "HostnameFormat name|uuid|hostname|metadata..." When the virt plugin logs data, it sets the hostname of the collected data according to this setting. The default is to use the guest name as provided by the hypervisor, which is equal to setting \fBname\fR. .Sp \&\fBuuid\fR means use the guest's \s-1UUID.\s0 This is useful if you want to track the same guest across migrations. .Sp \&\fBhostname\fR means to use the global \fBHostname\fR setting, which is probably not useful on its own because all guests will appear to have the same name. This is useful in conjunction with \fBPluginInstanceFormat\fR though. .Sp \&\fBmetadata\fR means use information from guest's metadata. Use \&\fBHostnameMetadataNS\fR and \fBHostnameMetadataXPath\fR to localize this information. .Sp You can also specify combinations of these fields. For example \fBname uuid\fR means to concatenate the guest name and \s-1UUID\s0 (with a literal colon character between, thus \fI\*(L"foo:1234\-1234\-1234\-1234\*(R"\fR). .Sp At the moment of writing (collectd\-5.5), hostname string is limited to 62 characters. In case when combination of fields exceeds 62 characters, hostname will be truncated without a warning. .IP "\fBInterfaceFormat\fR \fBname\fR|\fBaddress\fR|\fBnumber\fR" 4 .IX Item "InterfaceFormat name|address|number" When the virt plugin logs interface data, it sets the name of the collected data according to this setting. The default is to use the path as provided by the hypervisor (the \*(L"dev\*(R" property of the target node), which is equal to setting \fBname\fR. .Sp \&\fBaddress\fR means use the interface's mac address. This is useful since the interface path might change between reboots of a guest or across migrations. .Sp \&\fBnumber\fR means use the interface's number in guest. .Sp \&\fBNote:\fR this option determines also what field will be used for filtering over interface device (filter value in \fBInterfaceDevice\fR will be applied to name, address or number). More info about filtering interfaces can be found in the description of \fBInterfaceDevice\fR. .IP "\fBPluginInstanceFormat\fR \fBname|uuid|metadata|none\fR" 4 .IX Item "PluginInstanceFormat name|uuid|metadata|none" When the virt plugin logs data, it sets the plugin_instance of the collected data according to this setting. The default is to not set the plugin_instance. .Sp \&\fBname\fR means use the guest's name as provided by the hypervisor. \&\fBuuid\fR means use the guest's \s-1UUID.\s0 \&\fBmetadata\fR means use information from guest's metadata. .Sp You can also specify combinations of the \fBname\fR and \fBuuid\fR fields. For example \fBname uuid\fR means to concatenate the guest name and \s-1UUID\s0 (with a literal colon character between, thus \fI\*(L"foo:1234\-1234\-1234\-1234\*(R"\fR). .IP "\fBHostnameMetadataNS\fR \fBstring\fR" 4 .IX Item "HostnameMetadataNS string" When \fBmetadata\fR is used in \fBHostnameFormat\fR or \fBPluginInstanceFormat\fR, this selects in which metadata namespace we will pick the hostname. The default is \&\fIhttp://openstack.org/xmlns/libvirt/nova/1.0\fR. .IP "\fBHostnameMetadataXPath\fR \fBstring\fR" 4 .IX Item "HostnameMetadataXPath string" When \fBmetadata\fR is used in \fBHostnameFormat\fR or \fBPluginInstanceFormat\fR, this describes where the hostname is located in the libvirt metadata. The default is \&\fI/instance/name/\f(BItext()\fI\fR. .IP "\fBReportBlockDevices\fR \fBtrue\fR|\fBfalse\fR" 4 .IX Item "ReportBlockDevices true|false" Enabled by default. Allows to disable stats reporting of block devices for whole plugin. .IP "\fBReportNetworkInterfaces\fR \fBtrue\fR|\fBfalse\fR" 4 .IX Item "ReportNetworkInterfaces true|false" Enabled by default. Allows to disable stats reporting of network interfaces for whole plugin. .IP "\fBExtraStats\fR \fBstring\fR" 4 .IX Item "ExtraStats string" Report additional extra statistics. The default is no extra statistics, preserving the previous behaviour of the plugin. If unsure, leave the default. If enabled, allows the plugin to reported more detailed statistics about the behaviour of Virtual Machines. The argument is a space-separated list of selectors. .Sp Currently supported selectors are: .RS 4 .IP "\fBcpu_util\fR: report \s-1CPU\s0 utilization per domain in percentage." 4 .IX Item "cpu_util: report CPU utilization per domain in percentage." .PD 0 .IP "\fBdisk\fR: report extra statistics like number of flush operations and total service time for read, write and flush operations. Requires libvirt \s-1API\s0 version \fI0.9.5\fR or later." 4 .IX Item "disk: report extra statistics like number of flush operations and total service time for read, write and flush operations. Requires libvirt API version 0.9.5 or later." .IP "\fBdisk_err\fR: report disk errors if any occured. Requires libvirt \s-1API\s0 version \fI0.9.10\fR or later." 4 .IX Item "disk_err: report disk errors if any occured. Requires libvirt API version 0.9.10 or later." .IP "\fBdomain_state\fR: report domain state and reason as 'domain_state' metric." 4 .IX Item "domain_state: report domain state and reason as 'domain_state' metric." .IP "\fBfs_info\fR: report file system information as a notification. Requires libvirt \s-1API\s0 version \fI1.2.11\fR or later. Can be collected only if \fIGuest Agent\fR is installed and configured inside \s-1VM.\s0 Make sure that installed \fIGuest Agent\fR version supports retrieving file system information." 4 .IX Item "fs_info: report file system information as a notification. Requires libvirt API version 1.2.11 or later. Can be collected only if Guest Agent is installed and configured inside VM. Make sure that installed Guest Agent version supports retrieving file system information." .IP "\fBjob_stats_background\fR: report statistics about progress of a background job on a domain. Only one type of job statistics can be collected at the same time. Requires libvirt \s-1API\s0 version \fI1.2.9\fR or later." 4 .IX Item "job_stats_background: report statistics about progress of a background job on a domain. Only one type of job statistics can be collected at the same time. Requires libvirt API version 1.2.9 or later." .IP "\fBjob_stats_completed\fR: report statistics about a recently completed job on a domain. Only one type of job statistics can be collected at the same time. Requires libvirt \s-1API\s0 version \fI1.2.9\fR or later." 4 .IX Item "job_stats_completed: report statistics about a recently completed job on a domain. Only one type of job statistics can be collected at the same time. Requires libvirt API version 1.2.9 or later." .IP "\fBmemory\fR: report statistics about memory usage details, provided by libvirt \fBvirDomainMemoryStats()\fR function." 4 .IX Item "memory: report statistics about memory usage details, provided by libvirt virDomainMemoryStats() function." .IP "\fBpcpu\fR: report the physical user/system cpu time consumed by the hypervisor, per-vm. Requires libvirt \s-1API\s0 version \fI0.9.11\fR or later." 4 .IX Item "pcpu: report the physical user/system cpu time consumed by the hypervisor, per-vm. Requires libvirt API version 0.9.11 or later." .IP "\fBperf\fR: report performance monitoring events. To collect performance metrics they must be enabled for domain and supported by the platform. Requires libvirt \s-1API\s0 version \fI1.3.3\fR or later. \fBNote\fR: \fIperf\fR metrics can't be collected if \fIintel_rdt\fR plugin is enabled." 4 .IX Item "perf: report performance monitoring events. To collect performance metrics they must be enabled for domain and supported by the platform. Requires libvirt API version 1.3.3 or later. Note: perf metrics can't be collected if intel_rdt plugin is enabled." .IP "\fBvcpu\fR: report domain virtual CPUs utilisation." 4 .IX Item "vcpu: report domain virtual CPUs utilisation." .IP "\fBvcpupin\fR: report pinning of domain VCPUs to host physical CPUs." 4 .IX Item "vcpupin: report pinning of domain VCPUs to host physical CPUs." .IP "\fBdisk_physical\fR: report 'disk_physical' statistic for disk device. \fBNote\fR: This statistic is only reported for disk devices with 'source' property available." 4 .IX Item "disk_physical: report 'disk_physical' statistic for disk device. Note: This statistic is only reported for disk devices with 'source' property available." .IP "\fBdisk_allocation\fR: report 'disk_allocation' statistic for disk device. \fBNote\fR: This statistic is only reported for disk devices with 'source' property available." 4 .IX Item "disk_allocation: report 'disk_allocation' statistic for disk device. Note: This statistic is only reported for disk devices with 'source' property available." .IP "\fBdisk_capacity\fR: report 'disk_capacity' statistic for disk device. \fBNote\fR: This statistic is only reported for disk devices with 'source' property available." 4 .IX Item "disk_capacity: report 'disk_capacity' statistic for disk device. Note: This statistic is only reported for disk devices with 'source' property available." .RE .RS 4 .RE .IP "\fBPersistentNotification\fR \fBtrue\fR|\fBfalse\fR" 4 .IX Item "PersistentNotification true|false" .PD Override default configuration to only send notifications when there is a change in the lifecycle state of a domain. When set to true notifications will be sent for every read cycle. Default is false. Does not affect the stats being dispatched. .IP "\fBInstances\fR \fBinteger\fR" 4 .IX Item "Instances integer" How many read instances you want to use for this plugin. The default is one, and the sensible setting is a multiple of the \fBReadThreads\fR value. .Sp This option is only useful when domains are specially tagged. If you are not sure, just use the default setting. .Sp The reader instance will only query the domains with attached matching tag. Tags should have the form of 'virt\-X' where X is the reader instance number, starting from 0. .Sp The special-purpose reader instance #0, guaranteed to be always present, will query all the domains with missing or unrecognized tag, so no domain will ever be left out. .Sp Domain tagging is done with a custom attribute in the libvirt domain metadata section. Value is selected by an XPath \fI/domain/metadata/ovirtmap/tag/\f(BItext()\fI\fR expression in the \fIhttp://ovirt.org/ovirtmap/tag/1.0\fR namespace. (XPath and namespace values are not configurable yet). .Sp Tagging could be used by management applications to evenly spread the load among the reader threads, or to pin on the same threads all the libvirt domains which use the same shared storage, to minimize the disruption in presence of storage outages. .ie n .SS "Plugin ""vmem""" .el .SS "Plugin \f(CWvmem\fP" .IX Subsection "Plugin vmem" The \f(CW\*(C`vmem\*(C'\fR plugin collects information about the usage of virtual memory. Since the statistics provided by the Linux kernel are very detailed, they are collected very detailed. However, to get all the details, you have to switch them on manually. Most people just want an overview over, such as the number of pages read from swap space. .IP "\fBVerbose\fR \fBtrue\fR|\fBfalse\fR" 4 .IX Item "Verbose true|false" Enables verbose collection of information. This will start collecting page \&\*(L"actions\*(R", e.\ g. page allocations, (de)activations, steals and so on. Part of these statistics are collected on a \*(L"per zone\*(R" basis. .ie n .SS "Plugin ""vserver""" .el .SS "Plugin \f(CWvserver\fP" .IX Subsection "Plugin vserver" This plugin doesn't have any options. \fBVServer\fR support is only available for Linux. It cannot yet be found in a vanilla kernel, though. To make use of this plugin you need a kernel that has \fBVServer\fR support built in, i.\ e. you need to apply the patches and compile your own kernel, which will then provide the \fI/proc/virtual\fR filesystem that is required by this plugin. .PP The \fBVServer\fR homepage can be found at . .PP \&\fBNote\fR: The traffic collected by this plugin accounts for the amount of traffic passing a socket which might be a lot less than the actual on-wire traffic (e.\ g. due to headers and retransmission). If you want to collect on-wire traffic you could, for example, use the logging facilities of iptables to feed data for the guest IPs into the iptables plugin. .ie n .SS "Plugin ""write_graphite""" .el .SS "Plugin \f(CWwrite_graphite\fP" .IX Subsection "Plugin write_graphite" The \f(CW\*(C`write_graphite\*(C'\fR plugin writes data to \fIGraphite\fR, an open-source metrics storage and graphing project. The plugin connects to \fICarbon\fR, the data layer of \fIGraphite\fR, via \fI\s-1TCP\s0\fR or \fI\s-1UDP\s0\fR and sends data via the \*(L"line based\*(R" protocol (per default using port\ 2003). The data will be sent in blocks of at most 1428 bytes to minimize the number of network packets. .PP Synopsis: .PP .Vb 11 \& \& \& Host "localhost" \& Port "2003" \& Protocol "tcp" \& LogSendErrors true \& Prefix "collectd" \& UseTags false \& ReverseHost false \& \& .Ve .PP The configuration consists of one or more <\fBNode\fR\ \fIName\fR> blocks. Inside the \fBNode\fR blocks, the following options are recognized: .IP "\fBHost\fR \fIAddress\fR" 4 .IX Item "Host Address" Hostname or address to connect to. Defaults to \f(CW\*(C`localhost\*(C'\fR. .IP "\fBPort\fR \fIService\fR" 4 .IX Item "Port Service" Service name or port number to connect to. Defaults to \f(CW2003\fR. .IP "\fBProtocol\fR \fIString\fR" 4 .IX Item "Protocol String" Protocol to use when connecting to \fIGraphite\fR. Defaults to \f(CW\*(C`tcp\*(C'\fR. .IP "\fBReconnectInterval\fR \fISeconds\fR" 4 .IX Item "ReconnectInterval Seconds" When set to non-zero, forces the connection to the Graphite backend to be closed and re-opend periodically. This behavior is desirable in environments where the connection to the Graphite backend is done through load balancers, for example. When set to zero, the default, the connetion is kept open for as long as possible. .IP "\fBLogSendErrors\fR \fBfalse\fR|\fBtrue\fR" 4 .IX Item "LogSendErrors false|true" If set to \fBtrue\fR (the default), logs errors when sending data to \fIGraphite\fR. If set to \fBfalse\fR, it will not log the errors. This is especially useful when using Protocol \s-1UDP\s0 since many times we want to use the \*(L"fire-and-forget\*(R" approach and logging errors fills syslog with unneeded messages. .IP "\fBPrefix\fR \fIString\fR" 4 .IX Item "Prefix String" When \fBUseTags\fR is \fIfalse\fR, \fBPrefix\fR value is added in front of the host name. When \fBUseTags\fR is \fItrue\fR, \fBPrefix\fR value is added in front of series name. .Sp Dots and whitespace are \fInot\fR escaped in this string (see \fBEscapeCharacter\fR below). .IP "\fBPostfix\fR \fIString\fR" 4 .IX Item "Postfix String" When \fBUseTags\fR is \fIfalse\fR, \fBPostfix\fR value appended to the host name. When \fBUseTags\fR is \fItrue\fR, \fBPostgix\fR value appended to the end of series name (before the first ; that separates the name from the tags). .Sp Dots and whitespace are \fInot\fR escaped in this string (see \fBEscapeCharacter\fR below). .IP "\fBEscapeCharacter\fR \fIChar\fR" 4 .IX Item "EscapeCharacter Char" \&\fICarbon\fR uses the dot (\f(CW\*(C`.\*(C'\fR) as escape character and doesn't allow whitespace in the identifier. The \fBEscapeCharacter\fR option determines which character dots, whitespace and control characters are replaced with. Defaults to underscore (\f(CW\*(C`_\*(C'\fR). .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. .IP "\fBSeparateInstances\fR \fBfalse\fR|\fBtrue\fR" 4 .IX Item "SeparateInstances false|true" 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. .Sp Option value is not used when \fBUseTags\fR is \fItrue\fR. .IP "\fBAlwaysAppendDS\fR \fBfalse\fR|\fBtrue\fR" 4 .IX Item "AlwaysAppendDS false|true" 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 "\fBPreserveSeparator\fR \fBfalse\fR|\fBtrue\fR" 4 .IX Item "PreserveSeparator false|true" If set to \fBfalse\fR (the default) the \f(CW\*(C`.\*(C'\fR (dot) character is replaced with \&\fIEscapeCharacter\fR. Otherwise, if set to \fBtrue\fR, the \f(CW\*(C`.\*(C'\fR (dot) character is preserved, i.e. passed through. .Sp Option value is not used when \fBUseTags\fR is \fItrue\fR. .IP "\fBDropDuplicateFields\fR \fBfalse\fR|\fBtrue\fR" 4 .IX Item "DropDuplicateFields false|true" If set to \fBtrue\fR, detect and remove duplicate components in Graphite metric names. For example, the metric name \f(CW\*(C`host.load.load.shortterm\*(C'\fR will be shortened to \f(CW\*(C`host.load.shortterm\*(C'\fR. .IP "\fBUseTags\fR \fBfalse\fR|\fBtrue\fR" 4 .IX Item "UseTags false|true" If set to \fBtrue\fR, Graphite metric names will be generated as tagged series. This allows for much more flexibility than the traditional hierarchical layout. .Sp Example: \&\f(CW\*(C`test.single;host=example.com;plugin=test;plugin_instance=foo;type=single;type_instance=bar\*(C'\fR .Sp You can use \fBPostfix\fR option to add more tags by specifying it like \&\f(CW\*(C`;tag1=value1;tag2=value2\*(C'\fR. Note what tagging support was added since Graphite version 1.1.x. .Sp If set to \fBtrue\fR, the \fBSeparateInstances\fR and \fBPreserveSeparator\fR settings are not used. .Sp Default value: \fBfalse\fR. .IP "\fBReverseHost\fR \fBfalse\fR|\fBtrue\fR" 4 .IX Item "ReverseHost false|true" If set to \fBtrue\fR, the (dot separated) parts of the \fBhost\fR field of the \&\fIvalue list\fR will be rewritten in reverse order. The rewrite happens \fIbefore\fR special characters are replaced with the \fBEscapeCharacter\fR. .Sp This option might be convenient if the metrics are presented with Graphite in a \&\s-1DNS\s0 like tree structure (probably without replacing dots in hostnames). .Sp Example: Hostname \*(L"node3.cluster1.example.com\*(R" LoadPlugin \*(L"cpu\*(R" LoadPlugin \*(L"write_graphite\*(R" EscapeCharacter \*(L".\*(R" ReverseHost true .Sp .Vb 1 \& result on the wire: com.example.cluster1.node3.cpu\-0.cpu\-idle 99.900993 1543010932 .Ve .Sp Default value: \fBfalse\fR. .ie n .SS "Plugin ""write_log""" .el .SS "Plugin \f(CWwrite_log\fP" .IX Subsection "Plugin write_log" The \f(CW\*(C`write_log\*(C'\fR plugin writes metrics as \s-1INFO\s0 log messages. .PP This plugin supports two output formats: \fIGraphite\fR and \fI\s-1JSON\s0\fR. .PP Synopsis: .PP .Vb 3 \& \& Format Graphite \& .Ve .IP "\fBFormat\fR \fIFormat\fR" 4 .IX Item "Format Format" The output format to use. Can be one of \f(CW\*(C`Graphite\*(C'\fR or \f(CW\*(C`JSON\*(C'\fR. .ie n .SS "Plugin ""write_tsdb""" .el .SS "Plugin \f(CWwrite_tsdb\fP" .IX Subsection "Plugin write_tsdb" The \f(CW\*(C`write_tsdb\*(C'\fR plugin writes data to \fIOpenTSDB\fR, a scalable open-source time series database. The plugin connects to a \fI\s-1TSD\s0\fR, a masterless, no shared state daemon that ingests metrics and stores them in HBase. The plugin uses \&\fI\s-1TCP\s0\fR over the \*(L"line based\*(R" protocol with a default port 4242. The data will be sent in blocks of at most 1428 bytes to minimize the number of network packets. .PP Synopsis: .PP .Vb 9 \& \& ResolveInterval 60 \& ResolveJitter 60 \& \& Host "tsd\-1.my.domain" \& Port "4242" \& HostTags "status=production" \& \& .Ve .PP The configuration consists of one or more <\fBNode\fR\ \fIName\fR> blocks and global directives. .PP Global directives are: .IP "\fBResolveInterval\fR \fIseconds\fR" 4 .IX Item "ResolveInterval seconds" .PD 0 .IP "\fBResolveJitter\fR \fIseconds\fR" 4 .IX Item "ResolveJitter seconds" .PD When \fIcollectd\fR connects to a \s-1TSDB\s0 node, it will request the hostname from \&\s-1DNS.\s0 This can become a problem if the \s-1TSDB\s0 node is unavailable or badly configured because collectd will request \s-1DNS\s0 in order to reconnect for every metric, which can flood your \s-1DNS.\s0 So you can cache the last value for \&\fIResolveInterval\fR seconds. Defaults to the \fIInterval\fR of the \fIwrite_tsdb plugin\fR, e.g. 10\ seconds. .Sp You can also define a jitter, a random interval to wait in addition to \&\fIResolveInterval\fR. This prevents all your collectd servers to resolve the hostname at the same time when the connection fails. Defaults to the \fIInterval\fR of the \fIwrite_tsdb plugin\fR, e.g. 10\ seconds. .Sp \&\fBNote:\fR If the \s-1DNS\s0 resolution has already been successful when the socket closes, the plugin will try to reconnect immediately with the cached information. \s-1DNS\s0 is queried only when the socket is closed for a longer than \&\fIResolveInterval\fR + \fIResolveJitter\fR seconds. .PP Inside the \fBNode\fR blocks, the following options are recognized: .IP "\fBHost\fR \fIAddress\fR" 4 .IX Item "Host Address" Hostname or address to connect to. Defaults to \f(CW\*(C`localhost\*(C'\fR. .IP "\fBPort\fR \fIService\fR" 4 .IX Item "Port Service" Service name or port number to connect to. Defaults to \f(CW4242\fR. .IP "\fBHostTags\fR \fIString\fR" 4 .IX Item "HostTags String" When set, \fIHostTags\fR is added to the end of the metric. It is intended to be used for name=value pairs that the \s-1TSD\s0 will tag the metric with. Dots and whitespace are \fInot\fR escaped in this string. .IP "\fBStoreRates\fR \fBfalse\fR|\fBtrue\fR" 4 .IX Item "StoreRates false|true" If set to \fBtrue\fR, convert counter values to rates. If set to \fBfalse\fR (the default) counter values are stored as is, as an increasing integer number. .IP "\fBAlwaysAppendDS\fR \fBfalse\fR|\fBtrue\fR" 4 .IX Item "AlwaysAppendDS false|true" If set the \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 .ie n .SS "Plugin ""write_mongodb""" .el .SS "Plugin \f(CWwrite_mongodb\fP" .IX Subsection "Plugin write_mongodb" The \fIwrite_mongodb plugin\fR will send values to \fIMongoDB\fR, a schema-less NoSQL database. .PP \&\fBSynopsis:\fR .PP .Vb 8 \& \& \& Host "localhost" \& Port "27017" \& Timeout 1000 \& StoreRates true \& \& .Ve .PP The plugin can send values to multiple instances of \fIMongoDB\fR by specifying one \fBNode\fR block for each instance. Within the \fBNode\fR blocks, the following options are available: .IP "\fBHost\fR \fIAddress\fR" 4 .IX Item "Host Address" Hostname or address to connect to. Defaults to \f(CW\*(C`localhost\*(C'\fR. .IP "\fBPort\fR \fIService\fR" 4 .IX Item "Port Service" Service name or port number to connect to. Defaults to \f(CW27017\fR. .IP "\fBTimeout\fR \fIMilliseconds\fR" 4 .IX Item "Timeout Milliseconds" Set the timeout for each operation on \fIMongoDB\fR to \fITimeout\fR milliseconds. Setting this option to zero means no timeout, which is the default. .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. .IP "\fBDatabase\fR \fIDatabase\fR" 4 .IX Item "Database Database" .PD 0 .IP "\fBUser\fR \fIUser\fR" 4 .IX Item "User User" .IP "\fBPassword\fR \fIPassword\fR" 4 .IX Item "Password Password" .PD Sets the information used when authenticating to a \fIMongoDB\fR database. The fields are optional (in which case no authentication is attempted), but if you want to use authentication all three fields must be set. .ie n .SS "Plugin ""write_prometheus""" .el .SS "Plugin \f(CWwrite_prometheus\fP" .IX Subsection "Plugin write_prometheus" The \fIwrite_prometheus plugin\fR implements a tiny webserver that can be scraped using \fIPrometheus\fR. .PP \&\fBOptions:\fR .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. .Sp This option is supported only for libmicrohttpd newer than 0.9.0. .IP "\fBPort\fR \fIPort\fR" 4 .IX Item "Port Port" Port the embedded webserver should listen on. Defaults to \fB9103\fR. .IP "\fBStalenessDelta\fR \fISeconds\fR" 4 .IX Item "StalenessDelta Seconds" Time in seconds after which \fIPrometheus\fR considers a metric \*(L"stale\*(R" if it hasn't seen any update for it. This value must match the setting in Prometheus. It defaults to \fB300\fR seconds (5 minutes), same as Prometheus. .Sp \&\fBBackground:\fR .Sp \&\fIPrometheus\fR has a global setting, \f(CW\*(C`StalenessDelta\*(C'\fR, which controls after which time a metric without updates is considered \*(L"stale\*(R". This setting effectively puts an upper limit on the interval in which metrics are reported. .Sp When the \fIwrite_prometheus plugin\fR encounters a metric with an interval exceeding this limit, it will inform you, the user, and provide the metric to \&\fIPrometheus\fR \fBwithout\fR a timestamp. That causes \fIPrometheus\fR to consider the metric \*(L"fresh\*(R" each time it is scraped, with the time of the scrape being considered the time of the update. The result is that there appear more datapoints in \fIPrometheus\fR than were actually created, but at least the metric doesn't disappear periodically. .ie n .SS "Plugin ""write_http""" .el .SS "Plugin \f(CWwrite_http\fP" .IX Subsection "Plugin write_http" This output plugin submits values to an \s-1HTTP\s0 server using \s-1POST\s0 requests and encoding metrics with \s-1JSON\s0 or using the \f(CW\*(C`PUTVAL\*(C'\fR command described in \&\fBcollectd\-unixsock\fR\|(5). .PP Synopsis: .PP .Vb 8 \& \& \& URL "http://example.com/post\-collectd" \& User "collectd" \& Password "weCh3ik0" \& Format JSON \& \& .Ve .PP The plugin can send values to multiple \s-1HTTP\s0 servers by specifying one <\fBNode\fR\ \fIName\fR> block for each server. Within each \fBNode\fR block, the following options are available: .IP "\fB\s-1URL\s0\fR \fI\s-1URL\s0\fR" 4 .IX Item "URL URL" \&\s-1URL\s0 to which the values are submitted to. Mandatory. .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\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|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 "\fBCAPath\fR \fIDirectory\fR" 4 .IX Item "CAPath Directory" Directory holding one or more \s-1CA\s0 certificate files. You can use this if for some reason all the needed \s-1CA\s0 certificates aren't in the same file and can't be pointed to using the \fBCACert\fR option. Requires \f(CW\*(C`libcurl\*(C'\fR to be built against OpenSSL. .IP "\fBClientKey\fR \fIFile\fR" 4 .IX Item "ClientKey File" File that holds the private key in \s-1PEM\s0 format to be used for certificate-based authentication. .IP "\fBClientCert\fR \fIFile\fR" 4 .IX Item "ClientCert File" File that holds the \s-1SSL\s0 certificate to be used for certificate-based authentication. .IP "\fBClientKeyPass\fR \fIPassword\fR" 4 .IX Item "ClientKeyPass Password" Password required to load the private key in \fBClientKey\fR. .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. Example: .Sp .Vb 1 \& Header "X\-Custom\-Header: custom_value" .Ve .IP "\fBSSLVersion\fR \fBSSLv2\fR|\fBSSLv3\fR|\fBTLSv1\fR|\fBTLSv1_0\fR|\fBTLSv1_1\fR|\fBTLSv1_2\fR" 4 .IX Item "SSLVersion SSLv2|SSLv3|TLSv1|TLSv1_0|TLSv1_1|TLSv1_2" Define which \s-1SSL\s0 protocol version must be used. By default \f(CW\*(C`libcurl\*(C'\fR will attempt to figure out the remote \s-1SSL\s0 protocol version. See \&\fBcurl_easy_setopt\fR\|(3) for more details. .IP "\fBFormat\fR \fBCommand\fR|\fB\s-1JSON\s0\fR|\fB\s-1KAIROSDB\s0\fR" 4 .IX Item "Format Command|JSON|KAIROSDB" Format of the output to generate. If set to \fBCommand\fR, will create output that is understood by the \fIExec\fR and \fIUnixSock\fR plugins. When set to \fB\s-1JSON\s0\fR, will create output in the \fIJavaScript Object Notation\fR (\s-1JSON\s0). When set to \s-1KAIROSDB ,\s0 will create output in the KairosDB format. .Sp Defaults to \fBCommand\fR. .IP "\fBAttribute\fR \fIString\fR \fIString\fR" 4 .IX Item "Attribute String String" Only available for the \s-1KAIROSDB\s0 output format. .Sp Consider the two given strings to be the key and value of an additional tag for each metric being sent out. .Sp You can add multiple \fBAttribute\fR. .IP "\fB\s-1TTL\s0\fR \fIInt\fR" 4 .IX Item "TTL Int" Only available for the \s-1KAIROSDB\s0 output format. .Sp Sets the Cassandra ttl for the data points. .Sp Please refer to .IP "\fBPrefix\fR \fIString\fR" 4 .IX Item "Prefix String" Only available for the \s-1KAIROSDB\s0 output format. .Sp Sets the metrics prefix \fIstring\fR. Defaults to \fIcollectd\fR. .IP "\fBMetrics\fR \fBtrue\fR|\fBfalse\fR" 4 .IX Item "Metrics true|false" Controls whether \fImetrics\fR are POSTed to this location. Defaults to \fBtrue\fR. .IP "\fBNotifications\fR \fBfalse\fR|\fBtrue\fR" 4 .IX Item "Notifications false|true" Controls whether \fInotifications\fR are POSTed to this location. Defaults to \fBfalse\fR. .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. .IP "\fBBufferSize\fR \fIBytes\fR" 4 .IX Item "BufferSize Bytes" Sets the send buffer size to \fIBytes\fR. By increasing this buffer, less \s-1HTTP\s0 requests will be generated, but more metrics will be batched / metrics are cached for longer before being sent, introducing additional delay until they are available on the server side. \fIBytes\fR must be at least 1024 and cannot exceed the size of an \f(CW\*(C`int\*(C'\fR, i.e. 2\ GByte. Defaults to \f(CW4096\fR. .IP "\fBLowSpeedLimit\fR \fIBytes per Second\fR" 4 .IX Item "LowSpeedLimit Bytes per Second" Sets the minimal transfer rate in \fIBytes per Second\fR below which the connection with the \s-1HTTP\s0 server will be considered too slow and aborted. All the data submitted over this connection will probably be lost. Defaults to 0, which means no minimum transfer rate is enforced. .IP "\fBTimeout\fR \fITimeout\fR" 4 .IX Item "Timeout Timeout" Sets the maximum time in milliseconds given for \s-1HTTP POST\s0 operations to complete. When this limit is reached, the \s-1POST\s0 operation will be aborted, and all the data in the current send buffer will probably be lost. Defaults to 0, which means the connection never times out. .IP "\fBLogHttpError\fR \fBfalse\fR|\fBtrue\fR" 4 .IX Item "LogHttpError false|true" Enables printing of \s-1HTTP\s0 error code to log. Turned off by default. .IP "<\fBStatistics\fR \fIName\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. .Sp The \f(CW\*(C`write_http\*(C'\fR plugin regularly submits the collected values to the \s-1HTTP\s0 server. How frequently this happens depends on how much data you are collecting and the size of \fBBufferSize\fR. The optimal value to set \fBTimeout\fR to is slightly below this interval, which you can estimate by monitoring the network traffic between collectd and the \s-1HTTP\s0 server. .ie n .SS "Plugin ""write_influxdb_udp""" .el .SS "Plugin \f(CWwrite_influxdb_udp\fP" .IX Subsection "Plugin write_influxdb_udp" The write_influxdb_udp plugin sends data to a instance of InfluxDB using the \&\*(L"Line Protocol\*(R". Each plugin is sent as a measurement with a time precision of miliseconds while plugin instance, type and type instance are sent as tags. .PP .Vb 4 \& \& Server "influxdb.internal.tld" \& StoreRates "yes" \& .Ve .IP "\fB\fR" 4 .IX Item "" The \fBServer\fR statement sets the server to send datagrams to. .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, \fB8089\fR, is used. .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 .IP "\fBStoreRates\fR \fBtrue|false\fR" 4 .IX Item "StoreRates true|false" If set to \fBtrue\fR, convert absolute, counter and derive values to rates. If set to \fBfalse\fR (the default) absolute, counter and derive values are sent as is. .ie n .SS "Plugin ""write_kafka""" .el .SS "Plugin \f(CWwrite_kafka\fP" .IX Subsection "Plugin write_kafka" The \fIwrite_kafka plugin\fR will send values to a \fIKafka\fR topic, a distributed queue. Synopsis: .PP .Vb 6 \& \& Property "metadata.broker.list" "broker1:9092,broker2:9092" \& \& Format JSON \& \& .Ve .PP The following options are understood by the \fIwrite_kafka plugin\fR: .IP "<\fBTopic\fR \fIName\fR>" 4 .IX Item "" The plugin's configuration consists of one or more \fBTopic\fR blocks. Each block is given a unique \fIName\fR and specifies one kafka producer. Inside the \fBTopic\fR block, the following per-topic options are understood: .RS 4 .IP "\fBProperty\fR \fIString\fR \fIString\fR" 4 .IX Item "Property String String" Configure the named property for the current topic. Properties are forwarded to the kafka producer library \fBlibrdkafka\fR. .IP "\fBKey\fR \fIString\fR" 4 .IX Item "Key String" Use the specified string as a partitioning key for the topic. Kafka breaks topic into partitions and guarantees that for a given topology, the same consumer will be used for a specific key. The special (case insensitive) string \fBRandom\fR can be used to specify that an arbitrary partition should be used. .IP "\fBFormat\fR \fBCommand\fR|\fB\s-1JSON\s0\fR|\fBGraphite\fR" 4 .IX Item "Format Command|JSON|Graphite" 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. .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. .Sp If set to \fBGraphite\fR, values are encoded in the \fIGraphite\fR format, which is \&\f(CW\*(C` \en\*(C'\fR. .IP "\fBStoreRates\fR \fBtrue\fR|\fBfalse\fR" 4 .IX Item "StoreRates true|false" 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 (\fBFormat\fR=\fIGraphite\fR only)" 4 .IX Item "GraphitePrefix (Format=Graphite only)" A prefix can be added in the metric name when outputting in the \fIGraphite\fR format. .Sp When \fBGraphiteUseTags\fR is \fIfalse\fR, prefix is added before the \fIHost\fR name. Metric name will be \&\f(CW\*(C`\*(C'\fR .Sp When \fBGraphiteUseTags\fR is \fItrue\fR, prefix is added in front of series name. .IP "\fBGraphitePostfix\fR (\fBFormat\fR=\fIGraphite\fR only)" 4 .IX Item "GraphitePostfix (Format=Graphite only)" A postfix can be added in the metric name when outputting in the \fIGraphite\fR format. .Sp When \fBGraphiteUseTags\fR is \fIfalse\fR, postfix is added after the \fIHost\fR name. Metric name will be \&\f(CW\*(C`\*(C'\fR .Sp When \fBGraphiteUseTags\fR is \fItrue\fR, prefix value appended to the end of series name (before the first ; that separates the name from the tags). .IP "\fBGraphiteEscapeChar\fR (\fBFormat\fR=\fIGraphite\fR only)" 4 .IX Item "GraphiteEscapeChar (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 \f(CW\*(C`_\*(C'\fR (\fIUnderscore\fR). .IP "\fBGraphiteSeparateInstances\fR \fBfalse\fR|\fBtrue\fR" 4 .IX Item "GraphiteSeparateInstances false|true" 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. .Sp Option value is not used when \fBGraphiteUseTags\fR is \fItrue\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. .Sp Option value is not used when \fBGraphiteUseTags\fR is \fItrue\fR. .IP "\fBGraphiteUseTags\fR \fBfalse\fR|\fBtrue\fR" 4 .IX Item "GraphiteUseTags false|true" If set to \fBtrue\fR Graphite metric names will be generated as tagged series. .Sp Default value: \fBfalse\fR. .IP "\fBStoreRates\fR \fBtrue\fR|\fBfalse\fR" 4 .IX Item "StoreRates true|false" 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. .Sp This will be reflected in the \f(CW\*(C`ds_type\*(C'\fR tag: If \fBStoreRates\fR is enabled, converted values will have \*(L"rate\*(R" appended to the data source type, e.g. \&\f(CW\*(C`ds_type:derive:rate\*(C'\fR. .RE .RS 4 .RE .IP "\fBProperty\fR \fIString\fR \fIString\fR" 4 .IX Item "Property String String" Configure the kafka producer through properties, you almost always will want to set \fBmetadata.broker.list\fR to your Kafka broker list. .ie n .SS "Plugin ""write_redis""" .el .SS "Plugin \f(CWwrite_redis\fP" .IX Subsection "Plugin write_redis" The \fIwrite_redis plugin\fR submits values to \fIRedis\fR, a data structure server. .PP Synopsis: .PP .Vb 12 \& \& \& Host "localhost" \& Port "6379" \& Timeout 1000 \& Prefix "collectd/" \& Database 1 \& MaxSetSize \-1 \& MaxSetDuration \-1 \& StoreRates true \& \& .Ve .PP Values are submitted to \fISorted Sets\fR, using the metric name as the key, and the timestamp as the score. Retrieving a date range can then be done using the \&\f(CW\*(C`ZRANGEBYSCORE\*(C'\fR \fIRedis\fR command. Additionally, all the identifiers of these \&\fISorted Sets\fR are kept in a \fISet\fR called \f(CW\*(C`collectd/values\*(C'\fR (or \&\f(CW\*(C`${prefix}/values\*(C'\fR if the \fBPrefix\fR option was specified) and can be retrieved using the \f(CW\*(C`SMEMBERS\*(C'\fR \fIRedis\fR command. You can specify the database to use with the \fBDatabase\fR parameter (default is \f(CW0\fR). See and for details. .PP The information shown in the synopsis above is the \fIdefault configuration\fR which is used by the plugin if no configuration is present. .PP The plugin can send values to multiple instances of \fIRedis\fR by specifying one \fBNode\fR block for each instance. Within the \fBNode\fR blocks, the following options are available: .IP "\fBNode\fR \fINodename\fR" 4 .IX Item "Node Nodename" The \fBNode\fR block identifies a new \fIRedis\fR node, that is a new \fIRedis\fR instance running on a specified host and port. The node name is a canonical identifier which is used as \fIplugin instance\fR. It is limited to 51\ 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 \fIRedis\fR 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 "\fBTimeout\fR \fIMilliseconds\fR" 4 .IX Item "Timeout Milliseconds" The \fBTimeout\fR option sets the socket connection timeout, in milliseconds. .IP "\fBPrefix\fR \fIPrefix\fR" 4 .IX Item "Prefix Prefix" Prefix used when constructing the name of the \fISorted Sets\fR and the \fISet\fR containing all metrics. Defaults to \f(CW\*(C`collectd/\*(C'\fR, so metrics will have names like \f(CW\*(C`collectd/cpu\-0/cpu\-user\*(C'\fR. When setting this to something different, it is recommended but not required to include a trailing slash in \fIPrefix\fR. .IP "\fBDatabase\fR \fIIndex\fR" 4 .IX Item "Database Index" This index selects the redis database to use for writing operations. Defaults to \f(CW0\fR. .IP "\fBMaxSetSize\fR \fIItems\fR" 4 .IX Item "MaxSetSize Items" The \fBMaxSetSize\fR option limits the number of items that the \fISorted Sets\fR can hold. Negative values for \fIItems\fR sets no limit, which is the default behavior. .IP "\fBMaxSetDuration\fR \fISeconds\fR" 4 .IX Item "MaxSetDuration Seconds" The \fBMaxSetDuration\fR option limits the duration of items that the \&\fISorted Sets\fR can hold. Negative values for \fIItems\fR sets no duration, which is the default behavior. .IP "\fBStoreRates\fR \fBtrue\fR|\fBfalse\fR" 4 .IX Item "StoreRates true|false" 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. .ie n .SS "Plugin ""write_riemann""" .el .SS "Plugin \f(CWwrite_riemann\fP" .IX Subsection "Plugin write_riemann" The \fIwrite_riemann plugin\fR will send values to \fIRiemann\fR, a powerful stream aggregation and monitoring system. The plugin sends \fIProtobuf\fR encoded data to \&\fIRiemann\fR using \s-1UDP\s0 packets. .PP Synopsis: .PP .Vb 12 \& \& \& Host "localhost" \& Port "5555" \& Protocol UDP \& StoreRates true \& AlwaysAppendDS false \& TTLFactor 2.0 \& \& Tag "foobar" \& Attribute "foo" "bar" \& .Ve .PP The following options are understood by the \fIwrite_riemann plugin\fR: .IP "<\fBNode\fR \fIName\fR>" 4 .IX Item "" The plugin's configuration consists of one or more \fBNode\fR blocks. Each block is given a unique \fIName\fR and specifies one connection to an instance of \&\fIRiemann\fR. Indise the \fBNode\fR block, the following per-connection options are understood: .RS 4 .IP "\fBHost\fR \fIAddress\fR" 4 .IX Item "Host Address" Hostname or address to connect to. Defaults to \f(CW\*(C`localhost\*(C'\fR. .IP "\fBPort\fR \fIService\fR" 4 .IX Item "Port Service" Service name or port number to connect to. Defaults to \f(CW5555\fR. .IP "\fBProtocol\fR \fB\s-1UDP\s0\fR|\fB\s-1TCP\s0\fR|\fB\s-1TLS\s0\fR" 4 .IX Item "Protocol UDP|TCP|TLS" Specify the protocol to use when communicating with \fIRiemann\fR. Defaults to \&\fB\s-1TCP\s0\fR. .IP "\fBTLSCertFile\fR \fIPath\fR" 4 .IX Item "TLSCertFile Path" When using the \fB\s-1TLS\s0\fR protocol, path to a \s-1PEM\s0 certificate to present to remote host. .IP "\fBTLSCAFile\fR \fIPath\fR" 4 .IX Item "TLSCAFile Path" When using the \fB\s-1TLS\s0\fR protocol, path to a \s-1PEM CA\s0 certificate to use to validate the remote hosts's identity. .IP "\fBTLSKeyFile\fR \fIPath\fR" 4 .IX Item "TLSKeyFile Path" When using the \fB\s-1TLS\s0\fR protocol, path to a \s-1PEM\s0 private key associated with the certificate defined by \fBTLSCertFile\fR. .IP "\fBBatch\fR \fBtrue\fR|\fBfalse\fR" 4 .IX Item "Batch true|false" If set to \fBtrue\fR and \fBProtocol\fR is set to \fB\s-1TCP\s0\fR, events will be batched in memory and flushed at regular intervals or when \fBBatchMaxSize\fR is exceeded. .Sp Notifications are not batched and sent as soon as possible. .Sp When enabled, it can occur that events get processed by the Riemann server close to or after their expiration time. Tune the \fBTTLFactor\fR and \&\fBBatchMaxSize\fR settings according to the amount of values collected, if this is an issue. .Sp Defaults to true .IP "\fBBatchMaxSize\fR \fIsize\fR" 4 .IX Item "BatchMaxSize size" Maximum payload size for a riemann packet. Defaults to 8192 .IP "\fBBatchFlushTimeout\fR \fIseconds\fR" 4 .IX Item "BatchFlushTimeout seconds" Maximum amount of seconds to wait in between to batch flushes. No timeout by default. .IP "\fBStoreRates\fR \fBtrue\fR|\fBfalse\fR" 4 .IX Item "StoreRates true|false" 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. .Sp This will be reflected in the \f(CW\*(C`ds_type\*(C'\fR tag: If \fBStoreRates\fR is enabled, converted values will have \*(L"rate\*(R" appended to the data source type, e.g. \&\f(CW\*(C`ds_type:derive:rate\*(C'\fR. .IP "\fBAlwaysAppendDS\fR \fBfalse\fR|\fBtrue\fR" 4 .IX Item "AlwaysAppendDS false|true" If set to \fBtrue\fR, append the name of the \fIData Source\fR (\s-1DS\s0) to the \&\*(L"service\*(R", i.e. the field that, together with the \*(L"host\*(R" field, uniquely identifies a metric in \fIRiemann\fR. If set to \fBfalse\fR (the default), this is only done when there is more than one \s-1DS.\s0 .IP "\fBTTLFactor\fR \fIFactor\fR" 4 .IX Item "TTLFactor Factor" \&\fIRiemann\fR events have a \fITime to Live\fR (\s-1TTL\s0) which specifies how long each event is considered active. \fIcollectd\fR populates this field based on the metrics interval setting. This setting controls the factor with which the interval is multiplied to set the \s-1TTL.\s0 The default value is \fB2.0\fR. Unless you know exactly what you're doing, you should only increase this setting from its default value. .IP "\fBNotifications\fR \fBfalse\fR|\fBtrue\fR" 4 .IX Item "Notifications false|true" If set to \fBtrue\fR, create riemann events for notifications. This is \fBtrue\fR by default. When processing thresholds from write_riemann, it might prove useful to avoid getting notification events. .IP "\fBCheckThresholds\fR \fBfalse\fR|\fBtrue\fR" 4 .IX Item "CheckThresholds false|true" If set to \fBtrue\fR, attach state to events based on thresholds defined in the \fBThreshold\fR plugin. Defaults to \fBfalse\fR. .IP "\fBEventServicePrefix\fR \fIString\fR" 4 .IX Item "EventServicePrefix String" Add the given string as a prefix to the event service name. If \fBEventServicePrefix\fR not set or set to an empty string (""), no prefix will be used. .RE .RS 4 .RE .IP "\fBTag\fR \fIString\fR" 4 .IX Item "Tag String" Add the given string as an additional tag to the metric being sent to \&\fIRiemann\fR. .IP "\fBAttribute\fR \fIString\fR \fIString\fR" 4 .IX Item "Attribute String String" Consider the two given strings to be the key and value of an additional attribute for each metric being sent out to \fIRiemann\fR. .ie n .SS "Plugin ""write_sensu""" .el .SS "Plugin \f(CWwrite_sensu\fP" .IX Subsection "Plugin write_sensu" The \fIwrite_sensu plugin\fR will send values to \fISensu\fR, a powerful stream aggregation and monitoring system. The plugin sends \fI\s-1JSON\s0\fR encoded data to a local \fISensu\fR client using a \s-1TCP\s0 socket. .PP At the moment, the \fIwrite_sensu plugin\fR does not send over a collectd_host parameter so it is not possible to use one collectd instance as a gateway for others. Each collectd host must pair with one \fISensu\fR client. .PP Synopsis: .PP .Vb 10 \& \& \& Host "localhost" \& Port "3030" \& StoreRates true \& AlwaysAppendDS false \& MetricHandler "influx" \& MetricHandler "default" \& NotificationHandler "flapjack" \& NotificationHandler "howling_monkey" \& Notifications true \& \& Tag "foobar" \& Attribute "foo" "bar" \& .Ve .PP The following options are understood by the \fIwrite_sensu plugin\fR: .IP "<\fBNode\fR \fIName\fR>" 4 .IX Item "" The plugin's configuration consists of one or more \fBNode\fR blocks. Each block is given a unique \fIName\fR and specifies one connection to an instance of \&\fISensu\fR. Inside the \fBNode\fR block, the following per-connection options are understood: .RS 4 .IP "\fBHost\fR \fIAddress\fR" 4 .IX Item "Host Address" Hostname or address to connect to. Defaults to \f(CW\*(C`localhost\*(C'\fR. .IP "\fBPort\fR \fIService\fR" 4 .IX Item "Port Service" Service name or port number to connect to. Defaults to \f(CW3030\fR. .IP "\fBStoreRates\fR \fBtrue\fR|\fBfalse\fR" 4 .IX Item "StoreRates true|false" 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. .Sp This will be reflected in the \f(CW\*(C`collectd_data_source_type\*(C'\fR tag: If \&\fBStoreRates\fR is enabled, converted values will have \*(L"rate\*(R" appended to the data source type, e.g. \f(CW\*(C`collectd_data_source_type:derive:rate\*(C'\fR. .IP "\fBAlwaysAppendDS\fR \fBfalse\fR|\fBtrue\fR" 4 .IX Item "AlwaysAppendDS false|true" If set the \fBtrue\fR, append the name of the \fIData Source\fR (\s-1DS\s0) to the \&\*(L"service\*(R", i.e. the field that, together with the \*(L"host\*(R" field, uniquely identifies a metric in \fISensu\fR. If set to \fBfalse\fR (the default), this is only done when there is more than one \s-1DS.\s0 .IP "\fBNotifications\fR \fBfalse\fR|\fBtrue\fR" 4 .IX Item "Notifications false|true" If set to \fBtrue\fR, create \fISensu\fR events for notifications. This is \fBfalse\fR by default. At least one of \fBNotifications\fR or \fBMetrics\fR should be enabled. .IP "\fBMetrics\fR \fBfalse\fR|\fBtrue\fR" 4 .IX Item "Metrics false|true" If set to \fBtrue\fR, create \fISensu\fR events for metrics. This is \fBfalse\fR by default. At least one of \fBNotifications\fR or \fBMetrics\fR should be enabled. .IP "\fBSeparator\fR \fIString\fR" 4 .IX Item "Separator String" Sets the separator for \fISensu\fR metrics name or checks. Defaults to \*(L"/\*(R". .IP "\fBMetricHandler\fR \fIString\fR" 4 .IX Item "MetricHandler String" Add a handler that will be set when metrics are sent to \fISensu\fR. You can add several of them, one per line. Defaults to no handler. .IP "\fBNotificationHandler\fR \fIString\fR" 4 .IX Item "NotificationHandler String" Add a handler that will be set when notifications are sent to \fISensu\fR. You can add several of them, one per line. Defaults to no handler. .IP "\fBEventServicePrefix\fR \fIString\fR" 4 .IX Item "EventServicePrefix String" Add the given string as a prefix to the event service name. If \fBEventServicePrefix\fR not set or set to an empty string (""), no prefix will be used. .RE .RS 4 .RE .IP "\fBTag\fR \fIString\fR" 4 .IX Item "Tag String" Add the given string as an additional tag to the metric being sent to \&\fISensu\fR. .IP "\fBAttribute\fR \fIString\fR \fIString\fR" 4 .IX Item "Attribute String String" Consider the two given strings to be the key and value of an additional attribute for each metric being sent out to \fISensu\fR. .ie n .SS "Plugin ""write_stackdriver""" .el .SS "Plugin \f(CWwrite_stackdriver\fP" .IX Subsection "Plugin write_stackdriver" The \f(CW\*(C`write_stackdriver\*(C'\fR plugin writes metrics to the \&\fIGoogle Stackdriver Monitoring\fR service. .PP This plugin supports two authentication methods: When configured, credentials are read from the \s-1JSON\s0 credentials file specified with \fBCredentialFile\fR. Alternatively, when running on \&\fIGoogle Compute Engine\fR (\s-1GCE\s0), an \fIOAuth\fR token is retrieved from the \&\fImetadata server\fR and used to authenticate to \s-1GCM.\s0 .PP \&\fBSynopsis:\fR .PP .Vb 6 \& \& CredentialFile "/path/to/service_account.json" \& \& Label "project_id" "monitored_project" \& \& .Ve .IP "\fBCredentialFile\fR \fIfile\fR" 4 .IX Item "CredentialFile file" Path to a \s-1JSON\s0 credentials file holding the credentials for a \s-1GCP\s0 service account. .Sp If \fBCredentialFile\fR is not specified, the plugin uses \fIApplication Default Credentials\fR. That means which credentials are used depends on the environment: .RS 4 .IP "\(bu" 4 The environment variable \f(CW\*(C`GOOGLE_APPLICATION_CREDENTIALS\*(C'\fR is checked. If this variable is specified it should point to a \s-1JSON\s0 file that defines the credentials. .IP "\(bu" 4 The path \f(CW\*(C`${HOME}/.config/gcloud/application_default_credentials.json\*(C'\fR is checked. This where credentials used by the \fIgcloud\fR command line utility are stored. You can use \f(CW\*(C`gcloud auth application\-default login\*(C'\fR to create these credentials. .Sp Please note that these credentials are often of your personal account, not a service account, and are therefore unfit to be used in a production environment. .IP "\(bu" 4 When running on \s-1GCE,\s0 the built-in service account associated with the virtual machine instance is used. See also the \fBEmail\fR option below. .RE .RS 4 .RE .IP "\fBProject\fR \fIProject\fR" 4 .IX Item "Project Project" The \fIProject \s-1ID\s0\fR or the \fIProject Number\fR of the \fIStackdriver Account\fR. The \&\fIProject \s-1ID\s0\fR is a string identifying the \s-1GCP\s0 project, which you can chose freely when creating a new project. The \fIProject Number\fR is a 12\-digit decimal number. You can look up both on the \fIDeveloper Console\fR. .Sp This setting is optional. If not set, the project \s-1ID\s0 is read from the credentials file or determined from the \s-1GCE\s0's metadata service. .IP "\fBEmail\fR \fIEmail\fR (\s-1GCE\s0 only)" 4 .IX Item "Email Email (GCE only)" Choses the \s-1GCE\s0 \fIService Account\fR used for authentication. .Sp Each \s-1GCE\s0 instance has a \f(CW\*(C`default\*(C'\fR \fIService Account\fR but may also be associated with additional \fIService Accounts\fR. This is often used to restrict the permissions of services running on the \s-1GCE\s0 instance to the required minimum. The \fIwrite_stackdriver plugin\fR requires the \&\f(CW\*(C`https://www.googleapis.com/auth/monitoring\*(C'\fR scope. When multiple \fIService Accounts\fR are available, this option selects which one is used by \&\fIwrite_stackdriver plugin\fR. .IP "\fBResource\fR \fIResourceType\fR" 4 .IX Item "Resource ResourceType" Configures the \fIMonitored Resource\fR to use when storing metrics. More information on \fIMonitored Resources\fR and \fIMonitored Resource Types\fR are available at . .Sp This block takes one string argument, the \fIResourceType\fR. Inside the block are one or more \fBLabel\fR options which configure the resource labels. .Sp This block is optional. The default value depends on the runtime environment: on \s-1GCE,\s0 the \f(CW\*(C`gce_instance\*(C'\fR resource type is used, otherwise the \f(CW\*(C`global\*(C'\fR resource type ist used: .RS 4 .IP "\(bu" 4 \&\fBOn \s-1GCE\s0\fR, defaults to the equivalent of this config: .Sp .Vb 5 \& \& Label "project_id" "" \& Label "instance_id" "" \& Label "zone" "" \& .Ve .Sp The values for \fIproject_id\fR, \fIinstance_id\fR and \fIzone\fR are read from the \s-1GCE\s0 metadata service. .IP "\(bu" 4 \&\fBElsewhere\fR, i.e. not on \s-1GCE,\s0 defaults to the equivalent of this config: .Sp .Vb 3 \& \& Label "project_id" "" \& .Ve .Sp Where \fIProject\fR refers to the value of the \fBProject\fR option or the project \s-1ID\s0 inferred from the \fBCredentialFile\fR. .RE .RS 4 .RE .IP "\fBUrl\fR \fIUrl\fR" 4 .IX Item "Url Url" \&\s-1URL\s0 of the \fIStackdriver Monitoring\fR \s-1API.\s0 Defaults to \&\f(CW\*(C`https://monitoring.googleapis.com/v3\*(C'\fR. .ie n .SS "Plugin ""write_syslog""" .el .SS "Plugin \f(CWwrite_syslog\fP" .IX Subsection "Plugin write_syslog" The \f(CW\*(C`write_syslog\*(C'\fR plugin writes data in \fIsyslog\fR format log messages. It implements the basic syslog protocol, \s-1RFC 5424,\s0 extends it with content-based filtering, rich filtering capabilities, flexible configuration options and adds features such as using \s-1TCP\s0 for transport. The plugin can connect to a \fISyslog\fR daemon, like syslog-ng and rsyslog, that will ingest metrics, transform and ship them to the specified output. The plugin uses \fI\s-1TCP\s0\fR over the \*(L"line based\*(R" protocol with a default port 44514. The data will be sent in blocks of at most 1428 bytes to minimize the number of network packets. .PP Synopsis: .PP .Vb 11 \& \& ResolveInterval 60 \& ResolveJitter 60 \& \& Host "syslog\-1.my.domain" \& Port "44514" \& Prefix "collectd" \& MessageFormat "human" \& HostTags "" \& \& .Ve .PP The configuration consists of one or more <\fBNode\fR\ \fIName\fR> blocks and global directives. .PP Global directives are: .IP "\fBResolveInterval\fR \fIseconds\fR" 4 .IX Item "ResolveInterval seconds" .PD 0 .IP "\fBResolveJitter\fR \fIseconds\fR" 4 .IX Item "ResolveJitter seconds" .PD When \fIcollectd\fR connects to a syslog node, it will request the hostname from \&\s-1DNS.\s0 This can become a problem if the syslog node is unavailable or badly configured because collectd will request \s-1DNS\s0 in order to reconnect for every metric, which can flood your \s-1DNS.\s0 So you can cache the last value for \&\fIResolveInterval\fR seconds. Defaults to the \fIInterval\fR of the \fIwrite_syslog plugin\fR, e.g. 10\ seconds. .Sp You can also define a jitter, a random interval to wait in addition to \&\fIResolveInterval\fR. This prevents all your collectd servers to resolve the hostname at the same time when the connection fails. Defaults to the \fIInterval\fR of the \fIwrite_syslog plugin\fR, e.g. 10\ seconds. .Sp \&\fBNote:\fR If the \s-1DNS\s0 resolution has already been successful when the socket closes, the plugin will try to reconnect immediately with the cached information. \s-1DNS\s0 is queried only when the socket is closed for a longer than \&\fIResolveInterval\fR + \fIResolveJitter\fR seconds. .PP Inside the \fBNode\fR blocks, the following options are recognized: .IP "\fBHost\fR \fIAddress\fR" 4 .IX Item "Host Address" Hostname or address to connect to. Defaults to \f(CW\*(C`localhost\*(C'\fR. .IP "\fBPort\fR \fIService\fR" 4 .IX Item "Port Service" Service name or port number to connect to. Defaults to \f(CW44514\fR. .IP "\fBHostTags\fR \fIString\fR" 4 .IX Item "HostTags String" When set, \fIHostTags\fR is added to the end of the metric. It is intended to be used for adding additional metadata to tag the metric with. Dots and whitespace are \fInot\fR escaped in this string. .Sp Examples: .Sp When MessageFormat is set to \*(L"human\*(R". .Sp .Vb 1 \& ["prefix1" "example1"="example1_v"]["prefix2" "example2"="example2_v"]" .Ve .Sp When MessageFormat is set to \*(L"\s-1JSON\*(R",\s0 text should be in \s-1JSON\s0 format. Escaping the quotation marks is required. .Sp .Vb 1 \& HostTags "\e"prefix1\e": {\e"example1\e":\e"example1_v\e",\e"example2\e":\e"example2_v\e"}" .Ve .IP "\fBMessageFormat\fR \fIString\fR" 4 .IX Item "MessageFormat String" \&\fIMessageFormat\fR selects the format in which messages are sent to the syslog deamon, human or \s-1JSON.\s0 Defaults to human. .Sp Syslog message format: .Sp \s-1VERSION ISOTIMESTAMP HOSTNAME APPLICATION PID MESSAGEID\s0 STRUCTURED-DATA \s-1MSG\s0 .Sp The difference between the message formats are in the STRUCTURED-DATA and \s-1MSG\s0 parts. .Sp Human format: .Sp .Vb 4 \& <166>1 ISOTIMESTAMP HOSTNAME collectd PID MESSAGEID \& ["collectd" "value": "v1" "plugin"="plugin_v" "plugin_instance"="plugin_instance_v" \& "type_instance"="type_instance_v" "type"="type_v" "ds_name"="ds_name_v" "interval"="interval_v" ] \& "host_tag_example"="host_tag_example_v" plugin_v.type_v.ds_name_v="v1" .Ve .Sp \&\s-1JSON\s0 format: .Sp .Vb 8 \& <166>1 ISOTIMESTAMP HOSTNAME collectd PID MESSAGEID STRUCTURED\-DATA \& { \& "collectd": { \& "time": time_as_epoch, "interval": interval_v, "plugin": "plugin_v", \& "plugin_instance": "plugin_instance_v", "type":"type_v", \& "type_instance": "type_instance_v", "plugin_v": {"type_v": v1} \& } , "host":"host_v", "host_tag_example": "host_tag_example_v" \& } .Ve .IP "\fBStoreRates\fR \fBfalse\fR|\fBtrue\fR" 4 .IX Item "StoreRates false|true" If set to \fBtrue\fR, convert counter values to rates. If set to \fBfalse\fR (the default) counter values are stored as is, as an increasing integer number. .IP "\fBAlwaysAppendDS\fR \fBfalse\fR|\fBtrue\fR" 4 .IX Item "AlwaysAppendDS false|true" 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 "\fBPrefix\fR \fIString\fR" 4 .IX Item "Prefix String" When set, \fIPrefix\fR is added to all metrics names as a prefix. It is intended in case you want to be able to define the source of the specific metric. Dots and whitespace are \fInot\fR escaped in this string. .ie n .SS "Plugin ""xencpu""" .el .SS "Plugin \f(CWxencpu\fP" .IX Subsection "Plugin xencpu" This plugin collects metrics of hardware \s-1CPU\s0 load for machine running Xen hypervisor. Load is calculated from 'idle time' value, provided by Xen. Result is reported using the \f(CW\*(C`percent\*(C'\fR type, for each \s-1CPU\s0 (core). .PP This plugin doesn't have any options (yet). .ie n .SS "Plugin ""zookeeper""" .el .SS "Plugin \f(CWzookeeper\fP" .IX Subsection "Plugin zookeeper" The \fIzookeeper plugin\fR will collect statistics from a \fIZookeeper\fR server using the mntr command. It requires Zookeeper 3.4.0+ and access to the client port. .PP \&\fBSynopsis:\fR .PP .Vb 4 \& \& Host "127.0.0.1" \& Port "2181" \& .Ve .IP "\fBHost\fR \fIAddress\fR" 4 .IX Item "Host Address" Hostname or address to connect to. Defaults to \f(CW\*(C`localhost\*(C'\fR. .IP "\fBPort\fR \fIService\fR" 4 .IX Item "Port Service" Service name or port number to connect to. Defaults to \f(CW2181\fR. .SH "THRESHOLD CONFIGURATION" .IX Header "THRESHOLD CONFIGURATION" Starting with version \f(CW4.3.0\fR collectd has support for \fBmonitoring\fR. By that we mean that the values are not only stored or sent somewhere, but that they are judged and, if a problem is recognized, acted upon. The only action collectd takes itself is to generate and dispatch a \*(L"notification\*(R". Plugins can register to receive notifications and perform appropriate further actions. .PP Since systems and what you expect them to do differ a lot, you can configure \&\fBthresholds\fR for your values freely. This gives you a lot of flexibility but also a lot of responsibility. .PP Every time a value is out of range a notification is dispatched. This means that the idle percentage of your \s-1CPU\s0 needs to be less then the configured threshold only once for a notification to be generated. There's no such thing as a moving average or similar \- at least not now. .PP Also, all values that match a threshold are considered to be relevant or \&\*(L"interesting\*(R". As a consequence collectd will issue a notification if they are not received for \fBTimeout\fR iterations. The \fBTimeout\fR configuration option is explained in section \*(L"\s-1GLOBAL OPTIONS\*(R"\s0. If, for example, \fBTimeout\fR is set to \&\*(L"2\*(R" (the default) and some hosts sends it's \s-1CPU\s0 statistics to the server every 60 seconds, a notification will be dispatched after about 120 seconds. It may take a little longer because the timeout is checked only once each \fBInterval\fR on the server. .PP When a value comes within range again or is received after it was missing, an \&\*(L"OKAY-notification\*(R" is dispatched. .PP Here is a configuration example to get you started. Read below for more information. .PP .Vb 9 \& \& \& WarningMin 0.00 \& WarningMax 1000.00 \& FailureMin 0.00 \& FailureMax 1200.00 \& Invert false \& Instance "bar" \& \& \& \& Instance "eth0" \& \& FailureMax 10000000 \& DataSource "rx" \& \& \& \& \& \& Instance "idle" \& FailureMin 10 \& \& \& \& \& Instance "cached" \& WarningMin 100000000 \& \& \& \& .Ve .PP There are basically two types of configuration statements: The \f(CW\*(C`Host\*(C'\fR, \&\f(CW\*(C`Plugin\*(C'\fR, and \f(CW\*(C`Type\*(C'\fR blocks select the value for which a threshold should be configured. The \f(CW\*(C`Plugin\*(C'\fR and \f(CW\*(C`Type\*(C'\fR blocks may be specified further using the \&\f(CW\*(C`Instance\*(C'\fR option. You can combine the block by nesting the blocks, though they must be nested in the above order, i.\ e. \f(CW\*(C`Host\*(C'\fR may contain either \&\f(CW\*(C`Plugin\*(C'\fR and \f(CW\*(C`Type\*(C'\fR blocks, \f(CW\*(C`Plugin\*(C'\fR may only contain \f(CW\*(C`Type\*(C'\fR blocks and \&\f(CW\*(C`Type\*(C'\fR may not contain other blocks. If multiple blocks apply to the same value the most specific block is used. .PP The other statements specify the threshold to configure. They \fBmust\fR be included in a \f(CW\*(C`Type\*(C'\fR block. Currently the following statements are recognized: .IP "\fBFailureMax\fR \fIValue\fR" 4 .IX Item "FailureMax Value" .PD 0 .IP "\fBWarningMax\fR \fIValue\fR" 4 .IX Item "WarningMax Value" .PD Sets the upper bound of acceptable values. If unset defaults to positive infinity. If a value is greater than \fBFailureMax\fR a \fB\s-1FAILURE\s0\fR notification will be created. If the value is greater than \fBWarningMax\fR but less than (or equal to) \fBFailureMax\fR a \fB\s-1WARNING\s0\fR notification will be created. .IP "\fBFailureMin\fR \fIValue\fR" 4 .IX Item "FailureMin Value" .PD 0 .IP "\fBWarningMin\fR \fIValue\fR" 4 .IX Item "WarningMin Value" .PD Sets the lower bound of acceptable values. If unset defaults to negative infinity. If a value is less than \fBFailureMin\fR a \fB\s-1FAILURE\s0\fR notification will be created. If the value is less than \fBWarningMin\fR but greater than (or equal to) \fBFailureMin\fR a \fB\s-1WARNING\s0\fR notification will be created. .IP "\fBDataSource\fR \fIDSName\fR" 4 .IX Item "DataSource DSName" Some data sets have more than one \*(L"data source\*(R". Interesting examples are the \&\f(CW\*(C`if_octets\*(C'\fR data set, which has received (\f(CW\*(C`rx\*(C'\fR) and sent (\f(CW\*(C`tx\*(C'\fR) bytes and the \f(CW\*(C`disk_ops\*(C'\fR data set, which holds \f(CW\*(C`read\*(C'\fR and \f(CW\*(C`write\*(C'\fR operations. The system load data set, \f(CW\*(C`load\*(C'\fR, even has three data sources: \f(CW\*(C`shortterm\*(C'\fR, \&\f(CW\*(C`midterm\*(C'\fR, and \f(CW\*(C`longterm\*(C'\fR. .Sp Normally, all data sources are checked against a configured threshold. If this is undesirable, or if you want to specify different limits for each data source, you can use the \fBDataSource\fR option to have a threshold apply only to one data source. .IP "\fBInvert\fR \fBtrue\fR|\fBfalse\fR" 4 .IX Item "Invert true|false" If set to \fBtrue\fR the range of acceptable values is inverted, i.\ e. values between \fBFailureMin\fR and \fBFailureMax\fR (\fBWarningMin\fR and \&\fBWarningMax\fR) are not okay. Defaults to \fBfalse\fR. .IP "\fBPersist\fR \fBtrue\fR|\fBfalse\fR" 4 .IX Item "Persist true|false" Sets how often notifications are generated. If set to \fBtrue\fR one notification will be generated for each value that is out of the acceptable range. If set to \&\fBfalse\fR (the default) then a notification is only generated if a value is out of range but the previous value was okay. .Sp This applies to missing values, too: If set to \fBtrue\fR a notification about a missing value is generated once every \fBInterval\fR seconds. If set to \fBfalse\fR only one such notification is generated until the value appears again. .IP "\fBPercentage\fR \fBtrue\fR|\fBfalse\fR" 4 .IX Item "Percentage true|false" If set to \fBtrue\fR, the minimum and maximum values given are interpreted as percentage value, relative to the other data sources. This is helpful for example for the \*(L"df\*(R" type, where you may want to issue a warning when less than 5\ % of the total space is available. Defaults to \fBfalse\fR. .IP "\fBHits\fR \fINumber\fR" 4 .IX Item "Hits Number" Delay creating the notification until the threshold has been passed \fINumber\fR times. When a notification has been generated, or when a subsequent value is inside the threshold, the counter is reset. If, for example, a value is collected once every 10\ seconds and \fBHits\fR is set to 3, a notification will be dispatched at most once every 30\ seconds. .Sp This is useful when short bursts are not a problem. If, for example, 100% \s-1CPU\s0 usage for up to a minute is normal (and data is collected every 10\ seconds), you could set \fBHits\fR to \fB6\fR to account for this. .IP "\fBHysteresis\fR \fINumber\fR" 4 .IX Item "Hysteresis Number" When set to non-zero, a hysteresis value is applied when checking minimum and maximum bounds. This is useful for values that increase slowly and fluctuate a bit while doing so. When these values come close to the threshold, they may \&\*(L"flap\*(R", i.e. switch between failure / warning case and okay case repeatedly. .Sp If, for example, the threshold is configures as .Sp .Vb 2 \& WarningMax 100.0 \& Hysteresis 1.0 .Ve .Sp then a \fIWarning\fR notification is created when the value exceeds \fI101\fR and the corresponding \fIOkay\fR notification is only created once the value falls below \&\fI99\fR, thus avoiding the \*(L"flapping\*(R". .SH "FILTER CONFIGURATION" .IX Header "FILTER CONFIGURATION" Starting with collectd 4.6 there is a powerful filtering infrastructure implemented in the daemon. The concept has mostly been copied from \&\fIip_tables\fR, the packet filter infrastructure for Linux. We'll use a similar terminology, so that users that are familiar with iptables feel right at home. .SS "Terminology" .IX Subsection "Terminology" The following are the terms used in the remainder of the filter configuration documentation. For an ASCII-art schema of the mechanism, see \&\*(L"General structure\*(R" below. .IP "\fBMatch\fR" 4 .IX Item "Match" A \fImatch\fR is a criteria to select specific values. Examples are, of course, the name of the value or it's current value. .Sp Matches are implemented in plugins which you have to load prior to using the match. The name of such plugins starts with the \*(L"match_\*(R" prefix. .IP "\fBTarget\fR" 4 .IX Item "Target" A \fItarget\fR is some action that is to be performed with data. Such actions could, for example, be to change part of the value's identifier or to ignore the value completely. .Sp Some of these targets are built into the daemon, see \*(L"Built-in targets\*(R" below. Other targets are implemented in plugins which you have to load prior to using the target. The name of such plugins starts with the \*(L"target_\*(R" prefix. .IP "\fBRule\fR" 4 .IX Item "Rule" The combination of any number of matches and at least one target is called a \&\fIrule\fR. The target actions will be performed for all values for which \fBall\fR matches apply. If the rule does not have any matches associated with it, the target action will be performed for all values. .IP "\fBChain\fR" 4 .IX Item "Chain" A \fIchain\fR is a list of rules and possibly default targets. The rules are tried in order and if one matches, the associated target will be called. If a value is handled by a rule, it depends on the target whether or not any subsequent rules are considered or if traversal of the chain is aborted, see \&\*(L"Flow control\*(R" below. After all rules have been checked, the default targets will be executed. .SS "General structure" .IX Subsection "General structure" The following shows the resulting structure: .PP .Vb 10 \& +\-\-\-\-\-\-\-\-\-+ \& ! Chain ! \& +\-\-\-\-\-\-\-\-\-+ \& ! \& V \& +\-\-\-\-\-\-\-\-\-+ +\-\-\-\-\-\-\-\-\-+ +\-\-\-\-\-\-\-\-\-+ +\-\-\-\-\-\-\-\-\-+ \& ! Rule !\->! Match !\->! Match !\->! Target ! \& +\-\-\-\-\-\-\-\-\-+ +\-\-\-\-\-\-\-\-\-+ +\-\-\-\-\-\-\-\-\-+ +\-\-\-\-\-\-\-\-\-+ \& ! \& V \& +\-\-\-\-\-\-\-\-\-+ +\-\-\-\-\-\-\-\-\-+ +\-\-\-\-\-\-\-\-\-+ \& ! Rule !\->! Target !\->! Target ! \& +\-\-\-\-\-\-\-\-\-+ +\-\-\-\-\-\-\-\-\-+ +\-\-\-\-\-\-\-\-\-+ \& ! \& V \& : \& : \& ! \& V \& +\-\-\-\-\-\-\-\-\-+ +\-\-\-\-\-\-\-\-\-+ +\-\-\-\-\-\-\-\-\-+ \& ! Rule !\->! Match !\->! Target ! \& +\-\-\-\-\-\-\-\-\-+ +\-\-\-\-\-\-\-\-\-+ +\-\-\-\-\-\-\-\-\-+ \& ! \& V \& +\-\-\-\-\-\-\-\-\-+ \& ! Default ! \& ! Target ! \& +\-\-\-\-\-\-\-\-\-+ .Ve .SS "Flow control" .IX Subsection "Flow control" There are four ways to control which way a value takes through the filter mechanism: .IP "\fBjump\fR" 4 .IX Item "jump" The built-in \fBjump\fR target can be used to \*(L"call\*(R" another chain, i.\ e. process the value with another chain. When the called chain finishes, usually the next target or rule after the jump is executed. .IP "\fBstop\fR" 4 .IX Item "stop" The stop condition, signaled for example by the built-in target \fBstop\fR, causes all processing of the value to be stopped immediately. .IP "\fBreturn\fR" 4 .IX Item "return" Causes processing in the current chain to be aborted, but processing of the value generally will continue. This means that if the chain was called via \&\fBJump\fR, the next target or rule after the jump will be executed. If the chain was not called by another chain, control will be returned to the daemon and it may pass the value to another chain. .IP "\fBcontinue\fR" 4 .IX Item "continue" Most targets will signal the \fBcontinue\fR condition, meaning that processing should continue normally. There is no special built-in target for this condition. .SS "Synopsis" .IX Subsection "Synopsis" The configuration reflects this structure directly: .PP .Vb 10 \& PostCacheChain "PostCache" \& \& \& \& Plugin "^mysql$" \& Type "^mysql_command$" \& TypeInstance "^show_" \& \& \& \& \& \& Plugin "rrdtool" \& \& .Ve .PP The above configuration example will ignore all values where the plugin field is \*(L"mysql\*(R", the type is \*(L"mysql_command\*(R" and the type instance begins with \&\*(L"show_\*(R". All other values will be sent to the \f(CW\*(C`rrdtool\*(C'\fR write plugin via the default target of the chain. Since this chain is run after the value has been added to the cache, the MySQL \f(CW\*(C`show_*\*(C'\fR command statistics will be available via the \f(CW\*(C`unixsock\*(C'\fR plugin. .SS "List of configuration options" .IX Subsection "List of configuration options" .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". The argument is the name of a \fIchain\fR that should be executed before and/or after the values have been added to the cache. .Sp To understand the implications, it's important you know what is going on inside \&\fIcollectd\fR. The following diagram shows how values are passed from the read-plugins to the write-plugins: .Sp .Vb 10 \& +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ \& ! Read\-Plugin ! \& +\-\-\-\-\-\-\-+\-\-\-\-\-\-\-+ \& ! \& + \- \- \- \- V \- \- \- \- + \& : +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ : \& : ! Pre\-Cache ! : \& : ! Chain ! : \& : +\-\-\-\-\-\-\-+\-\-\-\-\-\-\-+ : \& : ! : \& : V : \& : +\-\-\-\-\-\-\-+\-\-\-\-\-\-\-+ : +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ \& : ! Cache !\-\-\->! Value Cache ! \& : ! insert ! : +\-\-\-+\-\-\-+\-\-\-\-\-\-\-+ \& : +\-\-\-\-\-\-\-+\-\-\-\-\-\-\-+ : ! ! \& : ! ,\-\-\-\-\-\-\-\-\-\-\-\-\*(Aq ! \& : V V : V \& : +\-\-\-\-\-\-\-+\-\-\-+\-\-\-+ : +\-\-\-\-\-\-\-+\-\-\-\-\-\-\-+ \& : ! Post\-Cache +\-\-\->! Write\-Plugins ! \& : ! Chain ! : +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ \& : +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ : \& : : \& : dispatch values : \& + \- \- \- \- \- \- \- \- \- + .Ve .Sp After the values are passed from the \*(L"read\*(R" plugins to the dispatch functions, the pre-cache chain is run first. The values are added to the internal cache afterwards. The post-cache chain is run after the values have been added to the cache. So why is it such a huge deal if chains are run before or after the values have been added to this cache? .Sp Targets that change the identifier of a value list should be executed before the values are added to the cache, so that the name in the cache matches the name that is used in the \*(L"write\*(R" plugins. The \f(CW\*(C`unixsock\*(C'\fR plugin, too, uses this cache to receive a list of all available values. If you change the identifier after the value list has been added to the cache, this may easily lead to confusion, but it's not forbidden of course. .Sp The cache is also used to convert counter values to rates. These rates are, for example, used by the \f(CW\*(C`value\*(C'\fR match (see below). If you use the rate stored in the cache \fBbefore\fR the new value is added, you will use the old, \fBprevious\fR rate. Write plugins may use this rate, too, see the \f(CW\*(C`csv\*(C'\fR plugin, for example. The \f(CW\*(C`unixsock\*(C'\fR plugin uses these rates too, to implement the \f(CW\*(C`GETVAL\*(C'\fR command. .Sp Last but not last, the \fBstop\fR target makes a difference: If the pre-cache chain returns the stop condition, the value will not be added to the cache and the post-cache chain will not be run. .IP "\fBChain\fR \fIName\fR" 4 .IX Item "Chain Name" Adds a new chain with a certain name. This name can be used to refer to a specific chain, for example to jump to it. .Sp Within the \fBChain\fR block, there can be \fBRule\fR blocks and \fBTarget\fR blocks. .IP "\fBRule\fR [\fIName\fR]" 4 .IX Item "Rule [Name]" Adds a new rule to the current chain. The name of the rule is optional and currently has no meaning for the daemon. .Sp Within the \fBRule\fR block, there may be any number of \fBMatch\fR blocks and there must be at least one \fBTarget\fR block. .IP "\fBMatch\fR \fIName\fR" 4 .IX Item "Match Name" Adds a match to a \fBRule\fR block. The name specifies what kind of match should be performed. Available matches depend on the plugins that have been loaded. .Sp The arguments inside the \fBMatch\fR block are passed to the plugin implementing the match, so which arguments are valid here depends on the plugin being used. If you do not need any to pass any arguments to a match, you can use the shorter syntax: .Sp .Vb 1 \& Match "foobar" .Ve .Sp Which is equivalent to: .Sp .Vb 2 \& \& .Ve .IP "\fBTarget\fR \fIName\fR" 4 .IX Item "Target Name" Add a target to a rule or a default target to a chain. The name specifies what kind of target is to be added. Which targets are available depends on the plugins being loaded. .Sp The arguments inside the \fBTarget\fR block are passed to the plugin implementing the target, so which arguments are valid here depends on the plugin being used. If you do not need any to pass any arguments to a target, you can use the shorter syntax: .Sp .Vb 1 \& Target "stop" .Ve .Sp This is the same as writing: .Sp .Vb 2 \& \& .Ve .SS "Built-in targets" .IX Subsection "Built-in targets" The following targets are built into the core daemon and therefore need no plugins to be loaded: .IP "\fBreturn\fR" 4 .IX Item "return" Signals the \*(L"return\*(R" condition, see the \*(L"Flow control\*(R" section above. This causes the current chain to stop processing the value and returns control to the calling chain. The calling chain will continue processing targets and rules just after the \fBjump\fR target (see below). This is very similar to the \&\fB\s-1RETURN\s0\fR target of iptables, see \fBiptables\fR\|(8). .Sp This target does not have any options. .Sp Example: .Sp .Vb 1 \& Target "return" .Ve .IP "\fBstop\fR" 4 .IX Item "stop" Signals the \*(L"stop\*(R" condition, see the \*(L"Flow control\*(R" section above. This causes processing of the value to be aborted immediately. This is similar to the \fB\s-1DROP\s0\fR target of iptables, see \fBiptables\fR\|(8). .Sp This target does not have any options. .Sp Example: .Sp .Vb 1 \& Target "stop" .Ve .IP "\fBwrite\fR" 4 .IX Item "write" Sends the value to \*(L"write\*(R" plugins. .Sp Available options: .RS 4 .IP "\fBPlugin\fR \fIName\fR" 4 .IX Item "Plugin Name" Name of the write plugin to which the data should be sent. This option may be given multiple times to send the data to more than one write plugin. If the plugin supports multiple instances, the plugin's instance(s) must also be specified. .RE .RS 4 .Sp If no plugin is explicitly specified, the values will be sent to all available write plugins. .Sp Single-instance plugin example: .Sp .Vb 3 \& \& Plugin "rrdtool" \& .Ve .Sp Multi-instance plugin example: .Sp .Vb 12 \& \& \& ... \& \& \& ... \& \& \& ... \& \& Plugin "write_graphite/foo" \& .Ve .RE .IP "\fBjump\fR" 4 .IX Item "jump" Starts processing the rules of another chain, see \*(L"Flow control\*(R" above. If the end of that chain is reached, or a stop condition is encountered, processing will continue right after the \fBjump\fR target, i.\ e. with the next target or the next rule. This is similar to the \fB\-j\fR command line option of iptables, see \fBiptables\fR\|(8). .Sp Available options: .RS 4 .IP "\fBChain\fR \fIName\fR" 4 .IX Item "Chain Name" Jumps to the chain \fIName\fR. This argument is required and may appear only once. .RE .RS 4 .Sp Example: .Sp .Vb 3 \& \& Chain "foobar" \& .Ve .RE .SS "Available matches" .IX Subsection "Available matches" .IP "\fBregex\fR" 4 .IX Item "regex" Matches a value using regular expressions. .Sp Available options: .RS 4 .IP "\fBHost\fR \fIRegex\fR" 4 .IX Item "Host Regex" .PD 0 .IP "\fBPlugin\fR \fIRegex\fR" 4 .IX Item "Plugin Regex" .IP "\fBPluginInstance\fR \fIRegex\fR" 4 .IX Item "PluginInstance Regex" .IP "\fBType\fR \fIRegex\fR" 4 .IX Item "Type Regex" .IP "\fBTypeInstance\fR \fIRegex\fR" 4 .IX Item "TypeInstance Regex" .IP "\fBMetaData\fR \fIString\fR \fIRegex\fR" 4 .IX Item "MetaData String Regex" .PD Match values where the given regular expressions match the various fields of the identifier of a value. If multiple regular expressions are given, \fBall\fR regexen must match for a value to match. .IP "\fBInvert\fR \fBfalse\fR|\fBtrue\fR" 4 .IX Item "Invert false|true" When set to \fBtrue\fR, the result of the match is inverted, i.e. all value lists where all regular expressions apply are not matched, all other value lists are matched. Defaults to \fBfalse\fR. .RE .RS 4 .Sp Example: .Sp .Vb 4 \& \& Host "customer[0\-9]+" \& Plugin "^foobar$" \& .Ve .RE .IP "\fBtimediff\fR" 4 .IX Item "timediff" Matches values that have a time which differs from the time on the server. .Sp This match is mainly intended for servers that receive values over the \&\f(CW\*(C`network\*(C'\fR plugin and write them to disk using the \f(CW\*(C`rrdtool\*(C'\fR plugin. RRDtool is very sensitive to the timestamp used when updating the \s-1RRD\s0 files. In particular, the time must be ever increasing. If a misbehaving client sends one packet with a timestamp far in the future, all further packets with a correct time will be ignored because of that one packet. What's worse, such corrupted \&\s-1RRD\s0 files are hard to fix. .Sp This match lets one match all values \fBoutside\fR a specified time range (relative to the server's time), so you can use the \fBstop\fR target (see below) to ignore the value, for example. .Sp Available options: .RS 4 .IP "\fBFuture\fR \fISeconds\fR" 4 .IX Item "Future Seconds" Matches all values that are \fIahead\fR of the server's time by \fISeconds\fR or more seconds. Set to zero for no limit. Either \fBFuture\fR or \fBPast\fR must be non-zero. .IP "\fBPast\fR \fISeconds\fR" 4 .IX Item "Past Seconds" Matches all values that are \fIbehind\fR of the server's time by \fISeconds\fR or more seconds. Set to zero for no limit. Either \fBFuture\fR or \fBPast\fR must be non-zero. .RE .RS 4 .Sp Example: .Sp .Vb 4 \& \& Future 300 \& Past 3600 \& .Ve .Sp This example matches all values that are five minutes or more ahead of the server or one hour (or more) lagging behind. .RE .IP "\fBvalue\fR" 4 .IX Item "value" Matches the actual value of data sources against given minimum\ / maximum values. If a data-set consists of more than one data-source, all data-sources must match the specified ranges for a positive match. .Sp Available options: .RS 4 .IP "\fBMin\fR \fIValue\fR" 4 .IX Item "Min Value" Sets the smallest value which still results in a match. If unset, behaves like negative infinity. .IP "\fBMax\fR \fIValue\fR" 4 .IX Item "Max Value" Sets the largest value which still results in a match. If unset, behaves like positive infinity. .IP "\fBInvert\fR \fBtrue\fR|\fBfalse\fR" 4 .IX Item "Invert true|false" Inverts the selection. If the \fBMin\fR and \fBMax\fR settings result in a match, no-match is returned and vice versa. Please note that the \fBInvert\fR setting only effects how \fBMin\fR and \fBMax\fR are applied to a specific value. Especially the \fBDataSource\fR and \fBSatisfy\fR settings (see below) are not inverted. .IP "\fBDataSource\fR \fIDSName\fR [\fIDSName\fR ...]" 4 .IX Item "DataSource DSName [DSName ...]" Select one or more of the data sources. If no data source is configured, all data sources will be checked. If the type handled by the match does not have a data source of the specified name(s), this will always result in no match (independent of the \fBInvert\fR setting). .IP "\fBSatisfy\fR \fBAny\fR|\fBAll\fR" 4 .IX Item "Satisfy Any|All" Specifies how checking with several data sources is performed. If set to \&\fBAny\fR, the match succeeds if one of the data sources is in the configured range. If set to \fBAll\fR the match only succeeds if all data sources are within the configured range. Default is \fBAll\fR. .Sp Usually \fBAll\fR is used for positive matches, \fBAny\fR is used for negative matches. This means that with \fBAll\fR you usually check that all values are in a \&\*(L"good\*(R" range, while with \fBAny\fR you check if any value is within a \*(L"bad\*(R" range (or outside the \*(L"good\*(R" range). .RE .RS 4 .Sp Either \fBMin\fR or \fBMax\fR, but not both, may be unset. .Sp Example: .Sp .Vb 6 \& # Match all values smaller than or equal to 100. Matches only if all data \& # sources are below 100. \& \& Max 100 \& Satisfy "All" \& \& \& # Match if the value of any data source is outside the range of 0 \- 100. \& \& Min 0 \& Max 100 \& Invert true \& Satisfy "Any" \& .Ve .RE .IP "\fBempty_counter\fR" 4 .IX Item "empty_counter" Matches all values with one or more data sources of type \fB\s-1COUNTER\s0\fR and where all counter values are zero. These counters usually \fInever\fR increased since they started existing (and are therefore uninteresting), or got reset recently or overflowed and you had really, \fIreally\fR bad luck. .Sp Please keep in mind that ignoring such counters can result in confusing behavior: Counters which hardly ever increase will be zero for long periods of time. If the counter is reset for some reason (machine or service restarted, usually), the graph will be empty (\s-1NAN\s0) for a long time. People may not understand why. .IP "\fBhashed\fR" 4 .IX Item "hashed" Calculates a hash value of the host name and matches values according to that hash value. This makes it possible to divide all hosts into groups and match only values that are in a specific group. The intended use is in load balancing, where you want to handle only part of all data and leave the rest for other servers. .Sp The hashing function used tries to distribute the hosts evenly. First, it calculates a 32\ bit hash value using the characters of the hostname: .Sp .Vb 3 \& hash_value = 0; \& for (i = 0; host[i] != 0; i++) \& hash_value = (hash_value * 251) + host[i]; .Ve .Sp The constant 251 is a prime number which is supposed to make this hash value more random. The code then checks the group for this host according to the \&\fITotal\fR and \fIMatch\fR arguments: .Sp .Vb 4 \& if ((hash_value % Total) == Match) \& matches; \& else \& does not match; .Ve .Sp Please note that when you set \fITotal\fR to two (i.\ e. you have only two groups), then the least significant bit of the hash value will be the \s-1XOR\s0 of all least significant bits in the host name. One consequence is that when you have two hosts, \*(L"server0.example.com\*(R" and \*(L"server1.example.com\*(R", where the host name differs in one digit only and the digits differ by one, those hosts will never end up in the same group. .Sp Available options: .RS 4 .IP "\fBMatch\fR \fIMatch\fR \fITotal\fR" 4 .IX Item "Match Match Total" Divide the data into \fITotal\fR groups and match all hosts in group \fIMatch\fR as described above. The groups are numbered from zero, i.\ e. \fIMatch\fR must be smaller than \fITotal\fR. \fITotal\fR must be at least one, although only values greater than one really do make any sense. .Sp You can repeat this option to match multiple groups, for example: .Sp .Vb 2 \& Match 3 7 \& Match 5 7 .Ve .Sp The above config will divide the data into seven groups and match groups three and five. One use would be to keep every value on two hosts so that if one fails the missing data can later be reconstructed from the second host. .RE .RS 4 .Sp Example: .Sp .Vb 10 \& # Operate on the pre\-cache chain, so that ignored values are not even in the \& # global cache. \& \& \& \& # Divide all received hosts in seven groups and accept all hosts in \& # group three. \& Match 3 7 \& \& # If matched: Return and continue. \& Target "return" \& \& # If not matched: Return and stop. \& Target "stop" \& .Ve .RE .SS "Available targets" .IX Subsection "Available targets" .IP "\fBnotification\fR" 4 .IX Item "notification" Creates and dispatches a notification. .Sp Available options: .RS 4 .IP "\fBMessage\fR \fIString\fR" 4 .IX Item "Message String" This required option sets the message of the notification. The following placeholders will be replaced by an appropriate value: .RS 4 .IP "\fB%{host}\fR" 4 .IX Item "%{host}" .PD 0 .IP "\fB%{plugin}\fR" 4 .IX Item "%{plugin}" .IP "\fB%{plugin_instance}\fR" 4 .IX Item "%{plugin_instance}" .IP "\fB%{type}\fR" 4 .IX Item "%{type}" .IP "\fB%{type_instance}\fR" 4 .IX Item "%{type_instance}" .PD These placeholders are replaced by the identifier field of the same name. .IP "\fB%{ds:\fR\fIname\fR\fB}\fR" 4 .IX Item "%{ds:name}" These placeholders are replaced by a (hopefully) human readable representation of the current rate of this data source. If you changed the instance name (using the \fBset\fR or \fBreplace\fR targets, see below), it may not be possible to convert counter values to rates. .RE .RS 4 .Sp Please note that these placeholders are \fBcase sensitive\fR! .RE .ie n .IP "\fBSeverity\fR \fB""\s-1FAILURE""\s0\fR|\fB""\s-1WARNING""\s0\fR|\fB""\s-1OKAY""\s0\fR" 4 .el .IP "\fBSeverity\fR \fB``\s-1FAILURE''\s0\fR|\fB``\s-1WARNING''\s0\fR|\fB``\s-1OKAY''\s0\fR" 4 .IX Item "Severity FAILURE|WARNING|OKAY" Sets the severity of the message. If omitted, the severity \fB\*(L"\s-1WARNING\*(R"\s0\fR is used. .RE .RS 4 .Sp Example: .Sp .Vb 4 \& \& Message "Oops, the %{type_instance} temperature is currently %{ds:value}!" \& Severity "WARNING" \& .Ve .RE .IP "\fBreplace\fR" 4 .IX Item "replace" Replaces parts of the identifier using regular expressions. .Sp Available options: .RS 4 .IP "\fBHost\fR \fIRegex\fR \fIReplacement\fR" 4 .IX Item "Host Regex Replacement" .PD 0 .IP "\fBPlugin\fR \fIRegex\fR \fIReplacement\fR" 4 .IX Item "Plugin Regex Replacement" .IP "\fBPluginInstance\fR \fIRegex\fR \fIReplacement\fR" 4 .IX Item "PluginInstance Regex Replacement" .IP "\fBTypeInstance\fR \fIRegex\fR \fIReplacement\fR" 4 .IX Item "TypeInstance Regex Replacement" .IP "\fBMetaData\fR \fIString\fR \fIRegex\fR \fIReplacement\fR" 4 .IX Item "MetaData String Regex Replacement" .IP "\fBDeleteMetaData\fR \fIString\fR \fIRegex\fR" 4 .IX Item "DeleteMetaData String Regex" .PD Match the appropriate field with the given regular expression \fIRegex\fR. If the regular expression matches, that part that matches is replaced with \&\fIReplacement\fR. If multiple places of the input buffer match a given regular expression, only the first occurrence will be replaced. .Sp You can specify each option multiple times to use multiple regular expressions one after another. .RE .RS 4 .Sp Example: .Sp .Vb 3 \& \& # Replace "example.net" with "example.com" \& Host "\e\e" "example.com" \& \& # Strip "www." from hostnames \& Host "\e\e .Ve .RE .IP "\fBset\fR" 4 .IX Item "set" Sets part of the identifier of a value to a given string. .Sp Available options: .RS 4 .IP "\fBHost\fR \fIString\fR" 4 .IX Item "Host String" .PD 0 .IP "\fBPlugin\fR \fIString\fR" 4 .IX Item "Plugin String" .IP "\fBPluginInstance\fR \fIString\fR" 4 .IX Item "PluginInstance String" .IP "\fBTypeInstance\fR \fIString\fR" 4 .IX Item "TypeInstance String" .IP "\fBMetaData\fR \fIString\fR \fIString\fR" 4 .IX Item "MetaData String String" .PD Set the appropriate field to the given string. The strings for plugin instance, type instance, and meta data may be empty, the strings for host and plugin may not be empty. It's currently not possible to set the type of a value this way. .Sp The following placeholders will be replaced by an appropriate value: .RS 4 .IP "\fB%{host}\fR" 4 .IX Item "%{host}" .PD 0 .IP "\fB%{plugin}\fR" 4 .IX Item "%{plugin}" .IP "\fB%{plugin_instance}\fR" 4 .IX Item "%{plugin_instance}" .IP "\fB%{type}\fR" 4 .IX Item "%{type}" .IP "\fB%{type_instance}\fR" 4 .IX Item "%{type_instance}" .PD These placeholders are replaced by the identifier field of the same name. .IP "\fB%{meta:\fR\fIname\fR\fB}\fR" 4 .IX Item "%{meta:name}" These placeholders are replaced by the meta data value with the given name. .RE .RS 4 .Sp Please note that these placeholders are \fBcase sensitive\fR! .RE .IP "\fBDeleteMetaData\fR \fIString\fR" 4 .IX Item "DeleteMetaData String" Delete the named meta data field. .RE .RS 4 .Sp Example: .Sp .Vb 4 \& \& PluginInstance "coretemp" \& TypeInstance "core3" \& .Ve .RE .SS "Backwards compatibility" .IX Subsection "Backwards compatibility" If you use collectd with an old configuration, i.\ e. one without a \&\fBChain\fR block, it will behave as it used to. This is equivalent to the following configuration: .PP .Vb 3 \& \& Target "write" \& .Ve .PP If you specify a \fBPostCacheChain\fR, the \fBwrite\fR target will not be added anywhere and you will have to make sure that it is called where appropriate. We suggest to add the above snippet as default target to your \*(L"PostCache\*(R" chain. .SS "Examples" .IX Subsection "Examples" Ignore all values, where the hostname does not contain a dot, i.\ e. can't be an \s-1FQDN.\s0 .PP .Vb 9 \& \& \& \& Host "^[^\e.]*$" \& \& Target "stop" \& \& Target "write" \& .Ve .SH "IGNORELISTS" .IX Header "IGNORELISTS" \&\fBIgnorelists\fR are a generic framework to either ignore some metrics or report specific metrics only. Plugins usually provide one or more options to specify the items (mounts points, devices, ...) and the boolean option \&\f(CW\*(C`IgnoreSelected\*(C'\fR. .IP "\fBSelect\fR \fIString\fR" 4 .IX Item "Select String" Selects the item \fIString\fR. This option often has a plugin specific name, e.g. \&\fBSensor\fR in the \f(CW\*(C`sensors\*(C'\fR plugin. It is also plugin specific what this string is compared to. For example, the \f(CW\*(C`df\*(C'\fR plugin's \fBMountPoint\fR compares it to a mount point and the \f(CW\*(C`sensors\*(C'\fR plugin's \fBSensor\fR compares it to a sensor name. .Sp By default, this option is doing a case-sensitive full-string match. The following config will match \f(CW\*(C`foo\*(C'\fR, but not \f(CW\*(C`Foo\*(C'\fR: .Sp .Vb 1 \& Select "foo" .Ve .Sp If \fIString\fR starts and ends with \f(CW\*(C`/\*(C'\fR (a slash), the string is compiled as a \&\fIregular expression\fR. For example, so match all item starting with \f(CW\*(C`foo\*(C'\fR, use could use the following syntax: .Sp .Vb 1 \& Select "/^foo/" .Ve .Sp The regular expression is \fInot\fR anchored, i.e. the following config will match \&\f(CW\*(C`foobar\*(C'\fR, \f(CW\*(C`barfoo\*(C'\fR and \f(CW\*(C`AfooZ\*(C'\fR: .Sp .Vb 1 \& Select "/foo/" .Ve .Sp The \fBSelect\fR option may be repeated to select multiple items. .IP "\fBIgnoreSelected\fR \fBtrue\fR|\fBfalse\fR" 4 .IX Item "IgnoreSelected true|false" If set to \fBtrue\fR, matching metrics are \fIignored\fR and all other metrics are collected. If set to \fBfalse\fR, matching metrics are \fIcollected\fR and all other metrics are ignored. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBcollectd\fR\|(1), \&\fBcollectd\-exec\fR\|(5), \&\fBcollectd\-perl\fR\|(5), \&\fBcollectd\-unixsock\fR\|(5), \&\fBtypes.db\fR\|(5), \&\fBhddtemp\fR\|(8), \&\fBiptables\fR\|(8), kstat(3KSTAT), \&\fBmbmon\fR\|(1), \&\fBpsql\fR\|(1), \&\fBregex\fR\|(7), \&\fBrrdtool\fR\|(1), \&\fBsensors\fR\|(1) .SH "AUTHOR" .IX Header "AUTHOR" Florian Forster