Merge remote-tracking branch 'github/pr/1681'
authorFlorian Forster <octo@collectd.org>
Fri, 29 Sep 2017 06:29:24 +0000 (08:29 +0200)
committerFlorian Forster <octo@collectd.org>
Fri, 29 Sep 2017 06:29:24 +0000 (08:29 +0200)
1  2 
src/collectd.conf.pod
src/curl.c
src/tail.c
src/tail_csv.c

diff --combined src/collectd.conf.pod
@@@ -1474,19 -1474,6 +1474,19 @@@ in the un-aggregated (per-CPU, per-stat
  When set to B<true>, reports the number of available CPUs.
  Defaults to B<false>.
  
 +=item B<ReportGuestState> B<false>|B<true>
 +
 +When set to B<true>, reports the "guest" and "guest_nice" CPU states.
 +Defaults to B<false>.
 +
 +=item B<SubtractGuestState> B<false>|B<true>
 +
 +This option is only considered when B<ReportGuestState> is set to B<true>.
 +"guest" and "guest_nice" are included in respectively "user" and "nice".
 +If set to B<true>, "guest" will be subtracted from "user" and "guest_nice"
 +will be subtracted from "nice".
 +Defaults to B<true>.
 +
  =back
  
  =head2 Plugin C<cpufreq>
@@@ -1624,6 -1611,7 +1624,7 @@@ finance page and dispatch the value to 
  
    <Plugin curl>
      <Page "stock_quotes">
+       Plugin "quotes"
        URL "http://finance.google.com/finance?q=NYSE%3AAMD"
        User "foo"
        Password "bar"
@@@ -1655,6 -1643,11 +1656,11 @@@ The following options are valid within 
  
  =over 4
  
+ =item B<Plugin> I<Plugin>
+ Use I<Plugin> as the plugin name when submitting values.
+ Defaults to 'curl'.
  =item B<URL> I<URL>
  
  URL of the web site to retrieve. Since a regular expression will be used to
@@@ -1815,11 -1808,6 +1821,11 @@@ The following options are valid within 
  Use I<Name> as the host name when submitting values. Defaults to the global
  host name setting.
  
 +=item B<Plugin> I<Plugin>
 +
 +Use I<Plugin> as the plugin name when submitting values.
 +Defaults to 'curl_json'.
 +
  =item B<Instance> I<Instance>
  
  Sets the plugin instance to I<Instance>.
@@@ -2748,16 -2736,12 +2754,16 @@@ blocks, the following options are recog
  
  =over 4
  
 +=item B<Plugin> I<Plugin>
 +
 +Use I<Plugin> as the plugin name when submitting values.
 +Defaults to B<filecount>.
 +
  =item B<Instance> I<Instance>
  
 -Sets the plugin instance to I<Instance>. 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.
 +Sets the plugin instance to I<Instance>. If not given, the instance is set to
 +the directory name with all slashes replaced by underscores and all leading
 +underscores removed. Empty value is allowed.
  
  =item B<Name> I<Pattern>
  
@@@ -2803,21 -2787,6 +2809,21 @@@ Controls whether or not to include "hid
  "Hidden" files and directories are those, whose name begins with a dot.
  Defaults to I<false>, i.e. by default hidden files and directories are ignored.
  
 +=item B<FilesSizeType> I<Type>
 +
 +Sets the type used to dispatch files combined size. Empty value ("") disables
 +reporting. Defaults to B<bytes>.
 +
 +=item B<FilesCountType> I<Type>
 +
 +Sets the type used to dispatch number of files. Empty value ("") disables
 +reporting. Defaults to B<files>.
 +
 +=item B<TypeInstance> I<Instance>
 +
 +Sets the I<type instance> used to dispatch values. Defaults to an empty string
 +(no plugin instance).
 +
  =back
  
  =head2 Plugin C<GenericJMX>
@@@ -3110,92 -3079,6 +3116,92 @@@ Defaults to B<false>
  
  =back
  
 +=head2 Plugin C<intel_pmu>
 +
 +The I<intel_pmu> plugin collects performance counters data on Intel CPUs using
 +Linux perf interface. All events are reported on a per core basis.
 +
 +B<Synopsis:>
 +
 +  <Plugin intel_pmu>
 +    ReportHardwareCacheEvents true
 +    ReportKernelPMUEvents true
 +    ReportSoftwareEvents true
 +    EventList "/var/cache/pmu/GenuineIntel-6-2D-core.json"
 +    HardwareEvents "L2_RQSTS.CODE_RD_HIT,L2_RQSTS.CODE_RD_MISS" "L2_RQSTS.ALL_CODE_RD"
 +  </Plugin>
 +
 +B<Options:>
 +
 +=over 4
 +
 +=item B<ReportHardwareCacheEvents> B<false>|B<true>
 +
 +Enable or disable measuring of hardware CPU cache events:
 +  - L1-dcache-loads
 +  - L1-dcache-load-misses
 +  - L1-dcache-stores
 +  - L1-dcache-store-misses
 +  - L1-dcache-prefetches
 +  - L1-dcache-prefetch-misses
 +  - L1-icache-loads
 +  - L1-icache-load-misses
 +  - L1-icache-prefetches
 +  - L1-icache-prefetch-misses
 +  - LLC-loads
 +  - LLC-load-misses
 +  - LLC-stores
 +  - LLC-store-misses
 +  - LLC-prefetches
 +  - LLC-prefetch-misses
 +  - dTLB-loads
 +  - dTLB-load-misses
 +  - dTLB-stores
 +  - dTLB-store-misses
 +  - dTLB-prefetches
 +  - dTLB-prefetch-misses
 +  - iTLB-loads
 +  - iTLB-load-misses
 +  - branch-loads
 +  - branch-load-misses
 +
 +=item B<ReportKernelPMUEvents> B<false>|B<true>
 +
 +Enable or disable measuring of the following events:
 +  - cpu-cycles
 +  - instructions
 +  - cache-references
 +  - cache-misses
 +  - branches
 +  - branch-misses
 +  - bus-cycles
 +
 +=item B<ReportSoftwareEvents> B<false>|B<true>
 +
 +Enable or disable measuring of software events provided by kernel:
 +  - cpu-clock
 +  - task-clock
 +  - context-switches
 +  - cpu-migrations
 +  - page-faults
 +  - minor-faults
 +  - major-faults
 +  - alignment-faults
 +  - emulation-faults
 +
 +=item B<EventList> I<filename>
 +
 +JSON performance counter event list file name. To be able to monitor all Intel
 +CPU specific events JSON event list file should be downloaded. Use the pmu-tools
 +event_download.py script to download event list for current CPU.
 +
 +=item B<HardwareEvents> I<events>
 +
 +This field is a list of event names or groups of comma separated event names.
 +This option requires B<EventList> option to be configured.
 +
 +=back
 +
  =head2 Plugin C<intel_rdt>
  
  The I<intel_rdt> plugin collects information provided by monitoring features of
@@@ -3601,36 -3484,17 +3607,36 @@@ By default the plugin connects to B<"/v
  mcelog server is running. When the server is running, the plugin will tail the
  specified logfile to retrieve machine check exception information and send a
  notification with the details from the logfile. The plugin will use the mcelog
 -client protocol to retrieve memory related machine check exceptions.
 +client protocol to retrieve memory related machine check exceptions. Note that
 +for memory exceptions, notifications are only sent when there is a change in
 +the number of corrected/uncorrected memory errors.
  
 -=over 4
 +=head3 The Memory block
 +
 +Note: these options cannot be used in conjunction with the logfile options, they are mutually
 +exclusive.
 +
 +=over 3
  
  =item B<McelogClientSocket> I<Path>
  Connect to the mcelog client socket using the UNIX domain socket at I<Path>.
  Defaults to B<"/var/run/mcelog-client">.
  
 +=item B<PersistentNotification> B<true>|B<false>
 +Override default configuration to only send notifications when sent when there
 +is a change in the number of corrected/uncorrected memory errors. When set to
 +true notifications will be sent for every read cycle. Default is false. Does
 +not affect the stats being dispatched.
 +
 +=back
 +
 +=over 4
 +
  =item B<McelogLogfile> I<Path>
  
 -The mcelog file to parse. Defaults to B<"/var/log/mcelog">.
 +The mcelog file to parse. Defaults to B<"/var/log/mcelog">. Note: this option
 +cannot be used in conjunction with the memory block options, they are mutually
 +exclusive.
  
  =back
  
@@@ -3678,6 -3542,7 +3684,7 @@@ Synopsis of the configuration
     <Page "plugin_instance">
       Server "localhost"
       Key "page_key"
+      Plugin "plugin_name"
       <Match>
         Regex "(\\d+) bytes sent"
         DSType CounterAdd
@@@ -3705,6 -3570,11 +3712,11 @@@ B<Page> block
  
  When connected to the memcached server, asks for the page I<Key>.
  
+ =item B<Plugin> I<Plugin>
+ Use I<Plugin> as the plugin name when submitting values.
+ Defaults to 'memcachec'.
  =item E<lt>B<Match>E<gt>
  
  Match blocks define which strings to look for and how matches substrings are
@@@ -4210,18 -4080,18 +4222,18 @@@ the B<collectd> branch
  Path to the PEM-encoded CA certificate file. Setting this option enables TLS
  communication with the MQTT broker, and as such, B<Port> should be the TLS-enabled
  port of the MQTT broker.
 -A valid TLS configuration requires B<CACert>, B<CertificateFile> and B<CertificateKeyFile>.
 +This option enables the use of TLS.
  
  =item B<CertificateFile> I<file>
  
  Path to the PEM-encoded certificate file to use as client certificate when
  connecting to the MQTT broker.
 -A valid TLS configuration requires B<CACert>, B<CertificateFile> and B<CertificateKeyFile>.
 +Only valid if B<CACert> and B<CertificateKeyFile> are also set.
  
  =item B<CertificateKeyFile> I<file>
  
  Path to the unencrypted PEM-encoded key file corresponding to B<CertificateFile>.
 -A valid TLS configuration requires B<CACert>, B<CertificateFile> and B<CertificateKeyFile>.
 +Only valid if B<CACert> and B<CertificateFile> are also set.
  
  =item B<TLSProtocol> I<protocol>
  
@@@ -4229,14 -4099,13 +4241,14 @@@ If configured, this specifies the strin
  C<tlsv1.2>) to use for the TLS connection to the broker. If not set a default
  version is used which depends on the version of OpenSSL the Mosquitto library
  was linked against.
 +Only valid if B<CACert> is set.
  
  =item B<CipherSuite> I<ciphersuite>
  
  A string describing the ciphers available for use. See L<ciphers(1)> and the
  C<openssl ciphers> utility for more information. If unset, the default ciphers
  will be used.
 -
 +Only valid if B<CACert> is set.
  
  =back
  
