=encoding UTF-8 =head1 NAME collectd.conf - Configuration for the system statistics collection daemon B =head1 SYNOPSIS 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" =head1 DESCRIPTION This config file controls how the system statistics collection daemon B behaves. The most significant option is B, which controls which plugins to load. These plugins ultimately define collectd's behavior. If the B option has been enabled, the explicit B lines may be omitted for all plugins with a configuration block, i.e. a CPluginE...E> block. The syntax of this config file is similar to the config file of the famous I 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 (C<#>) is ignored. I are unquoted strings, consisting only of alphanumeric characters and the underscore (C<_>) character. Keys are handled case insensitive by I itself and all plugins included with it. I can either be an I, a I (enclosed in double-quotes) a I or a I expression. I consist of only alphanumeric characters and underscores (C<_>) and do not need to be quoted. I are enclosed in double quotes (C<">). You can use the backslash character (C<\>) to include double quotes as part of the string. I can be specified in decimal and floating point format (using a dot C<.> as decimal separator), hexadecimal when using the C<0x> prefix and octal with a leading zero (C<0>). I values are either B or B. Lines may be wrapped by using C<\> 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. 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 B is enabled, the B option I occur I the appropriate CB ...E> block. =head1 GLOBAL OPTIONS =over 4 =item B I Sets the base directory. This is the directory beneath all RRD-files are created. Possibly more subdirectories are created. This is also the working directory for the daemon. =item B I Loads the plugin I. This is required to load plugins, unless the B option is enabled (see below). Without any loaded plugins, I will be mostly useless. Only the first B 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 "self contained", i.e. it contains a B block I then appropriate B statement. The downside is that if you have multiple conflicting B 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. B may either be a simple configuration I or a I with additional options, affecting the behavior of B. A simple statement looks like this: LoadPlugin "cpu" Options inside a B block can override default settings and influence the way plugins are loaded, e.g.: Globals true Interval 60 The following options are valid inside B blocks: =over 4 =item B B 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. This is useful (or possibly even required), e.g., when loading a plugin that embeds some scripting language into the daemon (e.g. the I and I). 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., L or L) for details. By default, this is disabled. As a special exception, if the plugin name is either C or C, the default is changed to enabled in order to keep the average user from ever having to deal with this low level linking stuff. =item B I Sets a plugin-specific interval for collecting metrics. This overrides the global B setting. If a plugin provides own support for specifying an interval, that setting will take precedence. =back =item B B|B When set to B (the default), each plugin needs to be loaded explicitly, using the B statement documented above. If a BPluginE...E> block is encountered and no configuration handling callback for this plugin has been registered, a warning is logged and the block is ignored. When set to B, explicit B statements are not required. Each BPluginE...E> block acts as if it was immediately preceded by a B statement. B statements are still required for plugins that don't provide any configuration, e.g. the I. =item B B|B When set to B, various statistics about the I daemon will be collected, with "collectd" as the I. Defaults to B. The "write_queue" I reports the number of elements currently queued and the number of elements dropped off the queue by the B/B mechanism. The "cache" I reports the number of elements in the value list cache (the cache you can interact with using L). =item B I [I] If I points to a file, includes that file. If I points to a directory, recursively includes all files within that directory and its subdirectories. If the C function is available on your system, shell-like wildcards are expanded before files are included. This means you can use statements like the following: Include "/etc/collectd.d/*.conf" Starting with version 5.3, this may also be a block in which further options affecting the behavior of B may be specified. The following option is currently allowed: Filter "*.conf" =over 4 =item B I If the C function is available on your system, a shell-like wildcard I 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. README files). The given example is similar to the first example above but includes all files matching C<*.conf> in any subdirectory of C: Include "/etc/collectd.d" "*.conf" =back If more than one files are included by a single B option, the files will be included in lexicographical order (as defined by the C function). Thus, you can e.Eg. use numbered prefixes to specify the order in which the files are loaded. To prevent loops and shooting yourself in the foot in interesting ways the nesting is limited to a depth of 8Elevels, 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. It is no problem to have a block like CPlugin fooE> in more than one file, but you cannot include files from within blocks. =item B I Sets where to write the PID 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 B<-P> command-line option. =item B I Path to the plugins (shared objects) of collectd. =item B I [I ...] Set one or more files that contain the data-set descriptions. See L for a description of the format of this file. =item B I 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. B You should set this once and then never touch it again. If you do, I or know some serious RRDtool magic! (Assuming you're using the I or I plugin.) =item B I Read plugin doubles interval between queries after each failed attempt to get data. This options limits the maximum value of the interval. The default value is B<86400>. =item B I Consider a value list "missing" when no update has been read or received for I iterations. By default, I 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 I information contained in each value list. This is used in the I configuration to dispatch notifications about missing values, see L for details. =item B I Number of threads to start for reading plugins. The default value is B<5>, 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. =item B I Number of threads to start for dispatching value lists to write plugins. The default value is B<5>, but you may want to increase this if you have more than five plugins that may take relatively long to write to. =item B I =item B I Metrics are read by the I and then put into a queue to be handled by the I. If one of the I 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. 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. You can set the limits using B and B. Each of them takes a numerical argument which is the number of metrics in the queue. If there are I metrics in the queue, any new metrics I be dropped. If there are less than I metrics in the queue, all new metrics I be enqueued. If the number of metrics currently in the queue is between I and I, 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%.) If B is set to non-zero and B is unset, the latter will default to half of B. If you do not want to randomly drop values when the queue size is between I and I, set B and B to the same value. Enabling the B option is of great help to figure out the values to set B and B to. =item B I Sets the hostname that identifies a host. If you omit this setting, the hostname will be determined using the L system call. =item B B If B is determined automatically this setting controls whether or not the daemon should try to figure out the "fully qualified domain name", FQDN. This is done using a lookup of the name returned by C. This option is enabled by default. =item B I =item B I Configure the name of the "pre-cache chain" and the "post-cache chain". Please see L below on information on chains and how these setting change the daemon's behavior. =back =head1 PLUGIN OPTIONS Some plugins may register own options. These options must be enclosed in a C-Section. Which options exist depends on the plugin used. Some plugins require external configuration, too. The C, for example, required C 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. A list of all plugins and a short summary for each plugin can be found in the F file shipped with the sourcecode and hopefully binary packets as well. =head2 Plugin C The I makes it possible to aggregate several values into one using aggregation functions such as I, I, I and I. This can be put to a wide variety of uses, e.g. average and total CPU statistics for your entire fleet. 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 CPU usage across all CPUs of each host is to be calculated. To select all the affected values for our example, set C and C. The other values are left unspecified, meaning "all values". The I, I, I, I and I options work as if they were specified in the C clause of an C Specifies register type to be collected from device. Works only with libmodbus 2.9.2 or higher. Defaults to B. =item B I Specifies the "type" (data set) to use when dispatching the value to I. Currently, only data sets with exactly one data source are supported. =item B I Sets the type instance to use when dispatching the value to I. If unset, an empty string (no type instance) is used. =back =item EB IE blocks Host blocks are used to specify to which hosts to connect and what data to read from their "slaves". The string argument I is used as hostname when dispatching the values to I. Within EHostE/E blocks, the following options are allowed: =over 4 =item B
I Specifies the node name (the actual network address) used to connect to the host. This may be an IP address or a hostname. Please note that the used I library only supports IPv4 at the moment. =item B I 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 I argument must be a string, even if ports are given in their numerical form. Defaults to "502". =item B I Sets the interval (in seconds) in which the values will be collected from this host. By default the global B setting will be used. =item EB IE Over each TCP connection, multiple Modbus devices may be reached. The slave ID is used to specify which device should be addressed. For each device you want to query, one B block must be given. Within ESlaveE/E blocks, the following options are allowed: =over 4 =item B I Specify the plugin instance to use when dispatching the values to I. By default "slave_I" is used. =item B I Specifies which data to retrieve from the device. I must be the same string as the I argument passed to a B block. You can specify this option multiple times to collect more than one value from a slave. At least one B option is mandatory. =back =back =back =head2 Plugin C The C requires B 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. This plugin issues the MySQL C / C command and collects information about MySQL network traffic, executed statements, requests, the query cache and threads by evaluating the C, C, C, C and C return values. Please refer to the B, I<5.1.6. Server Status Variables> for an explanation of these values. 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 C return value of the C command and the C, C and C return values of the C command. See the B, I<12.5.5.21 SHOW MASTER STATUS Syntax> and I<12.5.5.31 SHOW SLAVE STATUS Syntax> for details. Synopsis: Host "hostname" User "username" Password "password" Port "3306" MasterStats true ConnectTimeout 10 Alias "squeeze" Host "localhost" Socket "/var/run/mysql/mysqld.sock" SlaveStats true SlaveNotifications true A B 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 section "mysql_real_connect()" in the B. =over 4 =item B I Alias to use as sender instead of hostname when reporting. This may be useful when having cryptic hostnames. =item B I Hostname of the database server. Defaults to B. =item B I Username to use when connecting to the database. The user does not have to be granted any privileges (which is synonym to granting the C privilege), unless you want to collectd replication statistics (see B and B below). In this case, the user needs the C (or C) privileges. Else, any existing MySQL user will do. =item B I Password needed to log into the database. =item B I Select this database. Defaults to I which is a perfectly reasonable option for what this plugin does. =item B I 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: Port "3306" If B is set to B (the default), this setting has no effect. See the documentation for the C function for details. =item B I Specifies the path to the UNIX domain socket of the MySQL server. This option only has any effect, if B is set to B (the default). Otherwise, use the B option above. See the documentation for the C function for details. =item B I If enabled, metrics about the InnoDB storage engine are collected. Disabled by default. =item B I =item B I 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 B documentation above. =item B I If enabled, the plugin sends a notification if the replication slave I/O and / or SQL threads are not running. =item B I Sets the connect timeout for the MySQL client. =back =head2 Plugin C The netapp plugin can collect various performance and capacity information from a NetApp filer using the NetApp API. 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 FAS3040 running OnTap 7.2.3P8 and tested on FAS2050 7.3.1.1L1, FAS3140 7.2.5.1 and FAS3020 7.2.4P9. It I 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 "It works". To collect these data collectd will log in to the NetApp via HTTP(S) and HTTP basic authentication. B Create a special collectd user with just the minimum of capabilities needed. The user only needs the "login-http-admin" capability as well as a few more depending on which data will be collected. Required capabilities are documented below. =head3 Synopsis 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 # ... The netapp plugin accepts the following configuration options: =over 4 =item B I 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 B
option below). =item B I A B block may only be used inside a host block. It accepts all the same options as the B block (except for cascaded B blocks) and will execute all NetApp API 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 B option. If this is not specified, it will default to the name you specify here. The VFiler block inherits all connection related settings from the surrounding B block (which appear before the B block) but they may be overwritten inside the B block. 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. =item B B|B The protocol collectd will use to query this host. Optional Type: string Default: https Valid options: http, https =item B
I
The hostname or IP address of the host. Optional Type: string Default: The "host" block's name. =item B I The TCP port to connect to on the host. Optional Type: integer Default: 80 for protocol "http", 443 for protocol "https" =item B I =item B I The username and password to use to login to the NetApp. Mandatory Type: string =item B I The name of the VFiler in which context to execute API commands. If not specified, the name provided to the B block will be used instead. Optional Type: string Default: name of the B block B This option may only be used inside B blocks. =item B I B =back 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. The following options are valid inside all blocks: =over 4 =item B I Collect the respective statistics every I seconds. Defaults to the host specific setting. =back =head3 The System block This will collect various performance data about the whole system. B To get this data the collectd user needs the "api-perf-object-get-instances" capability. =over 4 =item B I Collect disk statistics every I seconds. =item B B|B If you set this option to true the current CPU usage will be read. This will be the average usage between all CPUs in your NetApp without any information about individual CPUs. B These are the same values that the NetApp CLI command "sysstat" returns in the "CPU" field. Optional Type: boolean Default: true Result: Two value lists of type "cpu", and type instances "idle" and "system". =item B B|B 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. B This is the same values that the NetApp CLI command "sysstat" returns in the "Net kB/s" field. B Optional Type: boolean Default: true Result: One value list of type "if_octects". =item B B|B If you set this option to true the current IO throughput will be read. This will be the total IO of your NetApp without any information about individual disks, volumes or aggregates. B This is the same values that the NetApp CLI command "sysstat" returns in the "DiskEkB/s" field. Optional Type: boolean Default: true Result: One value list of type "disk_octets". =item B B|B If you set this option to true the current number of HTTP, NFS, CIFS, FCP, 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. B These are the same values that the NetApp CLI command "sysstat" returns in the "NFS", "CIFS", "HTTP", "FCP" and "iSCSI" fields. Optional Type: boolean Default: true Result: A variable number of value lists of type "disk_ops_complex". Each type of operation will result in one value list with the name of the operation as type instance. =back =head3 The WAFL block This will collect various performance data about the WAFL file system. At the moment this just means cache performance. B To get this data the collectd user needs the "api-perf-object-get-instances" capability. B The interface to get these values is classified as "Diagnostics" by NetApp. This means that it is not guaranteed to be stable even between minor releases. =over 4 =item B I Collect disk statistics every I seconds. =item B B|B Optional Type: boolean Default: true Result: One value list of type "cache_ratio" and type instance "name_cache_hit". =item B B|B Optional Type: boolean Default: true Result: One value list of type "cache_ratio" and type instance "find_dir_hit". =item B B|B Optional Type: boolean Default: true Result: One value list of type "cache_ratio" and type instance "inode_cache_hit". =item B B|B B This is the same value that the NetApp CLI command "sysstat" returns in the "Cache hit" field. Optional Type: boolean Default: true Result: One value list of type "cache_ratio" and type instance "buf_hash_hit". =back =head3 The Disks block This will collect performance data about the individual disks in the NetApp. B To get this data the collectd user needs the "api-perf-object-get-instances" capability. =over 4 =item B I Collect disk statistics every I seconds. =item B B|B 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. B This is the same values that the NetApp CLI command "sysstat" returns in the "Disk util" field. Probably. Optional Type: boolean Default: true Result: One value list of type "percent" and type instance "disk_busy". =back =head3 The VolumePerf block This will collect various performance data about the individual volumes. You can select which data to collect about which volume using the following options. They follow the standard ignorelist semantic. B To get this data the collectd user needs the I capability. =over 4 =item B I Collect volume performance data every I seconds. =item B I =item B I =item B I Select the given volume for IO, operations or latency statistics collection. The argument is the name of the volume without the C prefix. 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 "vol0", "vol2" and "vol7", you can use this regular expression: GetIO "/^vol[027]$/" If no regular expression is specified, an exact match is required. Both, regular and exact matching are case sensitive. If no volume was specified at all for either of the three options, that data will be collected for all available volumes. =item B B|B =item B B|B =item B B|B When set to B, the volumes selected for IO, operations or latency statistics collection will be ignored and the data will be collected for all other volumes. When set to B, data will only be collected for the specified volumes and all other volumes will be ignored. If no volumes have been specified with the above B options, all volumes will be collected regardless of the B option. Defaults to B =back =head3 The VolumeUsage block This will collect capacity data about the individual volumes. B To get this data the collectd user needs the I capability. =over 4 =item B I Collect volume usage statistics every I seconds. =item B I 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 "df_complex" with the name of the volume as plugin_instance. There will be type_instances "used" and "free" for the number of used and available bytes on the volume. If the volume has some space reserved for snapshots, a type_instance "snap_reserved" will be available. If the volume has SIS enabled, a type_instance "sis_saved" will be available. This is the number of bytes saved by the SIS feature. B The current NetApp API has a bug that results in this value being reported as a 32Ebit 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. Repeat this option to specify multiple volumes. =item B B|B Specify whether to collect only the volumes selected by the B option or to ignore those volumes. B defaults to B. However, if no B option is specified at all, all capacities will be selected anyway. =item B I Select volumes from which to collect snapshot information. Usually, the space used for snapshots is included in the space reported as "used". If snapshot information is collected as well, the space used for snapshots is subtracted from the used space. 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 "reserved free" and "reserved used" space in addition to "free" and "used". If the space required for snapshots exceeds the reserved space, that part allocated in the normal space is subtracted from the "used" space again. Repeat this option to specify multiple volumes. =item B Specify whether to collect only the volumes selected by the B option or to ignore those volumes. B defaults to B. However, if no B option is specified at all, all capacities will be selected anyway. =back =head3 The Quota block 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 C would be sufficient: /vol/volA/some_qtree tree - - - - - After adding the entry, issue C on the NetApp filer. =over 4 =item B I Collect SnapVault(R) statistics every I seconds. =back =head3 The SnapVault block This will collect statistics about the time and traffic of SnapVault(R) transfers. =over 4 =item B I Collect SnapVault(R) statistics every I seconds. =back =head2 Plugin C The C plugin uses a netlink socket to query the Linux kernel about statistics of various interface and routing aspects. =over 4 =item B I =item B I Instruct the plugin to collect interface statistics. This is basically the same as the statistics provided by the C plugin (see above) but potentially much more detailed. When configuring with B only the basic statistics will be collected, namely octets, packets, and errors. These statistics are collected by the C plugin, too, so using both at the same time is no benefit. When configured with B all counters B the basic ones, so that no data needs to be collected twice if you use the C plugin. This includes dropped packets, received multicast packets, collisions and a whole zoo of differentiated RX and TX errors. You can try the following command to get an idea of what awaits you: ip -s -s link list If I is B, all interfaces will be selected. =item B I [I] =item B I [I] =item B I [I] Collect the octets and packets that pass a certain qdisc, class or filter. 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 tc(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 C even though the minor number of B qdiscs is zero and thus not displayed by tc(1). If B, B, or B is given without the second argument, i.E.e. without an identifier, all qdiscs, classes, or filters that are associated with that interface will be collected. 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. As with the B option you can specify B as the interface, meaning all interfaces. Here are some examples to help you understand the above text more easily: VerboseInterface "All" QDisc "eth0" "pfifo_fast-1:0" QDisc "ppp0" Class "ppp0" "htb-1:10" Filter "ppp0" "u32-1:0" =item B 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 B to B, this behavior is inverted, i.Ee. the specified statistics will not be collected. =back =head2 Plugin C 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 B option below. The default IPv6 multicast group is C. The default IPv4 multicast group is C<239.192.74.66>. The default I port is B<25826>. Both, B and B 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 "internal" server (without encryption and signing) and one to an external server (with cryptographic signature): # 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" =over 4 =item BServer> I [I]B> The B statement/block sets the server to send datagrams to. The statement may occur multiple times to send each datagram to multiple destinations. The argument I 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, B<25826>, is used. The following options are recognized within B blocks: =over 4 =item B B|B|B Set the security you require for network communication. When the security level has been set to B, data sent over the network will be encrypted using I. The integrity of encrypted packets is ensured using I. When set to B, transmitted data is signed using the I message authentication code. When set to B, data is sent without any security. This feature is only available if the I plugin was linked with I. =item B I Sets the username to transmit. This is used by the server to lookup the password. See B below. All security levels except B require this setting. This feature is only available if the I plugin was linked with I. =item B I Sets a password (shared secret) for this socket. All security levels except B require this setting. This feature is only available if the I plugin was linked with I. =item B I Set the outgoing interface for IP 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. =item B I Sets the interval at which to re-resolve the DNS for the I. This is useful to force a regular DNS lookup to support a high availability setup. If not specified, re-resolves are never attempted. =back =item BListen> I [I]B> The B statement sets the interfaces to bind to. When multiple statements are found the daemon will bind to multiple interfaces. The argument I 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, B<25826>, is used. The following options are recognized within CListenE> blocks: =over 4 =item B B|B|B Set the security you require for network communication. When the security level has been set to B, only encrypted data will be accepted. The integrity of encrypted packets is ensured using I. When set to B, only signed and encrypted data is accepted. When set to B, all data will be accepted. If an B option was given (see below), encrypted data is decrypted if possible. This feature is only available if the I plugin was linked with I. =item B I Sets a file in which usernames are mapped to passwords. These passwords are used to verify signatures and to decrypt encrypted network packets. If B is set to B, 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. 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: user0: foo user1: bar Each time a packet is received, the modification time of the file is checked using L. If the file has been changed, the contents is re-read. While the file is being read, it is locked using L. =item B I Set the incoming interface for IP 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. =back =item B I<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 TTL of C<1> (one) on most operating systems. =item B I<1024-65535> Set the maximum size for datagrams received over the network. Packets larger than this will be truncated. Defaults to 1452Ebytes, which is the maximum payload size that can be transmitted in one Ethernet frame using IPv6E/ UDP. On the server side, this limit should be set to the largest value used on I client. Likewise, the value on the client must not be larger than the value on the server, or data will be lost. B Versions prior to I4.8> used a fixed sized buffer of 1024Ebytes. Versions I<4.8>, I<4.9> and I<4.10> used a default value of 1024Ebytes to avoid problems when sending data to an older server. =item B I If set to I, write packets that were received via the network plugin to the sending sockets. This should only be activated when the B- and B-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. =item B B|B The network plugin cannot only receive and send statistics, it can also create statistics about itself. Collected 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 B, the I will make these statistics available. Defaults to B. =back =head2 Plugin C This plugin collects the number of connections and requests handled by the C (speak: engineEX), a HTTP and mail server/proxy. It queries the page provided by the C module, which isn't compiled by default. Please refer to L for more information on how to compile and configure nginx and this module. The following options are accepted by the C: =over 4 =item B I Sets the URL of the C output. =item B I Optional user name needed for authentication. =item B I Optional password needed for authentication. =item B B Enable or disable peer SSL certificate verification. See L for details. Enabled by default. =item B B Enable or disable peer host name verification. If enabled, the plugin checks if the C or a C field of the SSL certificate matches the host name provided by the B option. If this identity check fails, the connection is aborted. Obviously, only works when connecting to a SSL enabled server. Enabled by default. =item B I File that holds one or more SSL certificates. If you want to use HTTPS you will possibly need this option. What CA certificates come bundled with C and are checked by default depends on the distribution you use. =back =head2 Plugin C This plugin sends a desktop notification to a notification daemon, as defined in the Desktop Notification Specification. To actually display the notifications, B is required and B has to be able to access the X server (i.Ee., the C and C environment variables have to be set correctly) and the D-Bus message bus. The Desktop Notification Specification can be found at L. =over 4 =item B I =item B I =item B I Set the I, in milliseconds, after which to expire the notification for C, C and C 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. =back =head2 Plugin C The I plugin uses the I library to send notifications to a configured email address. I is available from L. Available configuration options: =over 4 =item B I
Email address from which the emails should appear to come from. Default: C =item B I
Configures the email address(es) to which the notifications should be mailed. May be repeated to send notifications to multiple addresses. At least one B must be present for the plugin to work correctly. =item B I Hostname of the SMTP server to connect to. Default: C =item B I TCP port to connect to. Default: C<25> =item B I Username for ASMTP authentication. Optional. =item B I Password for ASMTP authentication. Optional. =item B I Subject-template to use when sending emails. There must be exactly two string-placeholders in the subject, given in the standard I syntax, i.Ee. C<%s>. The first will be replaced with the severity, the second with the hostname. Default: C =back =head2 Plugin C =over 4 =item B I Hostname of the host running B. Defaults to B. =item B I UDP-Port to connect to. Defaults to B<123>. =item B B|B 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. =item B B|B When a peer is a refclock, include the unit ID in the I. Defaults to B for backward compatibility. If two refclock peers use the same driver and this is B, 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. =back =head2 Plugin C =over 4 =item B IB<@>I[B<:>I] Add a UPS to collect data from. The format is identical to the one accepted by L. =back =head2 Plugin C The I plugin connects to the TCP port opened by the I plugin of the Optimized Link State Routing daemon and reads information about the current state of the meshed network. The following configuration options are understood: =over 4 =item B I Connect to I. Defaults to B<"localhost">. =item B I 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 B<"2006">. =item B B|B|B Specifies what information to collect about links, i.Ee. direct connections of the daemon queried. If set to B, no information is collected. If set to B, the number of links and the average of all I (LQ) and I (NLQ) values is calculated. If set to B LQ and NLQ are collected per link. Defaults to B. =item B B|B|B Specifies what information to collect about routes of the daemon queried. If set to B, no information is collected. If set to B, the number of routes and the average I and I is calculated. If set to B metric and ETX are collected per route. Defaults to B. =item B B|B|B Specifies what information to collect about the global topology. If set to B, no information is collected. If set to B, the number of links in the entire topology and the average I (LQ) is calculated. If set to B LQ and NLQ are collected for each link in the entire topology. Defaults to B. =back =head2 Plugin C B See notes below. The C plugin uses the B library from the B project L to read sensors connected via the onewire bus. It can be used in two possible modes - standard or advanced. In the standard mode only temperature sensors (sensors with the family code C<10>, C<22> and C<28> - e.g. DS1820, DS18S20, DS1920) 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 B). When no list is provided the whole bus is walked and all sensors are read. Hubs (the DS2409 chips) are working, but read the note, why this plugin is experimental, below. In the advanced mode you can configure any sensor to be read (only numerical value) using full OWFS path (e.g. "/uncached/10.F10FCA000800/temperature"). In this mode you have to list all the sensors. Neither default bus walk nor B are used here. Address and type (file) is extracted from the path automatically and should produce compatible structure with the "standard" mode (basically the path is expected as for example "/uncached/10.F10FCA000800/temperature" where it would extract address part "F10FCA000800" and the rest after the slash is considered the type - here "temperature"). 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. 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 B then the whole addressing (all sensors) is considered to be this way (and as standard addresses will fail parsing they will be ignored). =over 4 =item B I Sets the device to read the values from. This can either be a "real" hardware device, such as a serial port or an USB port, or the address of the L socket, usually B. Though the documentation claims to automatically recognize the given address format, with versionE2.7p4 we had to specify the type explicitly. So with that version, the following configuration worked for us: Device "-s localhost:4304" This directive is B and does not have a default value. =item B I In the standard mode selects sensors to collect or to ignore (depending on B, see below). Sensors are specified without the family byte at the beginning, so you have to use for example C, and B include the leading C<10.> family byte and point. When no B is configured the whole Onewire bus is walked and all supported sensors (see above) are read. In the advanced mode the B specifies full OWFS path - e.g. C (or when cached values are OK C). B is not used. As there can be multiple devices on the bus you can list multiple sensor (use multiple B elements). =item B I|I If no configuration is given, the B 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 I a few specified ones. This option enables you to do that: By setting B to I the effect of B is inverted: All selected interfaces are ignored and all other interfaces are collected. Used only in the standard mode - see above. =item B I Sets the interval in which all sensors should be read. If not specified, the global B setting is used. =back B The C 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 I change, though this is unlikely. Oh, and if you want to help improving this plugin, just send a short notice to the mailing list. ThanksE:) =head2 Plugin C To use the C plugin you first need to configure the I server correctly. The backend database C needs to be loaded and working. See slapd-monitor(5) for the details. The configuration of the C plugin consists of one or more B blocks. Each block requires one string argument as the instance name. For example: URL "ldap://localhost/" URL "ldaps://localhost/" The instance name will be used as the I. To emulate the old (versionE4) 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. The following options are accepted within each B block: =over 4 =item B I Sets the URL to use to connect to the I server. This option is I. =item B B Defines whether TLS must be used when connecting to the I server. Disabled by default. =item B B Enables or disables peer host name verification. If enabled, the plugin checks if the C or a C field of the SSL certificate matches the host name provided by the B option. If this identity check fails, the connection is aborted. Enabled by default. =item B I File that holds one or more SSL certificates. If you want to use TLS/SSL you may possibly need this option. What CA certificates are checked by default depends on the distribution you use and can be changed with the usual ldap client configuration mechanisms. See ldap.conf(5) for the details. =item B I Sets the timeout value for ldap operations. Defaults to B<-1> which results in an infinite timeout. =item B I An integer which sets the LDAP protocol version number to use when connecting to the I server. Defaults to B<3> for using I. =back =head2 Plugin C The OpenVPN plugin reads a status file maintained by OpenVPN and gathers traffic statistics about connected clients. To set up OpenVPN to write to the status file periodically, use the B<--status> option of OpenVPN. Since OpenVPN can write two different formats, you need to set the required format, too. This is done by setting B<--status-version> to B<2>. So, in a nutshell you need: openvpn $OTHER_OPTIONS \ --status "/var/run/openvpn-status" 10 \ --status-version 2 Available options: =over 4 =item B I Specifies the location of the status file. =item B B|B When enabled, the filename of the status file will be used as plugin instance and the client's "common name" 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. =item B B|B Sets whether or not statistics about the compression used by OpenVPN should be collected. This information is only available in I mode. Enabled by default. =item B B|B 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 B. =item B B|B When enabled, the number of currently connected clients or users is collected. This is especially interesting when B is disabled, but can be configured independently from that option. Defaults to B. =back =head2 Plugin C The "oracle" plugin uses the Oracle® Call Interface I<(OCI)> to connect to an Oracle® Database and lets you execute SQL statements there. It is very similar to the "dbi" plugin, because it was written around the same time. See the "dbi" plugin's documentation above for details. Statement "SELECT category, COUNT(*) AS value FROM products WHERE in_stock = 0 GROUP BY category" Type "gauge" # InstancePrefix "foo" InstancesFrom "category" ValuesFrom "value" ConnectID "db01" Username "oracle" Password "secret" Query "out_of_stock" =head3 B blocks The Query blocks are handled identically to the Query blocks of the "dbi" plugin. Please see its documentation above for details on how to specify queries. =head3 B blocks Database blocks define a connection to a database and which queries should be sent to that database. Each database needs a "name" as string argument in the starting tag of the block. This name will be used as "PluginInstance" in the values submitted to the daemon. Other than that, that name is not used. =over 4 =item B I Defines the "database alias" or "service name" to connect to. Usually, these names are defined in the file named C<$ORACLE_HOME/network/admin/tnsnames.ora>. =item B I Hostname to use when dispatching values for this database. Defaults to using the global hostname of the I instance. =item B I Username used for authentication. =item B I Password used for authentication. =item B I Associates the query named I with this database connection. The query needs to be defined I this statement, i.Ee. all query blocks you want to refer to must be placed above the database block you want to refer to them from. =back =head2 Plugin C This plugin embeds a Perl-interpreter into collectd and provides an interface to collectd's plugin system. See L for its documentation. =head2 Plugin C The I receives profiling information from I, an extension for the I interpreter. At the end of executing a script, i.e. after a PHP-based webpage has been delivered, the extension will send a UDP 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. Synopsis: 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" The plugin provides the following configuration options: =over 4 =item B
I Configures the address used to open a listening socket. By default, plugin will bind to the I address C<::0>. =item B I Configures the port (service) to bind to. By default the default Pinba port "30002" will be used. The option accepts service names in addition to port numbers and thus requires a I argument. =item EB IE 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 B 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. =over 4 =item B I Matches the hostname of the system the webserver / script is running on. This will contain the result of the L system call. If not configured, all hostnames will be accepted. =item B I Matches the name of the I, i.e. the contents of the C<$_SERVER["SERVER_NAME"]> variable when within PHP. If not configured, all server names will be accepted. =item B