X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcollectd.conf.pod;h=f7f178c093fb587ab087d0995fa94f7f4fb7b115;hb=c16c87053165a07fdeb6d5469085142ff87a2ecb;hp=d50f7ce57be60858782332c1d16740f19fe5981e;hpb=bd702098d986e4985fdf4f7f7658ff4532d96533;p=collectd.git diff --git a/src/collectd.conf.pod b/src/collectd.conf.pod index d50f7ce5..f7f178c0 100644 --- a/src/collectd.conf.pod +++ b/src/collectd.conf.pod @@ -30,7 +30,11 @@ 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. +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 @@ -122,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 @@ -232,6 +244,19 @@ Optional user name needed for authentication. 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 @@ -240,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 @@ -256,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 @@ -265,6 +437,316 @@ 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 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: + + + + Statement "SELECT category, COUNT(*) AS value FROM products WHERE in_stock = 0 GROUP BY category" + # Use with MySQL 5.0.0 or later + MinVersion 50000 + + Type "gauge" + InstancePrefix "out_of_stock" + InstancesFrom "category" + ValuesFrom "value" + + + + Driver "mysql" + DriverOption "host" "localhost" + DriverOption "username" "collectd" + DriverOption "password" "aZo6daiw" + DriverOption "dbname" "prod_info" + SelectDB "prod_info" + Query "out_of_stock" + + + +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 +precede the BDatabaseE> blocks, because the file is interpreted from +top to bottom! + +The following is a complete list of options: + +=head3 B blocks + +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. + +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 + +=item B I + +Sets the statement that should be executed on the server. This is B +interpreted by collectd, but simply passed to the database server. Therefore, +the SQL dialect that's used depends on the server collectd is connected to. + +The query has to return at least two columns, one for the instance and one +value. You cannot omit the instance, even if the statement is guaranteed to +always return exactly one line. In that case, you can usually specify something +like this: + + Statement "SELECT \"instance\", COUNT(*) AS value FROM table" + +(That works with MySQL but may not be valid SQL according to the spec. If you +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 + +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 +details on how types are defined. In short: A type is a predefined layout of +data and the number of values and type of values has to match the type +definition. + +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 "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. + +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 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 ...] + +Names the columns 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 actual data type in the columns is not that important. The plugin will +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 + +Database blocks define a connection to a database and which queries should be +sent to that database. Since the used "dbi" library can handle a wide variety +of databases, the configuration is very generic. If in doubt, refer to libdbi's +documentationE- we stick as close to the terminology used there. + +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 + +Specifies the driver to use to connect to the database. In many cases those +drivers are named after the database they can connect to, but this is not a +technical necessity. These drivers are sometimes referred to as "DBD", +BataBase Briver, and some distributions ship them in separate +packages. Drivers for the "dbi" library are developed by the B +project at L. + +You need to give the driver name as expected by the "dbi" library here. You +should be able to find that in the documentation for each driver. If you +mistype the driver name, the plugin will dump a list of all known driver names +to the log. + +=item B I I + +Sets driver-specific options. What option a driver supports can be found in the +documentation for each driver, somewhere at +L. However, the options "host", +"username", "password", and "dbname" seem to be deEfacto standards. + +Unfortunately, drivers are not too keen to report errors when an unknown option +is passed to them, so invalid settings here may go unnoticed. This is not the +plugin's fault, it will report errors if it gets them from the libraryE/ +the driver. If a driver complains about an option, the plugin will dump a +complete list of all options understood by that driver to the log. + +=item B I + +In some cases, the database name you connect with is not the database name you +want to use for querying data. If this option is set, the plugin will "select" +(switch to) that database after the connection is established. + +=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 =over 4 @@ -403,6 +885,83 @@ expected from them. This is documented in great detail in L. =back +=head2 Plugin C + +The C plugin counts the number of files in a certain directory (and +its subdirectories) and their combined size. The configuration is very straight +forward: + + + + Instance "qmail-message" + + + Instance "qmail-todo" + + + Instance "php5-sessions" + Name "sess_*" + + + +The example above counts the number of files in QMail's queue directories and +the number of PHP5 sessions. Jfiy: The "todo" queue holds the messages that +QMail has not yet looked at, the "message" queue holds the messages that were +classified into "local" and "remote". + +As you can see, the configuration consists of one or more C blocks, +each of which specifies a directory in which to count the files. Within those +blocks, the following options are recognized: + +=over 4 + +=item B I + +Sets the plugin instance to I. That instance name must be unique, but +it's your responsibility, the plugin doesn't check for that. If not given, the +instance is set to the directory name with all slashes replaced by underscores +and all leading underscores removed. + +=item B I + +Only count files that match I, where I is a shell-like +wildcard as understood by L. Only the B is checked +against the pattern, not the entire path. In case this makes it easier for you: +This option has been named after the B<-name> parameter to L. + +=item B I + +Count only files of a specific age: If I is greater than zero, only files +that haven't been touched in the last I seconds are counted. If I is +a negative number, this is inversed. For example, if B<-60> is specified, only +files that have been modified in the last minute will be counted. + +The number can also be followed by a "multiplier" to easily specify a larger +timespan. When given in this notation, the argument must in quoted, i.Ee. +must be passed as string. So the B<-60> could also be written as B<"-1m"> (one +minute). Valid multipliers are C (second), C (minute), C (hour), C +(day), C (week), and C (year). There is no "month" multiplier. You can +also specify fractional numbers, e.Eg. B<"0.5d"> is identical to +B<"12h">. + +=item B I + +Count only files of a specific size. When I is a positive number, only +files that are at least this big are counted. If I is a negative number, +this is inversed, i.Ee. only files smaller than the absolute value of +I are counted. + +As with the B option, a "multiplier" may be added. For a detailed +description see above. Valid multipliers here are C (byte), C (kilobyte), +C (megabyte), C (gigabyte), C (terabyte), and C