@@@ -4366,11 -4235,11 +4378,11 @@@ If enabled, the plugin sends a notifica
  or SQL threads are not running. Defaults to B<false>.
  
  =item B<WsrepStats> I<true|false>
 - 
 +
   Enable the collection of wsrep plugin statistics, used in Master-Master
   replication setups like in MySQL Galera/Percona XtraDB Cluster.
   User needs only privileges to execute 'SHOW GLOBAL STATUS'
 - 
 +
  =item B<ConnectTimeout> I<Seconds>
  
  Sets the connect timeout for the MySQL client.
@@@ -5204,25 -5073,6 +5216,25 @@@ statistics available. Defaults to B<fal
  
  =back
  
 +=head2 Plugin C<nfs>
 +
 +The I<nfs plugin> collects information about the usage of the Network File
 +System (NFS). It counts the number of procedure calls for each procedure,
 +grouped by version and whether the system runs as server or client.
 +
 +It is possibly to omit metrics for a specific NFS version by setting one or
 +more of the following options to B<false> (all of them default to B<true>).
 +
 +=over 4
 +
 +=item B<ReportV2> B<true>|B<false>
 +
 +=item B<ReportV3> B<true>|B<false>
 +
 +=item B<ReportV4> B<true>|B<false>
 +
 +=back
 +
  =head2 Plugin C<nginx>
  
  This plugin collects the number of connections and requests handled by the
