X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcollectd.conf.pod;h=c5d7400a8e0c0af50c13e204d397998b16b96bb2;hb=33e60ef35f745c56b1a5936272b1dd8b0cf63d12;hp=284c36c4dea93d7ff66f6167a16fd8da4d527930;hpb=d8e1728e5198087a77ecae83fcd8d63f6d4aad54;p=collectd.git diff --git a/src/collectd.conf.pod b/src/collectd.conf.pod index 284c36c4..c5d7400a 100644 --- a/src/collectd.conf.pod +++ b/src/collectd.conf.pod @@ -7,11 +7,15 @@ collectd.conf - Configuration for the system statistics collection daemon B + Interval 3600 + + LoadPlugin ping - Host "example.org" Host "provider.net" @@ -25,22 +29,32 @@ controls which plugins to load. These plugins ultimately define collectd's behavior. The syntax of this config file is similar to the config file of the famous -B. Each line contains either a key-value-pair or a -section-start or -end. Empty lines and everything after the hash-symbol `#' is -ignored. Values are either string, enclosed in double-quotes, -(floating-point-)numbers or a boolean expression, i.Ee. either B or -B. String containing of only alphanumeric characters and underscores do -not need to be quoted. Lines may be wrapped by using `\' 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.Ee. 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, the C option B occur -B the CPlugin ...E> block. +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, the C option B occur B +the appropriate CPlugin ...E> block. =head1 GLOBAL OPTIONS @@ -63,6 +77,7 @@ options are allowed inside a B block: Globals true + Interval 10 =over 4 @@ -86,9 +101,15 @@ 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 I +=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 @@ -98,6 +119,15 @@ use statements like the following: Include "/etc/collectd.d/*.conf" +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 following statement is similar to the example above but includes all files +matching C<*.conf> in any subdirectory of C: + + Include "/etc/collectd.d" "*.conf" + 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 @@ -276,11 +306,72 @@ aggregations. The following options are valid inside B blocks: Selects the value lists to be added to this aggregation. B must be a valid data set name, see L for details. +If the string starts with and ends with a slash (C), the string is +interpreted as a I. The regex flavor used are POSIX +extended regular expressions as described in L. Example usage: + + Host "/^db[0-9]\\.example\\.com$/" + =item B B|B|B|B Group valued by the specified field. The B option may be repeated to group by multiple fields. +=item B I + +=item B I + +=item B I + +=item B I + +Sets the appropriate part of the identifier to the provided string. + +The I should include the placeholder C<%{aggregation}> which +will be replaced with the aggregation function, e.g. "average". Not including +the placeholder will result in duplication warnings and/or messed up values if +more than one aggregation function are enabled. + +The following example calculates the average usage of all "even" CPUs: + + + + Plugin "cpu" + PluginInstance "/[0,2,4,6,8]$/" + Type "cpu" + + SetPlugin "cpu" + SetPluginInstance "even-%{aggregation}" + + GroupBy "Host" + GroupBy "TypeInstance" + + CalculateAverage true + + + +This will create the files: + +=over 4 + +=item + +foo.example.com/cpu-even-average/cpu-idle + +=item + +foo.example.com/cpu-even-average/cpu-system + +=item + +foo.example.com/cpu-even-average/cpu-user + +=item + +... + +=back + =item B B|B =item B B|B @@ -320,6 +411,8 @@ possibly filtering or messages. # Persistent false # Format "command" # StoreRates false + # GraphitePrefix "collectd." + # GraphiteEscapeChar "_" # Receive values from an AMQP broker @@ -409,7 +502,7 @@ mode will be used, i.e. delivery is guaranteed. If set to B (the default), the I delivery mode will be used, i.e. messages may be lost due to high load, overflowing queues or similar issues. -=item B B|B (Publish only) +=item B B|B|B (Publish only) Selects the format in which messages are sent to the broker. If set to B (the default), values are sent as C commands which are @@ -420,6 +513,10 @@ If set to B, the values are encoded in the I, an easy and straight forward exchange format. The C header field will be set to C. +If set to B, values are encoded in the I format, which is +" \n". The C header field will be set to +C. + A subscribing client I use the C header field to determine how to decode the values. Currently, the I itself can only decode the B format. @@ -434,6 +531,25 @@ using the internal value cache. Please note that currently this option is only used if the B option has been set to B. +=item B (Publish and B=I only) + +A prefix can be added in the metric name when outputting in the I format. +It's added before the I name. +Metric name will be "" + +=item B (Publish and B=I only) + +A postfix can be added in the metric name when outputting in the I format. +It's added after the I name. +Metric name will be "" + +=item B (Publish and B=I only) + +Specify a character to replace dots (.) in the host part of the metric name. +In I metric name, dots are used as separators between different +metric parts (host, plugin, type). +Default is "_" (I). + =back =head2 Plugin C @@ -525,6 +641,12 @@ B can handle it. TCP-Port to connect to. Defaults to B<3551>. +=item B B + +If set to B, the time reported in the C metric will be +converted to seconds. This is the recommended setting. If set to B, the +default for backwards compatibility, the time will be reported in minutes. + =back =head2 Plugin C @@ -2049,6 +2171,17 @@ The C connects to a memcached server and queries statistics about cache utilization, memory and bandwidth used. L + + + Host "memcache.example.com" + Port 11211 + + + +The plugin configuration consists of one or more B blocks which +specify one I connection each. Within the B blocks, the +following options are allowed: + =over 4 =item B I @@ -2059,6 +2192,11 @@ Hostname to connect to. Defaults to B<127.0.0.1>. TCP-Port to connect to. Defaults to B<11211>. +=item B I + +Connect to I using the UNIX domain socket at I. If this +setting is given, the B and B settings are ignored. + =back =head2 Plugin C @@ -3153,6 +3291,16 @@ 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 @@ -3560,6 +3708,13 @@ which are available in a PostgreSQL database or use future or special statistics provided by PostgreSQL without the need to upgrade your collectd installation. +Starting with version 5.2, the C plugin supports writing data to +PostgreSQL databases as well. This has been implemented in a generic way. You +need to specify an SQL 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. + The B manual can be found at L. @@ -3589,6 +3744,11 @@ L. + + Statement "SELECT collectd_insert($1, $2, $3, $4, $5, $6, $7, $8, $9);" + StoreRates true + + Host "hostname" Port "5432" @@ -3605,6 +3765,12 @@ L. Query backend # predefined Query rt36_tickets + + + # ... + Writer sqlstore + CommitInterval 10 + The B block defines one database query which may later be used by a @@ -3653,6 +3819,11 @@ used, the parameter expands to "localhost". The name of the database of the current connection. +=item I + +The name of the database plugin instance. See the B option of the +database specification below for details. + =item I The username used to connect to the database. @@ -3766,6 +3937,101 @@ This query collects the on-disk size of the database in bytes. =back +In addition, the following detailed queries are available by default. Please +note that each of those queries collects information B, thus, +potentially producing B of data. For details see the description of the +non-by_table queries above. + +=over 4 + +=item B + +=item B + +=item B + +=item B + +=back + +The B 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 B specification in order to activate the writer instance. The +names of all writers have to be unique. The following options may be +specified: + +=over 4 + +=item B I + +This mandatory option specifies the SQL statement that will be executed for +each submitted value. A single SQL statement is allowed only. Anything after +the first semicolon will be ignored. + +Nine parameters will be passed to the statement and should be specified as +tokens B<$1>, B<$2>, through B<$9> in the statement string. The following +values are made available through those parameters: + +=over 4 + +=item B<$1> + +The timestamp of the queried value as a floating point number. + +=item B<$2> + +The hostname of the queried value. + +=item B<$3> + +The plugin name of the queried value. + +=item B<$4> + +The plugin instance of the queried value. This value may be B if there +is no plugin instance. + +=item B<$5> + +The type of the queried value (cf. L). + +=item B<$6> + +The type instance of the queried value. This value may be B if there is +no type instance. + +=item B<$7> + +An array of names for the submitted values (i.Ee., the name of the data +sources of the submitted value-list). + +=item B<$8> + +An array of types for the submitted values (i.Ee., the type of the data +sources of the submitted value-list; C, C, ...). Note, that if +B is enabled (which is the default, see below), all types will be +C. + +=item B<$9> + +An array of the submitted values. The dimensions of the value name and value +arrays match. + +=back + +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 "Server Programming" in the PostgreSQL manual +for details). + +=item B B|B + +If set to B (the default), convert counter values to rates. If set to +B counter values are stored as is, i.Ee. as an increasing integer +number. + +=back + The B 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 @@ -3781,6 +4047,17 @@ for details. Specify the interval with which the database should be queried. The default is to use the global B setting. +=item B I + +This option may be used for database connections which have "writers" 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. + =item B I Specify the hostname or IP of the PostgreSQL server to connect to. If the @@ -3811,6 +4088,13 @@ Specify the password to be used when connecting to the server. Specify whether to use an SSL connection when contacting the server. The following modes are supported: +=item B I + +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 to query multiple databases of the same name on the same host (e.g. +when running multiple database server versions in parallel). + =over 4 =item I @@ -3846,11 +4130,36 @@ B for details. =item B I -Specify a I which should be executed for the database connection. This -may be any of the predefined or user-defined queries. If no such option is -given, it defaults to "backends", "transactions", "queries", "query_plans", -"table_states", "disk_io" and "disk_usage". Else, the specified queries are -used only. +Specifies a I 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 "backends", "transactions", "queries", +"query_plans", "table_states", "disk_io" and "disk_usage" (unless a B +has been specified). Else, the specified queries are used only. + +=item B I + +Assigns the specified I 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 "FILTER CONFIGURATION" +below for details on how to selectively send data to certain plugins). + +Each writer will register a flush callback which may be used when having long +transactions enabled (see the B option above). When issuing +the B command (see L for details) the current +transaction will be committed right away. Two different kinds of flush +callbacks are available with the C plugin: + +=over 4 + +=item B + +Flush all writer backends. + +=item BI + +Flush all writers of the specified I only. + +=back =back @@ -4171,6 +4480,10 @@ The B option is the TCP 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. +=item B I + +Use I to authenticate when connecting to I. + =item B I The B option set the socket timeout for node response. Since the Redis @@ -4228,6 +4541,50 @@ Enables or disables the creation of RRD files. If the daemon is not running locally, or B is set to a relative path, this will not work as expected. Default is B. +=item B I + +B 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 C, the +C or when the daemon is set up to receive data from other hosts. + +=item B I + +B the heartbeat of newly created RRD-files. This setting should be unset +in which case the heartbeat is set to twice the B 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. + +=item B I + +The C calculates the number of PDPs per CDP based on the +B, this setting and a timespan. This plugin creates RRD-files with +three times five RRAs, i. e. five RRAs with the CFs B, B, and +B. The five RRAs are optimized for graphs covering one hour, one day, one +week, one month, and one year. + +So for each timespan, it calculates how many PDPs need to be consolidated into +one CDP by calculating: + number of PDPs = timespan / (stepsize * rrarows) + +Bottom line is, set this no smaller than the width of you graphs in pixels. The +default is 1200. + +=item B I + +Adds an RRA-timespan, given in seconds. Use this option multiple times to have +more then one RRA. If this option is never used, the built-in default of (3600, +86400, 604800, 2678400, 31622400) is used. + +For more information on how RRA-sizes are calculated see B above. + +=item B I + +Set the "XFiles Factor". The default is 0.1. If unsure, don't set this option. +I must be in the range C<[0.0-1.0)>, i.e. between zero (inclusive) and +one (exclusive). + =back =head2 Plugin C @@ -4285,6 +4642,8 @@ For more information on how RRA-sizes are calculated see B above. =item B I Set the "XFiles Factor". The default is 0.1. If unsure, don't set this option. +I must be in the range C<[0.0-1.0)>, i.e. between zero (inclusive) and +one (exclusive). =item B I @@ -4400,6 +4759,11 @@ and available space of each device will be reported separately. This option is only available if the I can read C (under Linux) or use the L mechanism (under I). +=item B B|B + +When enabled, the I is reported in bytes. When disabled, the default, +I is reported in pages. This option is available under Linux only. + =back =head2 Plugin C @@ -5030,7 +5394,7 @@ number. If set to B, the plugin instance and type instance will be in their own path component, for example C. If set to B (the default), the plugin and plugin instance (and likewise the type and type -instance) are put into once component, for example C. +instance) are put into one component, for example C. =item B B|B