Code

Merge branch 'sh/postgres-queries'
authorFlorian Forster <octo@collectd.org>
Sat, 17 Nov 2012 08:28:39 +0000 (09:28 +0100)
committerFlorian Forster <octo@collectd.org>
Sat, 17 Nov 2012 08:28:39 +0000 (09:28 +0100)
1  2 
src/collectd.conf.pod

diff --combined src/collectd.conf.pod
index 15b6f680e04dfb6b4d018b89592185d1cb8d96fd,c23e3159878b21e5d2e6ccb9f5d17fab2e94d41a..9d098f1264fb8114d1efa418e9e6318626a50748
@@@ -96,12 -96,6 +96,12 @@@ By default, this is disabled. As a spec
  either C<perl> or C<python>, the default is changed to enabled in order to keep
  the average user from ever having to deal with this low level linking stuff.
  
 +=item B<Interval> I<Seconds>
 +
 +Sets a plugin-specific interval for collecting metrics. This overrides the
 +global B<Interval> setting. If a plugin provides own support for specifying an
 +interval, that setting will take precedence.
 +
  =back
  
  =item B<Include> I<Path>
@@@ -199,122 -193,12 +199,122 @@@ C<Plugin>-Section. Which options exist 
  require external configuration, too. The C<apache plugin>, for example,
  required C<mod_status> to be configured in the webserver you're going to
  collect data from. These plugins are listed below as well, even if they don't
 -require any configuration within collectd's configfile.
 +require any configuration within collectd's configuration file.
  
  A list of all plugins and a short summary for each plugin can be found in the
  F<README> file shipped with the sourcecode and hopefully binary packets as
  well.
  
 +=head2 Plugin C<aggregation>
 +
 +The I<Aggregation plugin> makes it possible to aggregate several values into
 +one using aggregation functions such as I<sum>, I<average>, I<min> and I<max>.
 +This can be put to a wide variety of uses, e.g. average and total CPU
 +statistics for your entire fleet.
 +
 +The grouping is powerful but, as with many powerful tools, may be a bit
 +difficult to wrap your head around. The grouping will therefore be
 +demonstrated using an example: The average and sum of the CPU usage across
 +all CPUs of each host is to be calculated.
 +
 +To select all the affected values for our example, set C<Plugin cpu> and
 +C<Type cpu>. The other values are left unspecified, meaning "all values". The
 +I<Host>, I<Plugin>, I<PluginInstance>, I<Type> and I<TypeInstance> options
 +work as if they were specified in the C<WHERE> clause of an C<SELECT> SQL
 +statement.
 +
 +  Plugin "cpu"
 +  Type "cpu"
 +
 +Although the I<Host>, I<PluginInstance> (CPU number, i.e. 0, 1, 2, ...)  and
 +I<TypeInstance> (idle, user, system, ...) fields are left unspecified in the
 +example, the intention is to have a new value for each host / type instance
 +pair. This is achieved by "grouping" the values using the C<GroupBy> option.
 +It can be specified multiple times to group by more than one field.
 +
 +  GroupBy "Host"
 +  GroupBy "TypeInstance"
 +
 +We do neither specify nor group by I<plugin instance> (the CPU number), so all
 +metrics that differ in the CPU number only will be aggregated. Each
 +aggregation needs I<at least one> such field, otherwise no aggregation would
 +take place.
 +
 +The full example configuration looks like this:
 +
 + <Plugin "aggregation">
 +   <Aggregation>
 +     Plugin "cpu"
 +     Type "cpu"
 +     
 +     GroupBy "Host"
 +     GroupBy "TypeInstance"
 +     
 +     CalculateSum true
 +     CalculateAverage true
 +   </Aggregation>
 + </Plugin>
 +
 +There are a couple of limitations you should be aware of:
 +
 +=over 4
 +
 +=item
 +
 +The I<Type> cannot be left unspecified, because it is not reasonable to add
 +apples to oranges. Also, the internal lookup structure won't work if you try
 +to group by type.
 +
 +=item
 +
 +There must be at least one unspecified, ungrouped field. Otherwise nothing
 +will be aggregated.
 +
 +=back
 +
 +As you can see in the example above, each aggregation has its own
 +B<Aggregation> block. You can have multiple aggregation blocks and aggregation
 +blocks may match the same values, i.e. one value list can update multiple
 +aggregations. The following options are valid inside B<Aggregation> blocks:
 +
 +=over 4
 +
 +=item B<Host> I<Host>
 +
 +=item B<Plugin> I<Plugin>
 +
 +=item B<PluginInstance> I<PluginInstance>
 +
 +=item B<Type> I<Type>
 +
 +=item B<TypeInstance> I<TypeInstance>
 +
 +Selects the value lists to be added to this aggregation. B<Type> must be a
 +valid data set name, see L<types.db(5)> for details.
 +
 +=item B<GroupBy> B<Host>|B<Plugin>|B<PluginInstance>|B<TypeInstance>
 +
 +Group valued by the specified field. The B<GroupBy> option may be repeated to
 +group by multiple fields.
 +
 +=item B<CalculateNum> B<true>|B<false>
 +
 +=item B<CalculateSum> B<true>|B<false>
 +
 +=item B<CalculateAverage> B<true>|B<false>
 +
 +=item B<CalculateMinimum> B<true>|B<false>
 +
 +=item B<CalculateMaximum> B<true>|B<false>
 +
 +=item B<CalculateStddev> B<true>|B<false>
 +
 +Boolean options for enabling calculation of the number of value lists, their
 +sum, average, minimum, maximum andE<nbsp>/ or standard deviation. All options
 +are disabled by default.
 +
 +=back
 +
  =head2 Plugin C<amqp>
  
  The I<AMQMP plugin> can be used to communicate with other instances of