@@@ -5453,11 -5303,6 +5465,11 @@@ generate links like the one described a
  Example usage:
  C<c_rehash /path/to/certs/folder>
  
 +=item B<ConnectTimeout> I<Milliseconds>
 +
 +The B<ConnectTimeout> option sets the connect timeout, in milliseconds.
 +By default, the configured B<Interval> is used to set the timeout.
 +
  =back
  
  =head2 Plugin C<olsrd>
@@@ -5693,12 -5538,15 +5705,12 @@@ The OpenVPN plugin reads a status file 
  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>.
 +B<--status> option of OpenVPN.
  
  So, in a nutshell you need:
  
    openvpn $OTHER_OPTIONS \
 -    --status "/var/run/openvpn-status" 10 \
 -    --status-version 2
 +    --status "/var/run/openvpn-status" 10
  
  Available options:
  
@@@ -7116,20 -6964,14 +7128,20 @@@ one (exclusive)
  
  When the C<rrdtool> plugin uses a cache (by setting B<CacheTimeout>, see below)
  it writes all values for a certain RRD-file if the oldest value is older than
 -(or equal to) the number of seconds specified. If some RRD-file is not updated
 +(or equal to) the number of seconds specified by B<CacheTimeout>.
 +That check happens on new values arriwal. If some RRD-file is not updated
  anymore for some reason (the computer was shut down, the network is broken,
 -etc.) some values may still be in the cache. If B<CacheFlush> is set, then the
 -entire cache is searched for entries older than B<CacheTimeout> seconds and
 -written to disk every I<Seconds> seconds. Since this is kind of expensive and
 -does nothing under normal circumstances, this value should not be too small.
 -900 seconds might be a good value, though setting this to 7200 seconds doesn't
 -normally do much harm either.
 +etc.) some values may still be in the cache. If B<CacheFlush> is set, then
 +every I<Seconds> seconds the entire cache is searched for entries older than
 +B<CacheTimeout> + B<RandomTimeout> seconds. The entries found are written to
 +disk. Since scanning the entire cache is kind of expensive and does nothing
 +under normal circumstances, this value should not be too small. 900 seconds
 +might be a good value, though setting this to 7200 seconds doesn't normally
 +do much harm either.
 +
 +Defaults to 10x B<CacheTimeout>.
 +B<CacheFlush> must be larger than or equal to B<CacheTimeout>, otherwise the
 +above default is used.
  
  =item B<CacheTimeout> I<Seconds>
  
