X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcollectd.conf.pod;h=00f56e7f3281541204edddb83ccb3897c1cde446;hb=a2ef6243e563dae68c71d58c1d9af924a5817e5a;hp=447870d7069b0792548cd97f2f84cc1042d8e261;hpb=36c6683fe0b8bb653339f3c854a18276344e4ac0;p=collectd.git diff --git a/src/collectd.conf.pod b/src/collectd.conf.pod index 447870d7..00f56e7f 100644 --- a/src/collectd.conf.pod +++ b/src/collectd.conf.pod @@ -32,9 +32,11 @@ ignored. Values are either string, enclosed in double-quotes, B. String containing of only alphanumeric characters and underscores do not need to be quoted. -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. +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. =head1 GLOBAL OPTIONS @@ -51,11 +53,26 @@ directory for the daemon. Loads the plugin I. There must be at least one such line or B will be mostly useless. -=item B I +=item B I -Includes the file I as if it was copy and pasted here. 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. +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" + +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. @@ -70,9 +87,10 @@ setting using the B<-P> command-line option. Path to the plugins (shared objects) of collectd. -=item B I +=item B I [I ...] -Set the file that contains the data-set descriptions. +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 @@ -282,7 +300,9 @@ output that is expected from it. =over 4 -=item B I[:[I]] I +=item B I[:[I]] I [IargE> [IargE> ...]] + +=item B I[:[I]] I [IargE> [IargE> ...]] Execute the executable I as user I. If the user name is followed by a colon and a group name, the effective group is set to that group. @@ -295,6 +315,15 @@ 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. +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. + +The B and B statements change the semantics of the +programs executed, i.Ee. the data passed to them and the response +expected from them. This is documented in great detail in L. + =back =head2 Plugin C @@ -318,6 +347,13 @@ Hostname to connect to. Defaults to B<127.0.0.1>. TCP-Port to connect to. Defaults to B<7634>. +=item B I|I + +If enabled, translate the disk names to major/minor device numbers +(e.Eg. "8-0" for /dev/sda). For backwards compatibility this defaults to +I but it's recommended to disable it as it will probably be removed in +the next major version. + =back =head2 Plugin C @@ -409,7 +445,8 @@ seconds. Setting this to be the same or smaller than the I will cause the list of domains and devices to be refreshed on every iteration. Refreshing the devices in particular is quite a costly operation, so if your -virtualization setup is static you might consider increasing this. +virtualization setup is static you might consider increasing this. If this +option is set to 0, refreshing is disabled completely. =item B I @@ -467,6 +504,9 @@ between, thus I<"foo:1234-1234-1234-1234">). Sets the log-level. If, for example, set to B, then all events with severity B, B, or B will be written to the logfile. +Please note that B is only available if collectd has been compiled with +debugging support. + =item B I Sets the file to write log messages to. The special strings B and @@ -918,6 +958,115 @@ Sets the log-level. If, for example, set to B, then all events with severity B, B, or B will be submitted to the syslog-daemon. +Please note that B is only available if collectd has been compiled with +debugging support. + +=back + +=head2 Plugin C + +The C plugins follows logfiles, just like L does, parses +each line and dispatches found values. What is matched can be configured by the +user using (extended) regular expressions, as described in L. + + + + Instance "exim" + + Regex "S=([1-9][0-9]*)" + DSType "CounterAdd" + Type "ipt_bytes" + Instance "total" + + + Regex "\\" + DSType "CounterInc" + Type "email_count" + Instance "local_user" + + + + +The config consists of one or more B blocks, each of which configures one +logfile to parse. Within each B block, there are one or more B +blocks, which configure a regular expression to search for. + +The B option in the B block may be used to set the plugin +instance. So in the above example the plugin name C would be used. +This plugin instance is for all B blocks that B it, until the +next B option. This way you can extract several plugin instances from +one logfile, handy when parsing syslog and the like. + +Each B block has the following options to describe how the match should +be performed: + +=over 4 + +=item B I + +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 +L or L, depending on the value of C, see +below. Because B regular expressions are used, you do not need to use +backslashes for subexpressions! If in doubt, please consult L. 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: + + Regex "SPAM \\(Score: (-?[0-9]+\\.[0-9]+)\\)" + +=item B I + +Sets how the values are cumulated. I is one of: + +=over 4 + +=item B + +Calculate the average. + +=item B + +Use the smallest number only. + +=item B + +Use the greatest number only. + +=item B + +Use the last number found. + +=item B + +The matched number is a counter. Simply sets the internal counter to this +value. + +=item B + +Add the matched value to the internal counter. + +=item B + +Increase the internal counter by one. This B is the only one that does +not use the matched subexpression, but simply counts the number of matched +lines. Thus, you may use a regular expression without submatch in this case. + +=back + +As you'd expect the B types interpret the submatch as a floating point +number, using L. The B and B interpret the +submatch as an integer using L. B does not use the +submatch at all and it may be omitted in this case. + +=item B I + +Sets the type used to dispatch this value. Detailed information about types and +their configuration can be found in L. + +=item B I + +This optional setting sets the type instance to use. + =back =head2 Plugin C @@ -1059,8 +1208,10 @@ information. - Min 0.00 - Max 1000.00 + WarningMin 0.00 + WarningMax 1000.00 + FailureMin 0.00 + FailureMax 1200.00 Invert false Instance "bar" @@ -1068,20 +1219,20 @@ information. Instance "eth0" - Max 10000000 + FailureMax 10000000 Instance "idle" - Min 10 + FailureMin 10 Instance "cached" - Min 100000000 + WarningMin 100000000 @@ -1101,21 +1252,29 @@ included in a C block. Currently the following statements are recognized: =over 4 -=item B I +=item B I + +=item B I Sets the upper bound of acceptable values. If unset defaults to positive -infinity. +infinity. If a value is greater than B a B notification +will be created. If the value is greater than B but less than (or +equal to) B a B notification will be created. + +=item B I -=item B I +=item B I Sets the lower bound of acceptable values. If unset defaults to negative -infinity. +infinity. If a value is less than B a B notification will +be created. If the value is less than B but greater than (or equal +to) B a B notification will be created. =item B B|B If set to B the range of acceptable values is inverted, i.Ee. -values between B and B are not okay. Defaults, of course, to -B. +values between B and B (B and +B) are not okay. Defaults to B. =item B B|B @@ -1136,6 +1295,7 @@ L, L, L, L, +L, L, L, L,