@@@ -3838,6 -3722,23 +3838,23 @@@ This query collects the on-disk size o
  
  =back
  
+ In addition, the following detailed queries are available by default. Please
+ note that each of those queries collects information B<by table>, thus,
+ potentially producing B<a lot> of data. For details see the description of the
+ non-by_table queries above.
+ =over 4
+ =item B<queries_by_table>
+ =item B<query_plans_by_table>
+ =item B<table_states_by_table>
+ =item B<disk_io_by_table>
+ =back
  The B<Database> block defines one PostgreSQL database for which to collect
  statistics. It accepts a single mandatory argument which specifies the
  database name. None of the other options are required. PostgreSQL will use
@@@ -4311,50 -4212,6 +4328,50 @@@ Enables or disables the creation of RR
  locally, or B<DataDir> is set to a relative path, this will not work as
  expected. Default is B<true>.
  
 +=item B<StepSize> I<Seconds>
 +
 +B<Force> the stepsize of newly created RRD-files. Ideally (and per default)
 +this setting is unset and the stepsize is set to the interval in which the data
 +is collected. Do not use this option unless you absolutely have to for some
 +reason. Setting this option may cause problems with the C<snmp plugin>, the
 +C<exec plugin> or when the daemon is set up to receive data from other hosts.
 +
 +=item B<HeartBeat> I<Seconds>
 +
 +B<Force> the heartbeat of newly created RRD-files. This setting should be unset
 +in which case the heartbeat is set to twice the B<StepSize> which should equal
 +the interval in which data is collected. Do not set this option unless you have
 +a very good reason to do so.
 +
 +=item B<RRARows> I<NumRows>
 +
 +The C<rrdtool plugin> calculates the number of PDPs per CDP based on the
 +B<StepSize>, this setting and a timespan. This plugin creates RRD-files with
 +three times five RRAs, i. e. five RRAs with the CFs B<MIN>, B<AVERAGE>, and
 +B<MAX>. The five RRAs are optimized for graphs covering one hour, one day, one
 +week, one month, and one year.
 +
 +So for each timespan, it calculates how many PDPs need to be consolidated into
 +one CDP by calculating:
 +  number of PDPs = timespan / (stepsize * rrarows)
 +
 +Bottom line is, set this no smaller than the width of you graphs in pixels. The
 +default is 1200.
 +
 +=item B<RRATimespan> I<Seconds>
 +
 +Adds an RRA-timespan, given in seconds. Use this option multiple times to have
 +more then one RRA. If this option is never used, the built-in default of (3600,
 +86400, 604800, 2678400, 31622400) is used.
 +
 +For more information on how RRA-sizes are calculated see B<RRARows> above.
 +
 +=item B<XFF> I<Factor>
 +
 +Set the "XFiles Factor". The default is 0.1. If unsure, don't set this option.
 +I<Factor> must be in the range C<[0.0-1.0)>, i.e. between zero (inclusive) and
 +one (exclusive).
 +
  =back
  
  =head2 Plugin C<rrdtool>
@@@ -4412,8 -4269,6 +4429,8 @@@ For more information on how RRA-sizes a
  =item B<XFF> I<Factor>
  
  Set the "XFiles Factor". The default is 0.1. If unsure, don't set this option.
 +I<Factor> must be in the range C<[0.0-1.0)>, i.e. between zero (inclusive) and
 +one (exclusive).
  
  =item B<CacheFlush> I<Seconds>