@@@ -7359,7 -7201,6 +7371,7 @@@ B<Synopsis:
    <Plugin snmp_agent>
      <Data "memAvailReal">
        Plugin "memory"
 +      #PluginInstance "some"
        Type "memory"
        TypeInstance "free"
        OIDs "1.3.6.1.4.1.2021.4.6.0"
@@@ -7403,12 -7244,6 +7415,12 @@@ scalar data type B<Instance> has no eff
  
  Read plugin name whose collected data will be mapped to specified OIDs.
  
 +=item B<PluginInstance> I<String>
 +
 +Read plugin instance whose collected data will be mapped to specified OIDs.
 +The field is optional and by default there is no plugin instance check.
 +Allowed only if B<Data> block defines scalar data type.
 +
  =item B<Type> I<String>
  
  Collectd's type that is to be used for specified OID, e.E<nbsp>g. "if_octets"
@@@ -7421,9 -7256,9 +7433,9 @@@ Collectd's type-instance that is to be 
  =item B<OIDs> I<OID> [I<OID> ...]
  
  Configures the OIDs to be handled by I<snmp_agent> plugin. Values for these OIDs
 -are taken from collectd data type specified by B<Plugin>, B<Type>,
 -B<TypeInstance> fields of this B<Data> block. Number of the OIDs configured
 -should correspond to number of values in specified B<Type>.
 +are taken from collectd data type specified by B<Plugin>, B<PluginInstance>,
 +B<Type>, B<TypeInstance> fields of this B<Data> block. Number of the OIDs
 +configured should correspond to number of values in specified B<Type>.
  For example two OIDs "IF-MIB::ifInOctets" "IF-MIB::ifOutOctets" can be mapped to
  "rx" and "tx" values of "if_octets" type.
  
@@@ -7562,13 -7397,6 +7574,13 @@@ available and free. Defaults to B<false
  This is useful for deploying I<collectd> in a heterogeneous environment, where
  swap sizes differ and you want to specify generic thresholds or similar.
  
 +=item B<ReportIO> B<true>|B<false>
 +
 +Enables or disables reporting swap IO. Defaults to B<true>.
 +
 +This is useful for the cases when swap IO is not neccessary, is not available,
 +or is not reliable.
 +
  =back
  
  =head2 Plugin C<syslog>
