X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcollectd.conf.pod;h=a279d0b084b55944edfd0916de0eb86f87578de7;hb=442f435a3d57762d7db6ed23307e3e32478e68be;hp=569876908dcc2d9c532b3a75f8c3d6fde093dc06;hpb=aede1532622a544e16fbb3fbd1a096230f047745;p=collectd.git diff --git a/src/collectd.conf.pod b/src/collectd.conf.pod index 56987690..a279d0b0 100644 --- a/src/collectd.conf.pod +++ b/src/collectd.conf.pod @@ -409,6 +409,106 @@ By default no detailed zone information is collected. =back +=head2 Plugin C + +The couchdb plugin uses B (L) and B +(L) to collect values from CouchDB +documents (stored JSON notation). + +The following example will collect several values from the built-in `_stats' +runtime statistics module (L). + + + + Instance "httpd" + + Type "http_requests" + + + + Type "http_request_methods" + + + + Type "http_response_codes" + + + + +The following example will collect the status values from each database: + + + Instance "dbs" + + Type "gauge" + + + Type "counter" + + + Type "bytes" + + + +In the B block, there may be one or more B blocks, each defining +a URL to be fetched via HTTP (libcurl) and one or more B blocks. +The B string argument must be in a path format, of which is used to collect +a value from a JSON map object. If a B path element is that of a I<*> wildcard, +the values for all keys will be collectd. + +The following options are valid within B blocks: + +=over 4 + +=item B I + +Sets the plugin instance to I. + +=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. + +=back + +The following options are valid within B blocks: + +=over 4 + +=item B I + +Sets the type used to dispatch the values to the daemon. Detailed information +about types and their configuration can be found in L. This +option is mandatory. + +=item B I + +Type-instance to use. Defaults to the current map key or current string array element value. + +=back + =head2 Plugin C This plugin doesn't have any options. It reads @@ -454,7 +554,7 @@ finance page and dispatch the value to collectd. Regex "]*> *([0-9]*\\.[0-9]+) *" DSType "GaugeAverage" - # Note: `stock_value' is not a standard type. + # Note: `stock_value' is not a standard type. Type "stock_value" Instance "AMD" @@ -606,6 +706,9 @@ like this: use a more strict database server, you may have to select from a dummy table or something.) +Please note that some databases, for example B, will fail if you +include a semicolon at the end of the statement. + =item B I =item B I @@ -662,7 +765,7 @@ separated by dashes I<("-")>. 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 join together with the dashes I<("-")> as separation character. +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. This is @@ -818,6 +921,10 @@ may not work on certain platforms, such as MacEOSEX. Ignore packets that originate from this address. +=item B B|B + +Enabled by default, collects unknown (and thus presented as numeric only) query types. + =back =head2 Plugin C @@ -959,94 +1066,85 @@ Controls whether or not to recurse into subdirectories. Enabled by default. =back -=head2 Plugin C +=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. +The I plugin received the multicast traffic sent by B, the +statistics collection daemon of Ganglia. Mappings for the standard "metrics" +are built-in, custom mappings may be added via B blocks, see below. - - - Host "^mail\d+$" - Plugin "^tcpconns$" - TypeInstance "^SYN_" +Synopsis: - Action NoWrite - + + MCReceiveFrom "239.2.11.71" "8649" + + Type "swap" + TypeInstance "total" + DataSource "value" + + + Type "swap" + TypeInstance "free" + DataSource "value" + + - - Plugin "^sensors$" - PluginInstance "^Some Weird Sensor Chip Name Prefix" +The following metrics are built-in: - SubstitutePluginInstance "foo" - - +=over 4 -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: +=item * -=over 4 +load_one, load_five, load_fifteen -=item B I +=item * -=item B I +cpu_user, cpu_system, cpu_idle, cpu_nice, cpu_wio -=item B I +=item * -=item B I +mem_free, mem_shared, mem_buffers, mem_cached, mem_total -=item B I +=item * -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. +bytes_in, bytes_out -=item B I|I|I +=item * -Specify how to handle successful matches: +pkts_in, pkts_out -=over 4 +=back -=item B +Available configuration options: -Do not send the value list to any output (a.k.a. write) plugins. +=over 4 -=item B +=item B I [I] -Skip threshold checking for this value list. +Sets sets the multicast group and UDP port to which to subscribe. -=item B +Default: B<239.2.11.71>E/EB<8649> -Completely ignore this value list. +=item EB IE -=back +These blocks add a new metric conversion to the internal table. I, the +string argument to the B block, is the metric name as used by Ganglia. -Two or more actions may be combined by specifying multiple B options. +=over 4 -=item B I +=item B I -=item B I +Type to map this metric to. Required. -=item B I +=item B I -=item B I +Type-instance to use. Optional. -=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. +Data source to map this metric to. If the configured type has exactly one data +source, this is optional. Otherwise the option is required. -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 =back @@ -1176,19 +1274,23 @@ and all other interrupts are collected. =head2 Plugin C +The I plugin makes it possible to write extensions for collectd in Java. +This section only discusses the syntax and semantic of the configuration +options. For more in-depth information on the I plugin, please read +L. + Synopsis: JVMArg "-verbose:jni" JVMArg "-Djava.class.path=/opt/collectd/lib/collectd/bindings/java" LoadPlugin "org.collectd.java.Foobar" - # FIXME: The following is planned, but not finished! # To be parsed by the plugin -Available config options: +Available configuration options: =over 4 @@ -1198,30 +1300,31 @@ 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: +Please note that B these options must appear B (i.Ee. above) +any other options! When another option is found, the JVM will be started and +later options will have to be ignored! -=over 4 - -=item * - -public int B () - -=item * +=item B I -public int B () +Instantiates a new I object. The constructor of this object very +likely then registers one or more callback methods with the server. -=item * +See L for details. -public int B (org.collectd.protocol.ValueList vl) +When the first such option is found, the virtual machine (JVM) is created. This +means that all B options must appear before (i.Ee. above) all +B options! -=item * +=item B I -public int B () +The entire block is passed to the Java plugin as an +I object. -=back +For this to work, the plugin has to register a configuration callback first, +see L. This means, that the B block +must appear after the appropriate B block. Also note, that I +depends on the (Java) plugin registering the callback and is completely +independent from the I argument passed to B. =back @@ -1356,6 +1459,57 @@ TCP-Port to connect to. Defaults to B<411>. =back +=head2 Plugin C + +The C connects to a memcached server, queries one or more +given I and parses the returned data according to user specification. +The I used are the same as the matches used in the C and C +plugins. + +In order to talk to the memcached server, this plugin uses the I +library. Please note that there is another library with a very similar name, +libmemcache (notice the missing `d'), which is not applicable. + +Synopsis of the configuration: + + + + Server "localhost" + Key "page_key" + + Regex "(\\d+) bytes sent" + DSType CounterAdd + Type "ipt_octets" + Instance "type_instance" + + + + +The configuration options are: + +=over 4 + +=item EB IE + +Each B block defines one I to be queried from the memcached server. +The block requires one string argument which is used as I. + +=item B I
+ +Sets the server address to connect to when querying the page. Must be inside a +B block. + +=item B I + +When connected to the memcached server, asks for the page I. + +=item EBE + +Match blocks define which strings to look for and how matches substrings are +interpreted. For a description of match blocks, please see L<"Plugin tail">. + +=back + =head2 Plugin C The C connects to a memcached server and queries statistics @@ -1376,19 +1530,50 @@ TCP-Port to connect to. Defaults to B<11211>. =head2 Plugin C -The C requires B to be installed. It connects to the -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. +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 complaint 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 + -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. + + Host "localhost" + Socket "/var/run/mysql/mysqld.sock" + SlaveStats true + SlaveNotifications true + + -Use the following options to configure the plugin: +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 @@ -1428,6 +1613,17 @@ 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 + +=item B I + +Enable the collection of master / slave statistics in a replication setup. + +=item B I + +If enabled, the plugin sends a notification if the replication slave I/O and / +or SQL threads are not running. + =back =head2 Plugin C @@ -1509,32 +1705,119 @@ specified statistics will not be collected. =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 actived, 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. For example: + + + Server "collectd.internal.tld" + + 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 I [I] +=item B B|B|B -=item B I [I] +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. -The B statement sets the server to send datagrams B. The statement -may occur multiple times to send each datagram to multiple destinations. +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. + +=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. -If no B statement is found the server tries join both, the default IPv6 -multicast group and the default IPv4 multicast group. If no B statement -is found the client will try to send data to the IPv6 multicast group first. If -that fails the client will try the IPv4 multicast group. +The following options are recognized within CListenE> blocks: -The default IPv6 multicast group is C. The default IPv4 -multicast group is C<239.192.74.66>. +=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 -The optional I argument sets the port to use. It can either be given -using a numeric port number or a service name. If the argument is omitted the -default port B<25826> is assumed. +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. + +=back =item B I<1-255> @@ -1723,6 +2006,55 @@ 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. @@ -1772,6 +2104,11 @@ 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. +=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 @@ -1880,6 +2217,13 @@ to collectd's plugin system. See L for its documentation. =head2 Plugin C +The I plugin starts a new thread which sends ICMP "ping" packets to the +configured hosts periodically and measures the network latency. Whenever the +C function of the plugin is called, it submits the average latency, the +standard deviation and the drop rate for each host. + +Available configuration options: + =over 4 =item B I @@ -1887,6 +2231,26 @@ to collectd's plugin system. See L for its documentation. Host to ping periodically. This option may be repeated several times to ping multiple hosts. +=item B I + +Sets the interval in which to send ICMP echo packets to the configured hosts. +This is B the interval in which statistics are queries from the plugin but +the interval in which the hosts are "pinged". Therefore, the setting here +should be smaller than or equal to the global B setting. Fractional +times, such as "1.24" are allowed. + +Default: B<1.0> + +=item B I + +Time to wait for a response from the host to which an ICMP packet had been +sent. If a reply was not received after I seconds, the host is assumed +to be down or the packet to be dropped. This setting must be smaller than the +B setting above for the plugin to work correctly. Fractional +arguments are accepted. + +Default: B<0.9> + =item B I<0-255> Sets the Time-To-Live of generated ICMP packets. @@ -2373,6 +2737,39 @@ slashes. =back +=head2 Plugin C + +Collects a lot of information about various network protocols, such as I, +I, I, etc. + +Available configuration options: + +=over 4 + +=item B I + +Selects whether or not to select a specific value. The string being matched is +of the form "I:I", where I will be used as the +plugin instance and I will be used as type instance. An example of +the string being used would be C. + +You can use regular expressions to match a large number of values with just one +configuration option. To select all "extended" I values, you could use the +following statement: + + Value "/^TcpExt:/" + +Whether only matched values are selected or all matched values are ignored +depends on the B. By default, only matched values are selected. +If no value is configured at all, all values will be selected. + +=item B B|B + +If set to B, inverts the selection made by B, i.Ee. all +matching values will be ignored. + +=back + =head2 Plugin C The C plugin uses the RRDTool accelerator daemon, L, @@ -2578,9 +2975,109 @@ debugging support. =back +=head2 Plugin C + +The C
provides generic means to parse tabular data and dispatch +user specified values. Values are selected based on column numbers. For +example, this plugin may be used to get values from the Linux L +filesystem or CSV (comma separated values) files. + + +
+ Instance "slabinfo" + Separator " " + + Type gauge + InstancePrefix "active_objs" + InstancesFrom 0 + ValuesFrom 1 + + + Type gauge + InstancePrefix "objperslab" + InstancesFrom 0 + ValuesFrom 4 + +
+ + +The configuration consists of one or more B blocks, each of which +configures one file to parse. Within each B
block, there are one or +more B blocks, which configure which data to select and how to +interpret it. + +The following options are available inside a B
block: + +=over 4 + +=item B I + +If specified, I is used as the plugin instance. So, in the above +example, the plugin name C would be used. If omitted, the +filename of the table is used instead, with all special characters replaced +with an underscore (C<_>). + +=item B I + +Any character of I is interpreted as a delimiter between the different +columns of the table. A sequence of two or more contiguous delimiters in the +table is considered to be a single delimiter, i.Ee. there cannot be any +empty columns. The plugin uses the L function to parse the lines +of a table - see its documentation for more details. This option is mandatory. + +A horizontal tab, newline and carriage return may be specified by C<\\t>, +C<\\n> and C<\\r> respectively. Please note that the double backslashes are +required because of collectd's config parsing. + +=back + +The following options are available inside a B block: + +=over 4 + +=item B I + +Sets the type used to dispatch the values to the daemon. Detailed information +about types and their configuration can be found in L. This +option is mandatory. + +=item B I + +If specified, prepend I to the type instance. If omitted, only the +B option is considered for the type instance. + +=item B I [I ...] + +If specified, the content of the given columns (identified by the column +number starting at zero) will be used to create the type instance for each +row. Multiple values (and the instance prefix) will be joined together with +dashes (I<->) as separation character. If omitted, only the B +option is considered for the type instance. + +The plugin itself does not check whether or not all built instances are +different. It’s your responsibility to assure that each is unique. This is +especially true, if you do not specify B: B have to make +sure that the table only contains one row. + +If neither B nor B is given, the type instance +will be empty. + +=item B I [I ...] + +Specifies the columns (identified by the column numbers starting at zero) +whose content is used as the actual data for the data sets that are dispatched +to the daemon. How many such columns you need is determined by the B +setting above. If you specify too many or not enough columns, the plugin will +complain about that and no data will be submitted to the daemon. The plugin +uses L and L to parse counter and gauge values +respectively, so anything supported by those functions is supported by the +plugin as well. This option is mandatory. + +=back + =head2 Plugin C -The C plugins follows logfiles, just like L does, parses +The C 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. @@ -2717,6 +3214,37 @@ will be collected. =back +=head2 Plugin C + +The I plugin connects to a device of "The Energy Detective", a device to +measure power consumption. These devices are usually connected to a serial +(RS232) or USB port. The plugin opens a configured device and tries to read the +current energy readings. For more information on TED, visit +L. + +Available configuration options: + +=over 4 + +=item B I + +Path to the device on which TED is connected. collectd will need read and write +permissions on that file. + +Default: B + +=item B I + +Apparently reading from TED is not that reliable. You can therefore configure a +number of retries here. You only configure the I here, to if you +specify zero, one reading will be performed (but no retries if that fails); if +you specify three, a maximum of four readings are performed. Negative values +are illegal. + +Default: B<0> + +=back + =head2 Plugin C The C counts the number of currently established TCP @@ -3660,7 +4188,6 @@ L, L, L, L, -L, L, L, L,