Merge pull request #2631 from DanCech/tagged-carbon
authorPavel Rochnyak <pavel2000@ngs.ru>
Thu, 5 Jul 2018 03:41:18 +0000 (10:41 +0700)
committerGitHub <noreply@github.com>
Thu, 5 Jul 2018 03:41:18 +0000 (10:41 +0700)
Graphite 1.1+ tag support

1  2 
src/collectd.conf.pod

diff --combined src/collectd.conf.pod
@@@ -1908,11 -1908,6 +1908,11 @@@ plugin below on how matches are defined
  B<MeasureResponseCode> options are set to B<true>, B<Match> blocks are
  optional.
  
 +=item B<Interval> I<Interval>
 +
 +Sets the interval (in seconds) in which the values will be collected from this
 +URL. By default the global B<Interval> setting will be used.
 +
  =item B<Timeout> I<Milliseconds>
  
  The B<Timeout> option sets the overall timeout for HTTP requests to B<URL>, in
@@@ -2109,11 -2104,6 +2109,11 @@@ Use I<Instance> as the plugin instance 
  May be overridden by B<PluginInstanceFrom> option inside B<XPath> blocks.
  Defaults to an empty string (no plugin instance).
  
 +=item B<Interval> I<Interval>
 +
 +Sets the interval (in seconds) in which the values will be collected from this
 +URL. By default the global B<Interval> setting will be used.
 +
  =item B<Namespace> I<Prefix> I<URL>
  
  If an XPath expression references namespaces, they must be specified
@@@ -9294,6 -9284,7 +9294,7 @@@ Synopsis
       Protocol "tcp"
       LogSendErrors true
       Prefix "collectd"
+      UseTags false
     </Node>
   </Plugin>
  
@@@ -9331,13 -9322,20 +9332,20 @@@ approach and logging errors fills syslo
  
  =item B<Prefix> I<String>
  
- When set, I<String> is added in front of the host name. Dots and whitespace are
- I<not> escaped in this string (see B<EscapeCharacter> below).
+ When B<UseTags> is I<false>, B<Prefix> value is added in front of the host name.
+ When B<UseTags> is I<true>, B<Prefix> value is added in front of series name.
+ Dots and whitespace are I<not> escaped in this string (see B<EscapeCharacter>
+ below).
  
  =item B<Postfix> I<String>
  
- When set, I<String> is appended to the host name. Dots and whitespace are
- I<not> escaped in this string (see B<EscapeCharacter> below).
+ When B<UseTags> is I<false>, B<Postfix> value appended to the host name.
+ When B<UseTags> is I<true>, B<Postgix> value appended to the end of series name
+ (before the first ; that separates the name from the tags).
+ Dots and whitespace are I<not> escaped in this string (see B<EscapeCharacter>
+ below).
  
  =item B<EscapeCharacter> I<Char>
  
@@@ -9359,6 -9357,8 +9367,8 @@@ path component, for example C<host.cpu.
  default), the plugin and plugin instance (and likewise the type and type
  instance) are put into one component, for example C<host.cpu-0.cpu-idle>.
  
+ Option value is not used when B<UseTags> is I<true>.
  =item B<AlwaysAppendDS> B<false>|B<true>
  
  If set to B<true>, append the name of the I<Data Source> (DS) to the "metric"
@@@ -9371,12 -9371,31 +9381,31 @@@ If set to B<false> (the default) the C<
  I<EscapeCharacter>. Otherwise, if set to B<true>, the C<.> (dot) character
  is preserved, i.e. passed through.
  
+ Option value is not used when B<UseTags> is I<true>.
  =item B<DropDuplicateFields> B<false>|B<true>
  
  If set to B<true>, detect and remove duplicate components in Graphite metric
  names. For example, the metric name  C<host.load.load.shortterm> will
  be shortened to C<host.load.shortterm>.
  
+ =item B<UseTags> B<false>|B<true>
+ If set to B<true>, Graphite metric names will be generated as tagged series.
+ This allows for much more flexibility than the traditional hierarchical layout.
+ Example:
+ C<test.single;host=example.com;plugin=test;plugin_instance=foo;type=single;type_instance=bar>
+ You can use B<Postfix> option to add more tags by specifying it like
+ C<;tag1=value1;tag2=value2>. Note what tagging support was added since Graphite
+ version 1.1.x.
+ If set to B<true>, the B<SeparateInstances> and B<PreserveSeparator> settings
+ are not used.
+ Default value: B<false>.
  =back
  
  =head2 Plugin C<write_log>
@@@ -9802,17 -9821,26 +9831,26 @@@ been set to B<JSON>
  =item B<GraphitePrefix> (B<Format>=I<Graphite> only)
  
  A prefix can be added in the metric name when outputting in the I<Graphite>
- format. It's added before the I<Host> name.
+ format.
+ When B<GraphiteUseTags> is I<false>, prefix is added before the I<Host> name.
  Metric name will be
  C<E<lt>prefixE<gt>E<lt>hostE<gt>E<lt>postfixE<gt>E<lt>pluginE<gt>E<lt>typeE<gt>E<lt>nameE<gt>>
  
+ When B<GraphiteUseTags> is I<true>, prefix is added in front of series name.
  =item B<GraphitePostfix> (B<Format>=I<Graphite> only)
  
  A postfix can be added in the metric name when outputting in the I<Graphite>
- format. It's added after the I<Host> name.
+ format.
+ When B<GraphiteUseTags> is I<false>, postfix is added after the I<Host> name.
  Metric name will be
  C<E<lt>prefixE<gt>E<lt>hostE<gt>E<lt>postfixE<gt>E<lt>pluginE<gt>E<lt>typeE<gt>E<lt>nameE<gt>>
  
+ When B<GraphiteUseTags> is I<true>, prefix value appended to the end of series
+ name (before the first ; that separates the name from the tags).
  =item B<GraphiteEscapeChar> (B<Format>=I<Graphite> only)
  
  Specify a character to replace dots (.) in the host part of the metric name.
@@@ -9827,6 -9855,8 +9865,8 @@@ path component, for example C<host.cpu.
  default), the plugin and plugin instance (and likewise the type and type
  instance) are put into one component, for example C<host.cpu-0.cpu-idle>.
  
+ Option value is not used when B<GraphiteUseTags> is I<true>.
  =item B<GraphiteAlwaysAppendDS> B<true>|B<false>
  
  If set to B<true>, append the name of the I<Data Source> (DS) to the "metric"
@@@ -9839,6 -9869,14 +9879,14 @@@ If set to B<false> (the default) the C<
  I<GraphiteEscapeChar>. Otherwise, if set to B<true>, the C<.> (dot) character
  is preserved, i.e. passed through.
  
+ Option value is not used when B<GraphiteUseTags> is I<true>.
+ =item B<GraphiteUseTags> B<false>|B<true>
+ If set to B<true> Graphite metric names will be generated as tagged series.
+ Default value: B<false>.
  =item B<StoreRates> B<true>|B<false>
  
  If set to B<true> (the default), convert counter values to rates. If set to