@@@ -7604,7 -7432,6 +7616,7 @@@ filesystem or CSV (comma separated valu
  
    <Plugin table>
      <Table "/proc/slabinfo">
 +      #Plugin "slab"
        Instance "slabinfo"
        Separator " "
        <Result>
@@@ -7631,14 -7458,10 +7643,14 @@@ The following options are available ins
  
  =over 4
  
 +=item B<Plugin> I<Plugin>
 +
 +If specified, I<Plugin> is used as the plugin name when submitting values.
 +Defaults to B<table>.
 +
  =item B<Instance> I<instance>
  
 -If specified, I<instance> is used as the plugin instance. So, in the above
 -example, the plugin name C<table-slabinfo> would be used. If omitted, the
 +If specified, I<instance> is used as the plugin instance. If omitted, the
  filename of the table is used instead, with all special characters replaced
  with an underscore (C<_>).
  
@@@ -7708,6 -7531,7 +7720,7 @@@ user using (extended) regular expressio
  
    <Plugin "tail">
      <File "/var/log/exim4/mainlog">
+       Plugin "mail"
        Instance "exim"
        Interval 60
        <Match>
          <DSType "Distribution">
            Percentile 99
            Bucket 0 100
 +          #BucketType "bucket"
          </DSType>
          Type "latency"
          Instance "foo"
@@@ -7740,11 -7563,13 +7753,13 @@@ The config consists of one or more B<Fi
  logfile to parse. Within each B<File> block, there are one or more B<Match>
  blocks, which configure a regular expression to search for.
  
- The B<Instance> option in the B<File> block may be used to set the plugin
- instance. So in the above example the plugin name C<tail-foo> would be used.
- This plugin instance is for all B<Match> blocks that B<follow> it, until the
- next B<Instance> option. This way you can extract several plugin instances from
- one logfile, handy when parsing syslog and the like.
+ The B<Plugin> and B<Instance> options in the B<File> block may be used to set
+ the plugin name and instance respectively. So in the above example the plugin name
+ C<mail-exim> would be used.
+ These options are applied for all B<Match> blocks that B<follow> it, until the
+ next B<Plugin> or B<Instance> option. This way you can extract several plugin
+ instances from one logfile, handy when parsing syslog and the like.
  
  The B<Interval> option allows you to define the length of time between reads. If
  this is not set, the default Interval will be used.
@@@ -7848,7 -7673,6 +7863,7 @@@ B<Synopsis:
    <DSType "Distribution">
      Percentile 99
      Bucket 0 100
 +    BucketType "bucket"
    </DSType>
  
  =over 4
@@@ -7885,17 -7709,11 +7900,17 @@@ the following schema
    Bucket  20  50
    Bucket  50   0
  
 -Metrics are reported with the I<type> C<bucket> and the I<type instance>
 +Metrics are reported with the I<type> set by B<BucketType> option (C<bucket> 
 +by default) and the I<type instance>
  C<E<lt>TypeE<gt>[-E<lt>InstanceE<gt>]-E<lt>lower_boundE<gt>_E<lt>upper_boundE<gt>>.
  
  This option may be repeated to calculate more than one rate.
  
 +=item B<BucketType> I<Type>
 +
 +Sets the type used to dispatch B<Bucket> metrics.
 +Optional, by default C<bucket> will be used.
 +
  =back
  
  =back
@@@ -7932,7 -7750,8 +7947,8 @@@ B<Synopsis:
         Index 1
     </Metric>
     <File "/var/log/snort/snort.stats">
-        Instance "snort-eth0"
+        Plugin "snortstats"
+        Instance "eth0"
         Interval 600
         Collect "snort-dropped"
     </File>
@@@ -7984,6 -7803,11 +8000,11 @@@ I<File> block but there can be multipl
  
  =over 4
  
+ =item B<Plugin> I<Plugin>
+ Use I<Plugin> as the plugin name when submitting values.
+ Defaults to 'tail_csv'.
  =item B<Instance> I<PluginInstance>
  
  Sets the I<plugin instance> used when dispatching the values.
@@@ -8247,9 -8071,9 +8268,9 @@@ collections. The different bits of thi
  
  Boolean enabling the use of logical core numbering for per core statistics.
  When enabled, C<cpuE<lt>nE<gt>> is used as plugin instance, where I<n> is a
 -sequential number assigned by the kernel. Otherwise, C<coreE<lt>nE<gt>> is used
 -where I<n> is the n-th core of the socket, causing name conflicts when there is
 -more than one socket.
 +dynamic number assigned by the kernel. Otherwise, C<coreE<lt>nE<gt>> is used
 +if there is only one package and C<pkgE<lt>nE<gt>-coreE<lt>mE<gt>> if there is
 +more than one, where I<n> is the n-th core of package I<m>.
  
  =back
  
@@@ -8355,11 -8179,6 +8376,11 @@@ Synopsis
       CollectVCL         false
       CollectVSM         false
       CollectWorkers     false
 +     CollectLock        false
 +     CollectMempool     false
 +     CollectManagement  false
 +     CollectSMF         false
 +     CollectVBE         false
     </Instance>
   </Plugin>
  
@@@ -8435,10 -8254,7 +8456,10 @@@ log messages which is flushed to disk w
  =item B<CollectSMA> B<true>|B<false>
  
  malloc or umem (umem_alloc(3MALLOC) based) storage statistics. The umem storage
 -component is Solaris specific. Only available with Varnish 2.x. False by
 +component is Solaris specific.
 +Note: SMA and SMF share counters, enable only the one used by the Varnish
 +instance.
 +Only available with Varnish 2.x. False by
  default.
  
  =item B<CollectSMS> B<true>|B<false>
@@@ -8448,8 -8264,7 +8469,8 @@@ component is used internally only. Fals
  
  =item B<CollectSM> B<true>|B<false>
  
 -file (memory mapped file) storage statistics. Only available with Varnish 2.x.
 +file (memory mapped file) storage statistics. Only available with Varnish 2.x.,
 +in varnish 4.x. use CollectSMF.
  False by default.
  
  =item B<CollectStruct> B<true>|B<false>
@@@ -8480,29 -8295,6 +8501,29 @@@ statistics subsystems). Only available 
  
  Collect statistics about worker threads. False by default.
  
 +=item B<CollectVBE> B<true>|B<false>
 +
 +Backend counters. Only available with Varnish 4.x. False by default.
 +
 +=item B<CollectSMF> B<true>|B<false>
 +
 +file (memory mapped file) storage statistics. Only available with Varnish 4.x.
 +Note: SMA and SMF share counters, enable only the one used by the Varnish
 +instance.
 +Used to be called SM in Varnish 2.x. False by default.
 +
 +=item B<CollectManagement> B<true>|B<false>
 +
 +Management process counters. Only available with Varnish 4.x. False by default.
 +
 +=item B<CollectLock> B<true>|B<false>
 +
 +Lock counters. Only available with Varnish 4.x. False by default.
 +
 +=item B<CollectMempool> B<true>|B<false>
 +
 +Memory pool counters. Only available with Varnish 4.x. False by default.
 +
  =back
  
  =head2 Plugin C<virt>