(petabyte). Please +note that there are 1000 bytes in a kilobyte, not 1024. + +=item B I|I + +Controls whether or not to recurse into subdirectories. Enabled by default. + +=back + =head2 Plugin C To get values from B collectd connects to B (127.0.0.1), @@ -450,7 +1009,7 @@ similar interfaces. Thus, you can use the B-option to pick the interfaces you're interested in. Sometimes, however, it's easier/preferred to collect all interfaces I a few ones. This option enables you to do that: By setting B to I the effect of -B is inversed: All selected interfaces are ignored and all +B is inverted: All selected interfaces are ignored and all other interfaces are collected. =back @@ -471,6 +1030,20 @@ This option enables you to do that: By setting B to I the effect of B is inverted: All selected sensors are ignored and all other sensors are collected. +=item B I|I + +If a sensor appears after initialization time of a minute a notification +is sent. + +=item B I|I + +If a sensor disappears a notification is sent. + +=item B I|I + +If you have for example dual power supply and one of them is (un)plugged then +a notification is sent. + =back =head2 Plugin C @@ -508,7 +1081,7 @@ irqs. This may not be practical, especially if no interrupts happen. Thus, you can use the B-option to pick the interrupt you're interested in. Sometimes, however, it's easier/preferred to collect all interrupts I a few ones. This option enables you to do that: By setting B to -I the effect of B is inversed: All selected interrupts are ignored +I the effect of B is inverted: All selected interrupts are ignored and all other interrupts are collected. =back @@ -615,6 +1188,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. @@ -695,6 +1272,23 @@ Password needed to log into the database. 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. + =back =head2 Plugin C @@ -769,7 +1363,7 @@ Here are some examples to help you understand the above text more easily: The behaviour 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 inversed, i.Ee. the +B to B, this behavior is inverted, i.Ee. the specified statistics will not be collected. =back @@ -877,6 +1471,87 @@ 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. + +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 @@ -909,39 +1584,521 @@ L. =back -=head2 Plugin C +=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. +B See notes below. -=head2 Plugin C +The C plugin uses the B library from the B project +L to read sensors connected via the onewire bus. + +Currently only temperature sensors (sensors with the family code C<10>, +e.Eg. 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. + +Hubs (the DS2409 chips) are working, but read the note, why this plugin is +experimental, below. =over 4 -=item B I +=item B I -Host to ping periodically. This option may be repeated several times to ping -multiple hosts. +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. -=item B I<0-255> +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: -Sets the Time-To-Live of generated ICMP packets. + + Device "-s localhost:4304" + + +This directive is B and does not have a default value. + +=item B I + +Selects sensors to collect or to ignore, depending on B, see +below. Sensors are specified without the family byte at the beginning, to you'd +use C, and B include the leading C<10.> family byte and +point. + +=item B I|I + +If no configuration if 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. =back -=head2 Plugin C +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:) -The C plugin queries statistics from an authoritative PowerDNS -nameserver and/or a PowerDNS recursor. Since both offer a wide variety of -values, many of which are probably meaningless to most users, but may be useful -for some. So you may chose which values to collect, but if you don't, some -reasonable defaults will be collected. +=head2 Plugin C - - - Collect "latency" - Collect "udp-answers" "udp-queries" - Socket "/var/run/pdns.controlsocket" +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 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 + +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 + +=over 4 + +=item B I + +Host to ping periodically. This option may be repeated several times to ping +multiple hosts. + +=item B I<0-255> + +Sets the Time-To-Live of generated ICMP packets. + +=back + +=head2 Plugin C + +The C plugin queries statistics from PostgreSQL databases. It +keeps a persistent connection to all configured databases and tries to +reconnect if the connection has been interrupted. A database is configured by +specifying a B block as described below. The default statistics are +collected from PostgreSQL's B which thus has to be +enabled for this plugin to work correctly. This should usually be the case by +default. See the section "The Statistics Collector" of the B for details. + +By specifying custom database queries using a B block as described +below, you may collect any data that is available from some PostgreSQL +database. This way, you are able to access statistics of external daemons +which are available in a PostgreSQL database or use future or special +statistics provided by PostgreSQL without the need to upgrade your collectd +installation. + +The B manual can be found at +L. + + + + Statement "SELECT magic FROM wizard WHERE host = $1;" + Param hostname + + 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" + + + + + Host "hostname" + Port "5432" + User "username" + Password "secret" + SSLMode "prefer" + 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 (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 + +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<'>). + +Any SQL command which may return data (such as C