X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcollectd.conf.pod;h=48b75bc82f9cfa6a32e263c950dc108bbd67c915;hb=04b395325b152a5ddf424d1a750f455a2f8229fb;hp=9ce2ae92c424f7b11d385bd30b19ab51d14024d7;hpb=55a46b483726014b91bc7e741d95a84a611b28c2;p=collectd.git diff --git a/src/collectd.conf.pod b/src/collectd.conf.pod index 9ce2ae92..48b75bc8 100644 --- a/src/collectd.conf.pod +++ b/src/collectd.conf.pod @@ -126,6 +126,14 @@ The sample config file that is installed with Cinstall> includes a line which sets this option, though, so that default installations will have this setting enabled. +=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 @@ -257,6 +265,150 @@ and are checked by default depends on the distribution you use. =back +=head2 Plugin C + +Starting with BIND 9.5.0, the most widely used DNS server software provides +extensive statistics about queries, responses and lots of other information. +The bind plugin retrieves this information that's encoded in XML and provided +via HTTP and submits the values to collectd. + +To use this plugin, you first need to tell BIND to make this information +available. This is done with the C configuration option: + + statistics-channels { + inet localhost port 8053; + }; + +The configuration follows the grouping that can be seen when looking at the +data with an XSLT 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. + +Synopsis: + + + URL "http://localhost:8053/" + OpCodes true + QTypes true + + ServerStats true + ZoneMaintStats true + ResolverStats false + MemoryStats true + + + QTypes true + ResolverStats true + CacheRRSets true + + Zone "127.in-addr.arpa/IN" + + + +The bind plugin accepts the following configuration options: + +=over 4 + +=item B I + +URL from which to retrieve the XML data. If not specified, +C will be used. + +=item B I|I + +When enabled, statistics about the I<"OpCodes">, for example the number of +C packets, are collected. + +Default: Enabled. + +=item B I|I + +When enabled, the number of I queries by query types (for example +C, C, C) is collected. + +Default: Enabled. + +=item B I|I + +Collect global server statistics, such as requests received over IPv4 and IPv6, +successful queries, and failed updates. + +Default: Enabled. + +=item B I|I + +Collect zone maintenance statistics, mostly information about notifications +(zone updates) and zone transfers. + +Default: Enabled. + +=item B I|I + +Collect resolver statistics, i.Ee. statistics about outgoing requests +(e.Eg. queries over IPv4, lame servers). Since the global resolver +counters apparently were removed in BIND 9.5.1 and 9.6.0, this is disabled by +default. Use the B option within a B block +instead for the same functionality. + +Default: Disabled. + +=item B + +Collect global memory statistics. + +Default: Enabled. + +=item B I + +Collect statistics about a specific I<"view">. BIND can behave different, +mostly depending on the source IP-address of the request. These different +configurations are called "views". If you don't use this feature, you most +likely are only interested in the C<_default> view. + +Within a EBEIE block, you can specify which +information you want to collect about a view. If no B block is +configured, no detailed view statistics will be collected. + +=over 4 + +=item B I|I + +If enabled, the number of I queries by query type (e.Eg. C, +C) is collected. + +Default: Enabled. + +=item B I|I + +Collect resolver statistics, i.Ee. statistics about outgoing requests +(e.Eg. queries over IPv4, lame servers). + +Default: Enabled. + +=item B I|I + +If enabled, the number of entries (I<"RR sets">) 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.Eg. "!A". + +Default: Enabled. + +=item B I + +When given, collect detailed information about the given zone in the view. The +information collected if very similar to the global B information +(see above). + +You can repeat this option to collect detailed information about multiple +zones. + +By default no detailed zone information is collected. + +=back + +=back + =head2 Plugin C This plugin doesn't have any options. It reads @@ -273,6 +425,9 @@ installed and an "cpu governor" (that's a kernel module) is loaded. Set the directory to store CSV-files under. Per default CSV-files are generated beneath the daemon's working directory, i.Ee. the B. +The special strings B and B 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. =item B B @@ -282,12 +437,87 @@ number. =back +=head2 Plugin C + +The curl plugin uses the B (L) to read web pages +and the match infrastructure (the same code used by the tail plugin) to use +regular expressions with the received data. + +The following example will read the current value of AMD stock from google's +finance page and dispatch the value to collectd. + + + + URL "http://finance.google.com/finance?q=NYSE%3AAMD" + User "foo" + Password "bar" + + Regex "]*> *([0-9]*\\.[0-9]+) *" + DSType "GaugeAverage" + # Note: `stock_value' is not a standard type. + Type "stock_value" + Instance "AMD" + + + + +In the B block, there may be one or more B blocks, each defining +a web page and one or more "matches" to be performed on the returned data. The +string argument to the B block is used as plugin instance. + +The following options are valid within B blocks: + +=over 4 + +=item B I + +URL 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 ;) + +=item B I + +Username to use if authorization is required to read the page. + +=item B I + +Password to use if authorization is required to read the page. + +=item B B|B + +Enable or disable peer SSL certificate verification. See +L for details. Enabled by default. + +=item B 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. + +=item BMatchE> + +One or more B blocks that define how to match information in the data +returned by C. The C plugin uses the same infrastructure that's +used by the C plugin, so please see the documentation of the C +plugin below on how matches are defined. + +=back + =head2 Plugin C -This plugin uses the "B" library (L) to -connect to various databases, execute SQL statements and read back the results. -You can configure how each column is to be interpreted and the plugin will -generate one data set from each row returned according to these rules. +This plugin uses the B library (L) to +connect to various databases, execute I statements and read back the +results. I is an acronym for "database interface" 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. Because the plugin is very generic, the configuration is a little more complex than those of other plugins. It usually looks something like this: @@ -295,9 +525,14 @@ than those of other plugins. It usually looks something like this: Statement "SELECT category, COUNT(*) AS value FROM products WHERE in_stock = 0 GROUP BY category" - Type "gauge" - InstancesFrom "category" - ValuesFrom "value" + # Use with MySQL 5.0.0 or later + MinVersion 50000 + + Type "gauge" + InstancePrefix "out_of_stock" + InstancesFrom "category" + ValuesFrom "value" + Driver "mysql" @@ -310,8 +545,8 @@ than those of other plugins. It usually looks something like this: -The configuration above defines one query and one database. The query is then -linked to the database with the B option I the +The configuration above defines one query with one result and one database. The +query is then linked to the database with the B option I the BDatabaseE> block. You can have any number of queries and databases and you can also use the B statement to split up the configuration file in multiple, smaller files. However, the BQueryE> block I @@ -322,10 +557,35 @@ The following is a complete list of options: =head3 B blocks -Query blocks define SQL statements and how the returned data should be +Query blocks define I 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. +not used in collectd. + +In each B block, there is one or more B blocks. B blocks +define which column holds which value or instance information. You can use +multiple B 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. + +Example: + + + Statement "select station, temperature, humidity from environment" + + Type "temperature" + # InstancePrefix "foo" + InstancesFrom "station" + ValuesFrom "temperature" + + + Type "humidity" + InstancesFrom "station" + ValuesFrom "humidity" + + + +The following options are accepted: =over 4 @@ -346,6 +606,38 @@ like this: use a more strict database server, you may have to select from a dummy table or something.) +=item B I + +=item B I + +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. + +The database version is determined by C, see the +L +for details. Basically, each part of the version is assumed to be in the range +from B<00> to B<99> and all dots are removed. So version "4.1.2" becomes +"40102", version "5.0.42" becomes "50042". + +B The plugin will use B matching queries, so if you specify +multiple queries with the same name and B ranges, weird stuff will +happen. Don't to it! A valid example would be something along these lines: + + MinVersion 40000 + MaxVersion 49999 + ... + MinVersion 50000 + MaxVersion 50099 + ... + MinVersion 50100 + # No maximum + +In the above example, there are three ranges that don't overlap. The last one +goes from version "5.1.0" to infinity, meaning "all later versions". Versions +before "4.0.0" are not specified. + =item B I The B that's used for each line returned. See L for more @@ -357,15 +649,28 @@ If you specify "temperature" here, you need exactly one gauge column. If you specify "if_octets", you will need two counter columns. See the B setting below. +There must be exactly one B option inside each B block. + +=item B I + +Prepends I to the type instance. If B (see below) is not +given, the string is simply copied. If B is given, I and +all strings returned in the appropriate columns are concatenated together, +separated by dashes I<("-")>. + =item B I [I ...] -Specifies the columns whose values will be used to create the "TypeInstance" -for each row. You need to specify at least one column for each query. If you -specify more than one column, the value of all columns will be join together -with the hyphen as separation character. +Specifies the columns whose values will be used to create the "type-instance" +for each row. If you specify more than one column, the value of all columns +will be joined together with dashes I<("-")> as separation characters. The plugin itself does not check whether or not all built instances are -different. It's your responsibility to assure that each is unique. +different. It's your responsibility to assure that each is unique. This is +especially true, if you do not specify B: B have to make +sure that only one row is returned in this case. + +If neither B nor B is given, the type-instance +will be empty. =item B I [I ...] @@ -380,6 +685,8 @@ 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). +There must be at least one B option inside each B block. + =back =head3 B blocks @@ -652,97 +959,6 @@ Controls whether or not to recurse into subdirectories. Enabled by default. =back -=head2 Plugin C - -This plugin allows you to filter and rewrite value lists based on -Perl-compatible regular expressions whose syntax and semantics are as close as -possible to those of the Perl 5 language. See L for details. - - - - Host "^mail\d+$" - Plugin "^tcpconns$" - TypeInstance "^SYN_" - - Action NoWrite - - - - Plugin "^sensors$" - PluginInstance "^Some Weird Sensor Chip Name Prefix" - - SubstitutePluginInstance "foo" - - - -The configuration consists of one or more C blocks, each of which -specifies a regular expression identifying a set of value lists and how to -handle successful matches. A value list keeps the values of a single data-set -and is identified by the tuple (host, plugin, plugin instance, type, type -instance). The plugin and type instances are optional components. If they are -missing they are treated as empty strings. Within those blocks, the following -options are recognized: - -=over 4 - -=item B I - -=item B I - -=item B I - -=item B I - -=item B I - -Specifies the regular expression for each component of the identifier. If any -of these options is missing it is interpreted as a pattern which matches any -string. All five components of a value list have to match the appropriate -regular expression to trigger the specified action. - -=item B I|I|I - -Specify how to handle successful matches: - -=over 4 - -=item B - -Do not send the value list to any output (a.k.a. write) plugins. - -=item B - -Skip threshold checking for this value list. - -=item B - -Completely ignore this value list. - -=back - -Two or more actions may be combined by specifying multiple B options. - -=item B I - -=item B I - -=item B I - -=item B I - -=item B I - -Upon a successful match, the matching substring will be replaced by the -specified I text. These options require that an appropriate regex -has been specified before, e.Eg. B requires that the -B option has been specified before. - -B: It is not recommended to modify the type unless you really know what -you are doing. The type is used to identify the data-set definition of the -dispatched values. - -=back - =head2 Plugin C To get values from B collectd connects to B (127.0.0.1), @@ -867,6 +1083,65 @@ and all other interrupts are collected. =back +=head2 Plugin C + +Synopsis: + + + JVMArg "-verbose:jni" + JVMArg "-Djava.class.path=/opt/collectd/lib/collectd/bindings/java" + LoadPlugin "org.collectd.java.Foobar" + + # To be parsed by the plugin + + + +Available config options: + +=over 4 + +=item B I + +Argument that is to be passed to the I (JVM). This works +exactly the way the arguments to the I binary on the command line work. +Execute C--help> for details. + +=item B I + +Instantiates a new I object. The following methods of this class are +used when available: + +=over 4 + +=item * + +public int B (org.collectd.api.OConfigItem ci) + +=item * + +public int B () + +=item * + +public int B () + +=item * + +public int B (org.collectd.protocol.ValueList vl) + +=item * + +public int B () + +=back + +=item B I + +The entrie block is passed to the Java plugin as an +I object. + +=back + =head2 Plugin C This plugin allows CPU, disk and network load to be collected for virtualized @@ -969,6 +1244,10 @@ Prefix all lines printed by the current time. Defaults to B. =back +B: There is no need to notify the daemon after moving or removing the +log file (e.Eg. when rotating the logs). The plugin reopens the file +for each line it writes. + =head2 Plugin C The C uses mbmon to retrieve temperature, voltage, etc. @@ -1019,12 +1298,12 @@ database 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 complaint loudly in case anything goes wrong. -This plugin issues C and evaluates C, -C and C which correspond to F, -F and F. Also, the values of -C are put in F and values of C are put -in F. Please refer to the B, -I<5.2.4. Server Status Variables> for an explanation of these values. +This plugin issues the MySQL 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. Use the following options to configure the plugin: @@ -1036,7 +1315,9 @@ Hostname of the database server. Defaults to B. =item B I -Username to use when connecting to the database. +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). +Any existing MySQL user will do. =item B I @@ -1272,6 +1553,61 @@ 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 @@ -1361,14 +1697,40 @@ 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 probmise. So in -short: If it works for you: Great! But kaap in mind that the config I +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 + +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. + +=back + =head2 Plugin C -The "oracle" plugin uses the Oracle® Call Interface (OCI) to connect to an +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. @@ -1376,9 +1738,12 @@ plugin's documentation above for details. Statement "SELECT category, COUNT(*) AS value FROM products WHERE in_stock = 0 GROUP BY category" - Type "gauge" - InstancesFrom "category" - ValuesFrom "value" + + Type "gauge" + # InstancePrefix "foo" + InstancesFrom "category" + ValuesFrom "value" + ConnectID "db01" @@ -1468,10 +1833,28 @@ L. - Query "SELECT magic, spells FROM wizard WHERE host = $1;" + Statement "SELECT magic FROM wizard WHERE host = $1;" Param hostname - Column gauge magic - Column counter spells + + Type gauge + InstancePrefix "magic" + ValuesFrom magic + + + + + Statement "SELECT COUNT(type) AS count, type \ + FROM (SELECT CASE \ + WHEN resolved = 'epoch' THEN 'open' \ + ELSE 'resolved' END AS type \ + FROM tickets) type \ + GROUP BY type;" + + Type counter + InstancePrefix "rt36_tickets" + InstancesFrom "type" + ValuesFrom "count" + @@ -1483,23 +1866,33 @@ L. KRBSrvName "kerberos_service_name" Query magic + Service "service_name" + Query backend # predefined + Query rt36_tickets The B 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. The -following configuration options are available to define the query: +the name of the query. The names of all queries have to be unique (see the +B and B options below for an exception to this +rule). The following configuration options are available to define the query: + +In each B block, there is one or more B blocks. B +blocks define how to handle the values returned from the query. They define +which column holds which value and how to dispatch that value to the daemon. +Multiple B blocks may be used to extract multiple values from a single +query. =over 4 -=item B I +=item B I -Specify the I which the plugin should execute. The string may -contain the tokens B<$1>, B<$2>, etc. which are used to reference the first, -second, etc. parameter. The value of the parameters is specified by the +Specify the I which the plugin should execute. The string +may contain the tokens B<$1>, B<$2>, etc. which are used to reference the +first, second, etc. parameter. The value of the parameters is specified by the B configuration option - see below for details. To include a literal B<$> character followed by a number, surround it with single quotes (B<'>). @@ -1507,7 +1900,14 @@ Any SQL command which may return data (such as C