@@@ -8567,7 -8359,7 +8588,7 @@@ will be collected
  =item B<BlockDeviceFormat> B<target>|B<source>
  
  If I<BlockDeviceFormat> is set to B<target>, the default, then the device name
 -seen by the guest will be used for reporting metrics. 
 +seen by the guest will be used for reporting metrics.
  This corresponds to the C<E<lt>targetE<gt>> node in the XML definition of the
  domain.
  
@@@ -9328,7 -9120,6 +9349,7 @@@ Synopsis
          Prefix "collectd/"
          Database 1
          MaxSetSize -1
 +        MaxSetDuration -1
          StoreRates true
      </Node>
    </Plugin>
@@@ -9391,12 -9182,6 +9412,12 @@@ to C<0>
  The B<MaxSetSize> option limits the number of items that the I<Sorted Sets> can
  hold. Negative values for I<Items> sets no limit, which is the default behavior.
  
 +=item B<MaxSetDuration> I<Seconds>
 +
 +The B<MaxSetDuration> option limits the duration of items that the
 +I<Sorted Sets> can hold. Negative values for I<Items> sets no duration, which
 +is the default behavior.
 +
  =item B<StoreRates> B<true>|B<false>
  
  If set to B<true> (the default), convert counter values to rates. If set to
diff --combined src/curl.c
@@@ -53,6 -53,7 +53,7 @@@ struct web_page_s
  typedef struct web_page_s web_page_t;
  struct web_page_s /* {{{ */
  {
+   char *plugin_name;
    char *instance;
  
    char *url;
@@@ -146,6 -147,7 +147,7 @@@ static void cc_web_page_free(web_page_
      curl_easy_cleanup(wp->curl);
    wp->curl = NULL;
  
+   sfree(wp->plugin_name);
    sfree(wp->instance);
  
    sfree(wp->url);
@@@ -368,8 -370,8 +370,8 @@@ static int cc_page_init_curl(web_page_
        return -1;
      }
  
 -    ssnprintf(wp->credentials, credentials_size, "%s:%s", wp->user,
 -              (wp->pass == NULL) ? "" : wp->pass);
 +    snprintf(wp->credentials, credentials_size, "%s:%s", wp->user,
 +             (wp->pass == NULL) ? "" : wp->pass);
      curl_easy_setopt(wp->curl, CURLOPT_USERPWD, wp->credentials);
  #endif
  
@@@ -412,6 -414,7 +414,7 @@@ static int cc_config_add_page(oconfig_i
      ERROR("curl plugin: calloc failed.");
      return -1;
    }
+   page->plugin_name = NULL;
    page->url = NULL;
    page->user = NULL;
    page->pass = NULL;
    for (int i = 0; i < ci->children_num; i++) {
      oconfig_item_t *child = ci->children + i;
  
-     if (strcasecmp("URL", child->key) == 0)
+     if (strcasecmp("Plugin", child->key) == 0)
+       status = cf_util_get_string(child, &page->plugin_name);
+     else if (strcasecmp("URL", child->key) == 0)
        status = cf_util_get_string(child, &page->url);
      else if (strcasecmp("User", child->key) == 0)
        status = cf_util_get_string(child, &page->user);
@@@ -566,7 -571,8 +571,8 @@@ static void cc_submit(const web_page_t 
  
    vl.values = &value;
    vl.values_len = 1;
-   sstrncpy(vl.plugin, "curl", sizeof(vl.plugin));
+   sstrncpy(vl.plugin, (wp->plugin_name != NULL) ? wp->plugin_name : "curl",
+            sizeof(vl.plugin));
    sstrncpy(vl.plugin_instance, wp->instance, sizeof(vl.plugin_instance));
    sstrncpy(vl.type, wm->type, sizeof(vl.type));
    if (wm->instance != NULL)
@@@ -581,7 -587,8 +587,8 @@@ static void cc_submit_response_code(con
  
    vl.values = &(value_t){.gauge = (gauge_t)code};
    vl.values_len = 1;
-   sstrncpy(vl.plugin, "curl", sizeof(vl.plugin));
+   sstrncpy(vl.plugin, (wp->plugin_name != NULL) ? wp->plugin_name : "curl",
+            sizeof(vl.plugin));
    sstrncpy(vl.plugin_instance, wp->instance, sizeof(vl.plugin_instance));
    sstrncpy(vl.type, "response_code", sizeof(vl.type));
  
@@@ -594,7 -601,8 +601,8 @@@ static void cc_submit_response_time(con
  
    vl.values = &(value_t){.gauge = response_time};
    vl.values_len = 1;
-   sstrncpy(vl.plugin, "curl", sizeof(vl.plugin));
+   sstrncpy(vl.plugin, (wp->plugin_name != NULL) ? wp->plugin_name : "curl",
+            sizeof(vl.plugin));
    sstrncpy(vl.plugin_instance, wp->instance, sizeof(vl.plugin_instance));
    sstrncpy(vl.type, "response_time", sizeof(vl.type));
  
@@@ -623,7 -631,7 +631,7 @@@ static int cc_read_page(web_page_t *wp
    if (wp->response_time)
      cc_submit_response_time(wp, CDTIME_T_TO_DOUBLE(cdtime() - start));
    if (wp->stats != NULL)
 -    curl_stats_dispatch(wp->stats, wp->curl, hostname_g, "curl", wp->instance);
 +    curl_stats_dispatch(wp->stats, wp->curl, NULL, "curl", wp->instance);
  
    if (wp->response_code) {
      long response_code = 0;
diff --combined src/tail.c
@@@ -34,7 -34,8 +34,8 @@@
  /*
   *  <Plugin tail>
   *    <File "/var/log/exim4/mainlog">
-  *    Instance "exim"
+  *      Plugin "mail"
+  *      Instance "exim"
   *      Interval 60
   *    <Match>
   *      Regex "S=([1-9][0-9]*)"
@@@ -134,6 -135,7 +135,7 @@@ static int ctail_config_add_match_dstyp
  } /* int ctail_config_add_match_dstype */
  
  static int ctail_config_add_match(cu_tail_match_t *tm,
+                                   const char *plugin_name,
                                    const char *plugin_instance,
                                    oconfig_item_t *ci, cdtime_t interval) {
    ctail_config_match_t cm = {0};
    if (status == 0) {
      // TODO(octo): there's nothing "simple" about the latency stuff …
      status = tail_match_add_match_simple(
-         tm, cm.regex, cm.excluderegex, cm.flags, "tail", plugin_instance,
+         tm, cm.regex, cm.excluderegex, cm.flags,
+         (plugin_name != NULL) ? plugin_name : "tail", plugin_instance,
          cm.type, cm.type_instance, cm.latency, interval);
  
      if (status != 0)
  static int ctail_config_add_file(oconfig_item_t *ci) {
    cu_tail_match_t *tm;
    cdtime_t interval = 0;
+   char *plugin_name = NULL;
    char *plugin_instance = NULL;
    int num_matches = 0;
  
      oconfig_item_t *option = ci->children + i;
      int status = 0;
  
-     if (strcasecmp("Instance", option->key) == 0)
+     if (strcasecmp("Plugin", option->key) == 0)
+       status = cf_util_get_string (option, &plugin_name);
+     else if (strcasecmp("Instance", option->key) == 0)
        status = cf_util_get_string(option, &plugin_instance);
      else if (strcasecmp("Interval", option->key) == 0)
        cf_util_get_cdtime(option, &interval);
      else if (strcasecmp("Match", option->key) == 0) {
-       status = ctail_config_add_match(tm, plugin_instance, option, interval);
+       status = ctail_config_add_match(tm, plugin_name, plugin_instance, option,
+                                       interval);
        if (status == 0)
          num_matches++;
        /* Be mild with failed matches.. */
        break;
    } /* for (i = 0; i < ci->children_num; i++) */
  
+   sfree(plugin_name);
    sfree(plugin_instance);
  
    if (num_matches == 0) {
@@@ -309,7 -317,7 +317,7 @@@ static int ctail_init(void) 
    }
  
    for (size_t i = 0; i < tail_match_list_num; i++) {
 -    ssnprintf(str, sizeof(str), "tail-%zu", i);
 +    snprintf(str, sizeof(str), "tail-%zu", i);
  
      plugin_register_complex_read(NULL, str, ctail_read,
                                   tail_match_list_intervals[i],
diff --combined src/tail_csv.c
@@@ -44,6 -44,7 +44,7 @@@ struct metric_definition_s 
  typedef struct metric_definition_s metric_definition_t;
  
  struct instance_definition_s {
+   char *plugin_name;
    char *instance;
    char *path;
    cu_tail_t *tail;
@@@ -67,7 -68,8 +68,8 @@@ static int tcsv_submit(instance_definit
    vl.values_len = 1;
    vl.values = &v;
  
-   sstrncpy(vl.plugin, "tail_csv", sizeof(vl.plugin));
+   sstrncpy(vl.plugin, (id->plugin_name != NULL) ? id->plugin_name : "tail_csv",
+            sizeof(vl.plugin));
    if (id->instance != NULL)
      sstrncpy(vl.plugin_instance, id->instance, sizeof(vl.plugin_instance));
    sstrncpy(vl.type, md->type, sizeof(vl.type));
@@@ -358,6 -360,7 +360,7 @@@ static void tcsv_instance_definition_de
      cu_tail_destroy(id->tail);
    id->tail = NULL;
  
+   sfree(id->plugin_name);
    sfree(id->instance);
    sfree(id->path);
    sfree(id->metric_list);
@@@ -420,6 -423,7 +423,7 @@@ static int tcsv_config_add_file(oconfig
    id = calloc(1, sizeof(*id));
    if (id == NULL)
      return -1;
+   id->plugin_name = NULL;
    id->instance = NULL;
    id->path = NULL;
    id->metric_list = NULL;
        cf_util_get_cdtime(option, &id->interval);
      else if (strcasecmp("TimeFrom", option->key) == 0)
        status = tcsv_config_get_index(option, &id->time_from);
+     else if (strcasecmp("Plugin", option->key) == 0)
+       status = cf_util_get_string(option, &id->plugin_name);
      else {
        WARNING("tail_csv plugin: Option `%s' not allowed here.", option->key);
        status = -1;
      return -1;
    }
  
 -  ssnprintf(cb_name, sizeof(cb_name), "tail_csv/%s", id->path);
 +  snprintf(cb_name, sizeof(cb_name), "tail_csv/%s", id->path);
  
    status = plugin_register_complex_read(
        NULL, cb_name, tcsv_read, id->interval,
        });
    if (status != 0) {
      ERROR("tail_csv plugin: Registering complex read function failed.");
 -    tcsv_instance_definition_destroy(id);
      return -1;
    }