Merge pull request #566 from timl/drbd
authorMarc Fournier <marc.fournier@camptocamp.com>
Thu, 7 Aug 2014 15:30:01 +0000 (17:30 +0200)
committerMarc Fournier <marc.fournier@camptocamp.com>
Thu, 7 Aug 2014 15:30:01 +0000 (17:30 +0200)
Collect drbd statistics on linux

1  2 
AUTHORS
README
configure.ac
src/Makefile.am
src/collectd.conf.in
src/types.db

diff --combined AUTHORS
+++ b/AUTHORS
@@@ -195,10 -195,6 +195,10 @@@ Phoenix Kayo <kayo.k11.4 at gmail.com
  Pierre-Yves Ritschard <pyr at spootnik.org>
   - Write-Riemann plugin.
   - Write-Graphite plugin: Notification support.
 + - Write-Kafka plugin.
 + - Log-Logstash plugin.
 + - Normalization in the CPU plugin.
 + - Relative values in the Load plugin.
  
  Piotr Hosowicz <the55 at wp.pl>
   - SMF manifest for collectd.
@@@ -235,6 -231,9 +235,9 @@@ Sven Trenkel <collectd at semidefinite.
   - netapp plugin.
   - python plugin.
  
+ Tim Laszlo <tim.laszlo at gmail.com>
+  - drbd plugin
  Thomas Meson <zllak at hycik.org>
   - Graphite support for the AMQP plugin.
  
diff --combined README
--- 1/README
--- 2/README
+++ b/README
@@@ -32,11 -32,6 +32,11 @@@ Feature
      - ascent
        Statistics about Ascent, a free server for the game `World of Warcraft'.
  
 +    - barometer
 +      Using digital barometer sensor MPL115A2 or MPL3115 from Freescale
 +      provides absolute barometric pressure, air pressure reduced to sea level
 +      and temperature.
 +
      - battery
        Batterycharge, -current and voltage of ACPI and PMU based laptop
        batteries.
@@@ -87,6 -82,9 +87,9 @@@
        DNS traffic: Query types, response codes, opcodes and traffic/octets
        transfered.
  
+     - drbd
+       Collect individual drbd resource statistics.
      - email
        Email statistics: Count, traffic, spam scores and checks.
        See collectd-email(5).
        network devices such as switches, routers, thermometers, rack monitoring
        servers, etc. See collectd-snmp(5).
  
 +    - statsd
 +      Acts as a StatsD server, reading values sent over the network from StatsD
 +      clients and calculating rates and other aggregates out of these values.
 +
      - swap
        Pages swapped out onto harddisk or whatever is called `swap' by the OS..
  
        requests. The transmitted data is either in a form understood by the
        Exec plugin or formatted in JSON.
  
 +    - write_kafka
 +      Sends data to Apache Kafka, a distributed queue.
 +
      - write_mongodb
        Sends data to MongoDB, a NoSQL database.
  
      plugins keep up informed about what's going on:
  
      - logfile
 -      Writes logmessages to a file or STDOUT/STDERR.
 +      Writes log messages to a file or STDOUT/STDERR.
  
      - perl
        Log messages are propagated to plugins written in Perl as well.
      - syslog
        Logs to the standard UNIX logging mechanism, syslog.
  
 +    - log_logstash
 +      Writes log messages formatted as logstash JSON events.
 +
    * Notifications can be handled by the following plugins:
  
      - notify_desktop
@@@ -601,12 -589,12 +604,12 @@@ Prerequisite
      Used by the `oracle' plugin.
  
    * libcredis (optional)
 -    Used by the redis plugin. Please note that you require a 0.2.2 version
 +    Used by the `redis' plugin. Please note that you require a 0.2.2 version
      or higher. <http://code.google.com/p/credis/>
  
    * libcurl (optional)
 -    If you want to use the `apache', `ascent', `curl', `nginx', or `write_http'
 -    plugin.
 +    If you want to use the `apache', `ascent', `bind', `curl', `curl_json',
 +    `curl_xml', `nginx', or `write_http' plugin.
      <http://curl.haxx.se/>
  
    * libdbi (optional)
      <http://www.gnupg.org/>
  
    * libhal (optional)
 -    If present, the uuid plugin will check for UUID from HAL.
 +    If present, the `uuid' plugin will check for UUID from HAL.
      <http://hal.freedesktop.org/>
  
 +  * libi2c-dev (optional)
 +    Used for the plugin `barometer', provides just the i2c-dev.h header file
 +    for user space i2c development.
 +
    * libiptc (optional)
      For querying iptables counters.
      <http://netfilter.org/>
  
 -    If not found on the system, a version shipped with this distribution can
 -    be used. It requires some Linux headers in /usr/include/linux. You can
 -    force the build system to use the shipped version by specifying
 -      --with-libiptc=shipped
 -    when running the configure script.
 -
    * libjvm (optional)
      Library that encapsulates the `Java Virtual Machine' (JVM). This library is
 -    used by the Java plugin to execute Java bytecode. See “Configuring with
 +    used by the `java' plugin to execute Java bytecode. See “Configuring with
      libjvm” below.
      <http://openjdk.java.net/> (and others)
  
 +  * liblvm2 (optional)
 +    Used by the `lvm' plugin.
 +    <ftp://sources.redhat.com/pub/lvm2/>
 +
    * libmemcached (optional)
      Used by the `memcachec' plugin to connect to a memcache daemon.
      <http://tangent.org/552/libmemcached.html>
      <http://www.netfilter.org/projects/libmnl/>
  
    * libmodbus (optional)
 -    Used by the “modbus” plugin to communicate with Modbus/TCP devices. The
 -    “modbus” plugin works with version 2.0.3 of the library – due to frequent
 +    Used by the `modbus' plugin to communicate with Modbus/TCP devices. The
 +    `modbus' plugin works with version 2.0.3 of the library – due to frequent
      API changes other versions may or may not compile cleanly.
      <http://www.libmodbus.org/>
  
      <http://dev.mysql.com/>
  
    * libnetapp (optional)
 -    Required for the “netapp” plugin.
 +    Required for the `netapp' plugin.
      This library is part of the “Manage ONTAP SDK” published by NetApp.
  
    * libnetsnmp (optional)
      For the `notify_desktop' plugin.
      <http://www.galago-project.org/>
  
 +  * libopenipmi (optional)
 +    Used by the `ipmi' plugin to prove IPMI devices.
 +    <http://openipmi.sourceforge.net/>
 +
    * liboping (optional)
      Used by the `ping' plugin to send and receive ICMP packets.
 -    <http://verplant.org/liboping/>
 +    <http://octo.it/liboping/>
  
    * libowcapi (optional)
      Used by the `onewire' plugin to read values from onewire sensors (or the
  
    * libprotobuf-c, protoc-c (optional)
      Used by the `pinba' plugin to generate a parser for the network packets
 -    sent by the Pinba PHP extension.
 +    sent by the Pinba PHP extension, and by the `write_riemann' plugin to
 +    generate events to be sent to a Riemann server.
      <http://code.google.com/p/protobuf-c/>
  
    * libpython (optional)
      <http://www.python.org/>
  
    * librabbitmq (optional; also called “rabbitmq-c”)
 -    Used by the AMQP plugin for AMQP connections, for example to RabbitMQ.
 +    Used by the `amqp' plugin for AMQP connections, for example to RabbitMQ.
      <http://hg.rabbitmq.com/rabbitmq-c/>
  
 +  * librdkafka (optional; also called “rdkafka”)
 +    Used by the `write_kafka' plugin for producing messages and sending them
 +    to a Kafka broker.
 +    <https://github.com/edenhill/librdkafka>
 +
    * librouteros (optional)
      Used by the `routeros' plugin to connect to a device running `RouterOS'.
 -    <http://verplant.org/librouteros/>
 +    <http://octo.it/librouteros/>
  
    * librrd (optional)
      Used by the `rrdtool' and `rrdcached' plugins. The latter requires RRDtool
      <http://www.lm-sensors.org/>
  
    * libsigrok (optional)
 -    Used by the sigrok plugin. In addition, libsigrok depends on glib,
 +    Used by the `sigrok' plugin. In addition, libsigrok depends on glib,
      libzip, and optionally (depending on which drivers are enabled) on
      libusb, libftdi and libudev.
  
      <http://www.i-scream.org/libstatgrab/>
  
    * libtokyotyrant (optional)
 -    Used by the tokyotyrant plugin.
 +    Used by the `tokyotyrant' plugin.
      <http://1978th.net/tokyotyrant/>
  
    * libupsclient/nut (optional)
      <http://libvirt.org/>
  
    * libxml2 (optional)
 -    Parse XML data. This is needed for the `ascent' and `libvirt' plugins.
 +    Parse XML data. This is needed for the `ascent', `bind', `curl_xml' and
 +    `libvirt' plugins.
      <http://xmlsoft.org/>
  
    * libxmms (optional)
      <http://www.xmms.org/>
  
    * libyajl (optional)
 -    Parse JSON data. This is needed for the `curl_json' plugin.
 +    Parse JSON data. This is needed for the `curl_json' and `log_logstash'
 +    plugins.
      <http://github.com/lloyd/yajl>
  
    * libvarnish (optional)
 -     Fetches statistics from a Varnish instance. This is needed for the Varnish plugin
 +     Fetches statistics from a Varnish instance. This is needed for the
 +     `varnish' plugin.
       <http://varnish-cache.org>
  
  Configuring / Compiling / Installing
@@@ -887,7 -860,7 +890,7 @@@ Contac
  
    For questions, bug reports, development information and basically all other
    concerns please send an email to collectd's mailing list at
 -  <collectd at verplant.org>.
 +  <list at collectd.org>.
  
    For live discussion and more personal contact visit us in IRC, we're in
    channel #collectd on freenode.
  Author
  ------
  
 -  Florian octo Forster <octo at verplant.org>,
 +  Florian octo Forster <octo at collectd.org>,
    Sebastian tokkee Harl <sh at tokkee.org>,
    and many contributors (see `AUTHORS').
  
diff --combined configure.ac
@@@ -981,7 -981,7 +981,7 @@@ if test "x$fp_layout_type" = "xunknown"
        uint8_t c[8];
        double d;
  
 -      d = 8.642135e130; 
 +      d = 8.642135e130;
        memcpy ((void *) &i0, (void *) &d, 8);
  
        i1 = i0;
@@@ -1036,7 -1036,7 +1036,7 @@@ if test "x$fp_layout_type" = "xunknown"
        uint8_t c[8];
        double d;
  
 -      d = 8.642135e130; 
 +      d = 8.642135e130;
        memcpy ((void *) &i0, (void *) &d, 8);
  
        i1 = endianflip (i0);
@@@ -1085,7 -1085,7 +1085,7 @@@ if test "x$fp_layout_type" = "xunknown"
        uint8_t c[8];
        double d;
  
 -      d = 8.642135e130; 
 +      d = 8.642135e130;
        memcpy ((void *) &i0, (void *) &d, 8);
  
        i1 = intswap (i0);
@@@ -1237,7 -1237,7 +1237,7 @@@ AC_MSG_CHECKING([if have htonll defined
        have_htonll="yes"
        AC_DEFINE(HAVE_HTONLL, 1, [Define if the function htonll exists.])
      ])
 - 
 +
  AC_MSG_RESULT([$have_htonll])
  
  # Check for structures
@@@ -1380,7 -1380,7 +1380,7 @@@ collectd additional packages:]
  
  AM_CONDITIONAL([BUILD_FREEBSD],[test "x$x$ac_system" = "xFreeBSD"])
  
 -AM_CONDITIONAL([BUILD_AIX],[test "x$x$ac_system" = "xAIX"]) 
 +AM_CONDITIONAL([BUILD_AIX],[test "x$x$ac_system" = "xAIX"])
  
  if test "x$ac_system" = "xAIX"
  then
@@@ -1710,7 -1710,6 +1710,7 @@@ the
        LDFLAGS="$LDFLAGS $with_libdbi_ldflags"
  
        AC_CHECK_LIB(dbi, dbi_initialize, [with_libdbi="yes"], [with_libdbi="no (Symbol 'dbi_initialize' not found)"])
 +      AC_CHECK_LIB(dbi, dbi_driver_open_r, [with_libdbi_r="yes"], [with_libdbi_r="no"])
  
        CPPFLAGS="$SAVE_CPPFLAGS"
        LDFLAGS="$SAVE_LDFLAGS"
        AC_SUBST(BUILD_WITH_LIBDBI_CPPFLAGS)
        AC_SUBST(BUILD_WITH_LIBDBI_LDFLAGS)
        AC_SUBST(BUILD_WITH_LIBDBI_LIBS)
 +
 +  if test "x$with_libdbi_r" = "xyes"
 +  then
 +              AC_DEFINE(HAVE_LIBDBI_R, 1, [Define if reentrant dbi facility is present and usable.])
 +  fi
  fi
  AM_CONDITIONAL(BUILD_WITH_LIBDBI, test "x$with_libdbi" = "xyes")
  # }}}
@@@ -1946,7 -1940,10 +1946,7 @@@ AM_CONDITIONAL(BUILD_WITH_LIBGCRYPT, te
  # --with-libiptc {{{
  AC_ARG_WITH(libiptc, [AS_HELP_STRING([--with-libiptc@<:@=PREFIX@:>@], [Path to libiptc.])],
  [
 -      if test "x$withval" = "xshipped"
 -      then
 -              with_libiptc="own"
 -      else if test "x$withval" = "xyes"
 +      if test "x$withval" = "xyes"
        then
                with_libiptc="pkgconfig"
        else if test "x$withval" = "xno"
                with_libiptc="yes"
                with_libiptc_cflags="-I$withval/include"
                with_libiptc_libs="-L$withval/lib"
 -      fi; fi; fi
 +      fi; fi
  ],
  [
        if test "x$ac_system" = "xLinux"
  
  CPPFLAGS="$SAVE_CPPFLAGS"
  
 -if test "x$with_libiptc" = "xown"
 -then
 -      with_libiptc_cflags=""
 -      with_libiptc_libs=""
 -fi
 -if test "x$with_libiptc" = "xown"
 -then
 -      AC_CHECK_HEADERS(linux/netfilter_ipv4/ip_tables.h linux/netfilter_ipv6/ip6_tables.h linux/netfilter/x_tables.h, [],
 -      [
 -              with_libiptc="no (Linux iptables headers not found)"
 -      ],
 -      [
 -#include "$srcdir/src/owniptc/ipt_kernel_headers.h"
 -      ])
 -fi
 -AM_CONDITIONAL(BUILD_WITH_OWN_LIBIPTC, test "x$with_libiptc" = "xown")
 -if test "x$with_libiptc" = "xown"
 -then
 -      AC_DEFINE(OWN_LIBIPTC, 1, [Define to 1 if we use the shipped iptc library.])
 -      with_libiptc="yes"
 -fi
 -
  AM_CONDITIONAL(BUILD_WITH_LIBIPTC, test "x$with_libiptc" = "xyes")
  if test "x$with_libiptc" = "xyes"
  then
@@@ -2775,7 -2794,7 +2775,7 @@@ the
        else
                SAVE_CPPFLAGS="$CPPFLAGS"
                CPPFLAGS="$CPPFLAGS $with_snmp_cflags"
 -              
 +
                AC_CHECK_HEADERS(net-snmp/net-snmp-config.h, [], [with_libnetsnmp="no (net-snmp/net-snmp-config.h not found)"])
  
                CPPFLAGS="$SAVE_CPPFLAGS"
  if test "x$with_oracle" = "xyes"
  then
        SAVE_CPPFLAGS="$CPPFLAGS"
 -      SAVE_LDFLAGS="$LDFLAGS"
 +      SAVE_LIBS="$LIBS"
        CPPFLAGS="$CPPFLAGS $with_oracle_cppflags"
 -      LDFLAGS="$LDFLAGS $with_oracle_libs"
 +      LIBS="$LIBS $with_oracle_libs"
  
        AC_CHECK_FUNC(OCIEnvCreate, [with_oracle="yes"], [with_oracle="no (Symbol 'OCIEnvCreate' not found)"])
  
        CPPFLAGS="$SAVE_CPPFLAGS"
 -      LDFLAGS="$SAVE_LDFLAGS"
 +      LIBS="$SAVE_LIBS"
  fi
  if test "x$with_oracle" = "xyes"
  then
@@@ -3002,7 -3021,7 +3002,7 @@@ if test "x$with_libowcapi" = "xyes
  then
        SAVE_CPPFLAGS="$CPPFLAGS"
        CPPFLAGS="$with_libowcapi_cppflags"
 -      
 +
        AC_CHECK_HEADERS(owcapi.h, [with_libowcapi="yes"], [with_libowcapi="no (owcapi.h not found)"])
  
        CPPFLAGS="$SAVE_CPPFLAGS"
@@@ -3013,7 -3032,7 +3013,7 @@@ the
        SAVE_CPPFLAGS="$CPPFLAGS"
        LDFLAGS="$with_libowcapi_libs"
        CPPFLAGS="$with_libowcapi_cppflags"
 -      
 +
        AC_CHECK_LIB(owcapi, OW_get, [with_libowcapi="yes"], [with_libowcapi="no (libowcapi not found)"])
  
        LDFLAGS="$SAVE_LDFLAGS"
@@@ -3578,59 -3597,6 +3578,59 @@@ LDFLAGS="$SAVE_LDFLAGS
  AM_CONDITIONAL(BUILD_WITH_LIBRABBITMQ, test "x$with_librabbitmq" = "xyes")
  # }}}
  
 +# --with-librdkafka {{{
 +AC_ARG_WITH(librdkafka, [AS_HELP_STRING([--with-librdkafka@<:@=PREFIX@:>@], [Path to librdkafka.])],
 +[
 +  if test "x$withval" = "xno" && test "x$withval" != "xyes"
 +  then
 +    with_librdkafka_cppflags="-I$withval/include"
 +    with_librdkafka_ldflags="-L$withval/lib"
 +    with_librdkafka="yes"
 +  else
 +    with_librdkafka="$withval"
 +  fi
 +],
 +[
 +  with_librdkafka="yes"
 +])
 +SAVE_CPPFLAGS="$CPPFLAGS"
 +SAVE_LDFLAGS="$LDFLAGS"
 +
 +if test "x$with_librdkafka" = "xyes"
 +then
 +      AC_CHECK_HEADERS(librdkafka/rdkafka.h, [with_librdkafka="yes"], [with_librdkafka="no (librdkafka/rdkafka.h not found)"])
 +fi
 +
 +if test "x$with_librdkafka" = "xyes"
 +then
 +      AC_CHECK_LIB(rdkafka, rd_kafka_new, [with_librdkafka="yes"], [with_librdkafka="no (Symbol 'rd_kafka_new' not found)"])
 +  AC_CHECK_LIB(rdkafka, rd_kafka_conf_set_log_cb, [with_librdkafka_log_cb="yes"], [with_librdkafka_log_cb="no"])
 +  AC_CHECK_LIB(rdkafka, rd_kafka_conf_set_logger, [with_librdkafka_logger="yes"], [with_librdkafka_logger="no"])
 +fi
 +if test "x$with_librdkafka" = "xyes"
 +then
 +      BUILD_WITH_LIBRDKAFKA_CPPFLAGS="$with_librdkafka_cppflags"
 +      BUILD_WITH_LIBRDKAFKA_LDFLAGS="$with_librdkafka_ldflags"
 +      BUILD_WITH_LIBRDKAFKA_LIBS="-lrdkafka"
 +      AC_SUBST(BUILD_WITH_LIBRDKAFKA_CPPFLAGS)
 +      AC_SUBST(BUILD_WITH_LIBRDKAFKA_LDFLAGS)
 +      AC_SUBST(BUILD_WITH_LIBRDKAFKA_LIBS)
 +      AC_DEFINE(HAVE_LIBRDKAFKA, 1, [Define if librdkafka is present and usable.])
 +  if test "x$with_librdkafka_log_cb" = "xyes"
 +  then
 +        AC_DEFINE(HAVE_LIBRDKAFKA_LOG_CB, 1, [Define if librdkafka log facility is present and usable.])
 +  fi
 +  if test "x$with_librdkafka_logger" = "xyes"
 +  then
 +        AC_DEFINE(HAVE_LIBRDKAFKA_LOGGER, 1, [Define if librdkafka log facility is present and usable.])
 +  fi
 +fi
 +CPPFLAGS="$SAVE_CPPFLAGS"
 +LDFLAGS="$SAVE_LDFLAGS"
 +AM_CONDITIONAL(BUILD_WITH_LIBRDKAFKA, test "x$with_librdkafka" = "xyes")
 +
 +# }}}
 +
  # --with-librouteros {{{
  AC_ARG_WITH(librouteros, [AS_HELP_STRING([--with-librouteros@<:@=PREFIX@:>@], [Path to librouteros.])],
  [
@@@ -4073,7 -4039,7 +4073,7 @@@ CPPFLAGS="$SAVE_CPPFLAGS
  LDFLAGS="$SAVE_LDFLAGS"
  
  if test "x$with_libtokyotyrant" = "xyes"
 -then 
 +then
    BUILD_WITH_LIBTOKYOTYRANT_CPPFLAGS="$with_libtokyotyrant_cppflags"
    BUILD_WITH_LIBTOKYOTYRANT_LDFLAGS="$with_libtokyotyrant_ldflags"
    BUILD_WITH_LIBTOKYOTYRANT_LIBS="$with_libtokyotyrant_libs"
  AM_CONDITIONAL(BUILD_WITH_LIBTOKYOTYRANT, test "x$with_libtokyotyrant" = "xyes")
  # }}}
  
 +# --with-libudev {{{
 +with_libudev_cflags=""
 +with_libudev_ldflags=""
 +AC_ARG_WITH(libudev, [AS_HELP_STRING([--with-libudev@<:@=PREFIX@:>@], [Path to libudev.])],
 +[
 +      if test "x$withval" = "xno"
 +      then
 +              with_libudev="no"
 +      else
 +              with_libudev="yes"
 +              if test "x$withval" != "xyes"
 +              then
 +                      with_libudev_cflags="-I$withval/include"
 +                      with_libudev_ldflags="-L$withval/lib"
 +                      with_libudev="yes"
 +              fi
 +      fi
 +],
 +[
 +      if test "x$ac_system" = "xLinux"
 +      then
 +              with_libudev="yes"
 +      else
 +              with_libudev="no (Linux only library)"
 +      fi
 +])
 +if test "x$with_libudev" = "xyes"
 +then
 +      SAVE_CPPFLAGS="$CPPFLAGS"
 +      CPPFLAGS="$CPPFLAGS $with_libudev_cflags"
 +
 +      AC_CHECK_HEADERS(libudev.h, [], [with_libudev="no (libudev.h not found)"])
 +
 +      CPPFLAGS="$SAVE_CPPFLAGS"
 +fi
 +if test "x$with_libudev" = "xyes"
 +then
 +      SAVE_CPPFLAGS="$CPPFLAGS"
 +      SAVE_LDFLAGS="$LDFLAGS"
 +      CPPFLAGS="$CPPFLAGS $with_libudev_cflags"
 +      LDFLAGS="$LDFLAGS $with_libudev_ldflags"
 +
 +      AC_CHECK_LIB(udev, udev_new,
 +      [
 +              AC_DEFINE(HAVE_LIBUDEV, 1, [Define to 1 if you have the udev library (-ludev).])
 +      ],
 +      [with_libudev="no (libudev not found)"])
 +
 +      CPPFLAGS="$SAVE_CPPFLAGS"
 +      LDFLAGS="$SAVE_LDFLAGS"
 +fi
 +if test "x$with_libudev" = "xyes"
 +then
 +      BUILD_WITH_LIBUDEV_CFLAGS="$with_libudev_cflags"
 +      BUILD_WITH_LIBUDEV_LDFLAGS="$with_libudev_ldflags"
 +      AC_SUBST(BUILD_WITH_LIBUDEV_CFLAGS)
 +      AC_SUBST(BUILD_WITH_LIBUDEV_LDFLAGS)
 +fi
 +AM_CONDITIONAL(BUILD_WITH_LIBUDEV, test "x$with_libudev" = "xyes")
 +# }}}
 +
  # --with-libupsclient {{{
  with_libupsclient_config=""
  with_libupsclient_cflags=""
@@@ -4881,7 -4786,6 +4881,7 @@@ dependency_warning="no
  dependency_error="no"
  
  plugin_ascent="no"
 +plugin_barometer="no"
  plugin_battery="no"
  plugin_bind="no"
  plugin_cgroups="no"
@@@ -4893,6 -4797,7 +4893,7 @@@ plugin_curl_json="no
  plugin_curl_xml="no"
  plugin_df="no"
  plugin_disk="no"
+ plugin_drbd="no"
  plugin_entropy="no"
  plugin_ethstat="no"
  plugin_fscache="no"
@@@ -4902,7 -4807,6 +4903,7 @@@ plugin_ipvs="no
  plugin_irq="no"
  plugin_libvirt="no"
  plugin_load="no"
 +plugin_log_logstash="no"
  plugin_memory="no"
  plugin_multimeter="no"
  plugin_nfs="no"
@@@ -4933,6 -4837,7 +4934,7 @@@ the
        plugin_cpu="yes"
        plugin_cpufreq="yes"
        plugin_disk="yes"
+       plugin_drbd="yes"
        plugin_entropy="yes"
        plugin_fscache="yes"
        plugin_interface="yes"
        plugin_tape="yes"
  fi
  
 +# libi2c-dev
 +with_libi2c="no"
 +if test "x$ac_system" = "xLinux"
 +then
 +AC_CHECK_DECL(i2c_smbus_read_i2c_block_data,
 +      [with_libi2c="yes"],
 +      [with_libi2c="no (symbol i2c_smbus_read_i2c_block_data not found - have you installed libi2c-dev ?)"],
 +      [[#include <stdlib.h>
 +      #include <linux/i2c-dev.h>]])
 +fi
 +
 +if test "x$with_libi2c" = "xyes"
 +then
 +      plugin_barometer="yes"
 +fi
 +
 +
  # libstatgrab
  if test "x$with_libstatgrab" = "xyes"
  then
        plugin_load="yes"
  fi
  
 +if test "x$with_libyajl" = "xyes"
 +then
 +      plugin_log_logstash="yes"
 +fi
 +
  if test "x$c_cv_have_libperl$c_cv_have_perl_ithreads" = "xyesyes"
  then
        plugin_perl="yes"
  
  if test "x$have_termios_h" = "xyes"
  then
 -      plugin_multimeter="yes"
 +      if test "x$ac_system" != "xAIX"
 +      then
 +              plugin_multimeter="yes"
 +      fi
        plugin_ted="yes"
  fi
  
@@@ -5236,7 -5116,6 +5238,7 @@@ AC_PLUGIN([apcups],      [yes]
  AC_PLUGIN([apple_sensors], [$with_libiokit],   [Apple's hardware sensors])
  AC_PLUGIN([aquaero],     [$with_libaquaero5],  [Aquaero's hardware sensors])
  AC_PLUGIN([ascent],      [$plugin_ascent],     [AscentEmu player statistics])
 +AC_PLUGIN([barometer],   [$plugin_barometer],  [Barometer sensor on I2C])
  AC_PLUGIN([battery],     [$plugin_battery],    [Battery statistics])
  AC_PLUGIN([bind],        [$plugin_bind],       [ISC Bind nameserver statistics])
  AC_PLUGIN([conntrack],   [$plugin_conntrack],  [nf_conntrack statistics])
@@@ -5251,6 -5130,7 +5253,7 @@@ AC_PLUGIN([cgroups],     [$plugin_cgrou
  AC_PLUGIN([dbi],         [$with_libdbi],       [General database statistics])
  AC_PLUGIN([df],          [$plugin_df],         [Filesystem usage statistics])
  AC_PLUGIN([disk],        [$plugin_disk],       [Disk usage statistics])
+ AC_PLUGIN([drbd],        [$plugin_drbd],       [DRBD statistics])
  AC_PLUGIN([dns],         [$with_libpcap],      [DNS traffic analysis])
  AC_PLUGIN([email],       [yes],                [EMail statistics])
  AC_PLUGIN([entropy],     [$plugin_entropy],    [Entropy statistics])
@@@ -5269,7 -5149,6 +5272,7 @@@ AC_PLUGIN([java],        [$with_java]
  AC_PLUGIN([libvirt],     [$plugin_libvirt],    [Virtual machine statistics])
  AC_PLUGIN([load],        [$plugin_load],       [System load])
  AC_PLUGIN([logfile],     [yes],                [File logging plugin])
 +AC_PLUGIN([log_logstash], [$plugin_log_logstash], [Logstash json_event compatible logging])
  AC_PLUGIN([lpar],        [$with_perfstat],     [AIX logical partitions statistics])
  AC_PLUGIN([lvm],         [$with_liblvm2app],   [LVM statistics])
  AC_PLUGIN([madwifi],     [$have_linux_wireless_h], [Madwifi wireless statistics])
@@@ -5347,7 -5226,6 +5350,7 @@@ AC_PLUGIN([vserver],     [$plugin_vserv
  AC_PLUGIN([wireless],    [$plugin_wireless],   [Wireless statistics])
  AC_PLUGIN([write_graphite], [yes],             [Graphite / Carbon output plugin])
  AC_PLUGIN([write_http],  [$with_libcurl],      [HTTP output plugin])
 +AC_PLUGIN([write_kafka],  [$with_librdkafka],  [Kafka output plugin])
  AC_PLUGIN([write_mongodb], [$with_libmongoc],  [MongoDB output plugin])
  AC_PLUGIN([write_redis], [$with_libcredis],    [Redis output plugin])
  AC_PLUGIN([write_riemann], [$have_protoc_c],   [Riemann output plugin])
@@@ -5358,7 -5236,6 +5361,7 @@@ dnl Default configuration fil
  # Load either syslog or logfile
  LOAD_PLUGIN_SYSLOG=""
  LOAD_PLUGIN_LOGFILE=""
 +LOAD_PLUGIN_LOG_LOGSTASH=""
  
  AC_MSG_CHECKING([which default log plugin to load])
  default_log_plugin="none"
  else
        LOAD_PLUGIN_LOGFILE="##"
  fi
 +
 +if test "x$enable_logfile" = "xyes"
 +then
 +  LOAD_PLUGIN_LOG_LOGSTASH="#"
 +else
 +  LOAD_PLUGIN_LOG_LOGSTASH="##"
 +fi
 +
 +
  AC_MSG_RESULT([$default_log_plugin])
  
  AC_SUBST(LOAD_PLUGIN_SYSLOG)
  AC_SUBST(LOAD_PLUGIN_LOGFILE)
 +AC_SUBST(LOAD_PLUGIN_LOG_LOGSTASH)
  
  DEFAULT_LOG_LEVEL="info"
  if test "x$enable_debug" = "xyes"
@@@ -5542,7 -5409,6 +5545,7 @@@ Configuration
      libesmtp  . . . . . . $with_libesmtp
      libganglia  . . . . . $with_libganglia
      libgcrypt . . . . . . $with_libgcrypt
 +    libi2c-dev  . . . . . $with_libi2c
      libiokit  . . . . . . $with_libiokit
      libiptc . . . . . . . $with_libiptc
      libjvm  . . . . . . . $with_java
      libpq . . . . . . . . $with_libpq
      libpthread  . . . . . $with_libpthread
      librabbitmq . . . . . $with_librabbitmq
 +    librdkafka  . . . . . $with_librdkafka
      librouteros . . . . . $with_librouteros
      librrd  . . . . . . . $with_librrd
      libsensors  . . . . . $with_libsensors
      libsigrok   . . . . . $with_libsigrok
      libstatgrab . . . . . $with_libstatgrab
      libtokyotyrant  . . . $with_libtokyotyrant
 +    libudev . . . . . . . $with_libudev
      libupsclient  . . . . $with_libupsclient
      libvarnish  . . . . . $with_libvarnish
      libvirt . . . . . . . $with_libvirt
      aquaero . . . . . . . $enable_aquaero
      apple_sensors . . . . $enable_apple_sensors
      ascent  . . . . . . . $enable_ascent
 +    barometer . . . . . . $enable_barometer
      battery . . . . . . . $enable_battery
      bind  . . . . . . . . $enable_bind
      conntrack . . . . . . $enable_conntrack
      df  . . . . . . . . . $enable_df
      disk  . . . . . . . . $enable_disk
      dns . . . . . . . . . $enable_dns
+     drbd  . . . . . . . . $enable_drbd
      email . . . . . . . . $enable_email
      entropy . . . . . . . $enable_entropy
      ethstat . . . . . . . $enable_ethstat
      load  . . . . . . . . $enable_load
      logfile . . . . . . . $enable_logfile
      lpar  . . . . . . . . $enable_lpar
 +    log_logstash  . . . . $enable_log_logstash
      lvm . . . . . . . . . $enable_lvm
      madwifi . . . . . . . $enable_madwifi
      match_empty_counter . $enable_match_empty_counter
      wireless  . . . . . . $enable_wireless
      write_graphite  . . . $enable_write_graphite
      write_http  . . . . . $enable_write_http
 +    write_kafka . . . . . $enable_write_kafka
      write_mongodb . . . . $enable_write_mongodb
      write_redis . . . . . $enable_write_redis
      write_riemann . . . . $enable_write_riemann
diff --combined src/Makefile.am
@@@ -17,8 -17,6 +17,8 @@@ endi
  AM_CPPFLAGS += -DPLUGINDIR='"${pkglibdir}"'
  AM_CPPFLAGS += -DPKGDATADIR='"${pkgdatadir}"'
  
 +AUTOMAKE_OPTIONS = subdir-objects
 +
  sbin_PROGRAMS = collectd collectdmon
  bin_PROGRAMS = collectd-nagios collectdctl collectd-tg
  
@@@ -41,9 -39,7 +41,9 @@@ collectd_SOURCES = collectd.c collectd.
                   utils_subst.c utils_subst.h \
                   utils_tail.c utils_tail.h \
                   utils_time.c utils_time.h \
 -                 types_list.c types_list.h
 +                 types_list.c types_list.h \
 +                 utils_threshold.c utils_threshold.h
 +
  
  collectd_CPPFLAGS =  $(AM_CPPFLAGS) $(LTDLINCL)
  collectd_CFLAGS = $(AM_CFLAGS)
@@@ -137,9 -133,9 +137,9 @@@ collectd_tg_LDADD += libcollectdclient/
  collectd_tg_DEPENDENCIES = libcollectdclient/libcollectdclient.la
  
  
 -pkglib_LTLIBRARIES = 
 +pkglib_LTLIBRARIES =
  
 -BUILT_SOURCES = 
 +BUILT_SOURCES =
  CLEANFILES =
  
  if BUILD_PLUGIN_AGGREGATION
@@@ -221,15 -217,6 +221,15 @@@ collectd_LDADD += "-dlopen" ascent.l
  collectd_DEPENDENCIES += ascent.la
  endif
  
 +if BUILD_PLUGIN_BAROMETER
 +pkglib_LTLIBRARIES += barometer.la
 +barometer_la_SOURCES = barometer.c
 +barometer_la_LDFLAGS = -module -avoid-version
 +barometer_la_LIBADD = -lm
 +collectd_LDADD += "-dlopen" barometer.la
 +collectd_DEPENDENCIES += barometer.la
 +endif
 +
  if BUILD_PLUGIN_BATTERY
  pkglib_LTLIBRARIES += battery.la
  battery_la_SOURCES = battery.c
@@@ -286,7 -273,7 +286,7 @@@ pkglib_LTLIBRARIES += cpu.l
  cpu_la_SOURCES = cpu.c
  cpu_la_CFLAGS = $(AM_CFLAGS)
  cpu_la_LDFLAGS = -module -avoid-version
 -cpu_la_LIBADD = 
 +cpu_la_LIBADD =
  if BUILD_WITH_LIBKSTAT
  cpu_la_LIBADD += -lkstat
  endif
@@@ -384,7 -371,7 +384,7 @@@ pkglib_LTLIBRARIES += disk.l
  disk_la_SOURCES = disk.c
  disk_la_CFLAGS = $(AM_CFLAGS)
  disk_la_LDFLAGS = -module -avoid-version
 -disk_la_LIBADD = 
 +disk_la_LIBADD =
  if BUILD_WITH_LIBKSTAT
  disk_la_LIBADD += -lkstat
  endif
@@@ -395,12 -382,9 +395,12 @@@ if BUILD_WITH_LIBIOKI
  disk_la_LDFLAGS += -framework IOKit
  endif
  if BUILD_WITH_LIBSTATGRAB
 -disk_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)  
 +disk_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
  disk_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
  endif
 +if BUILD_WITH_LIBUDEV
 +disk_la_LIBADD += -ludev
 +endif
  if BUILD_WITH_PERFSTAT
  disk_la_LIBADD += -lperfstat
  endif
@@@ -417,6 -401,15 +417,15 @@@ collectd_LDADD += "-dlopen" dns.l
  collectd_DEPENDENCIES += dns.la
  endif
  
+ if BUILD_PLUGIN_DRBD
+ pkglib_LTLIBRARIES += drbd.la
+ drbd_la_SOURCES = drbd.c
+ drbd_la_LDFLAGS = -module -avoid-version
+ drbd_la_LIBADD = -lpthread
+ collectd_LDADD += "-dlopen" drbd.la
+ collectd_DEPENDENCIES += drbd.la
+ endif
  if BUILD_PLUGIN_EMAIL
  pkglib_LTLIBRARIES += email.la
  email_la_SOURCES = email.c
@@@ -593,17 -586,6 +602,17 @@@ collectd_LDADD += "-dlopen" logfile.l
  collectd_DEPENDENCIES += logfile.la
  endif
  
 +if BUILD_PLUGIN_LOG_LOGSTASH
 +pkglib_LTLIBRARIES += log_logstash.la
 +log_logstash_la_SOURCES = log_logstash.c
 +log_logstash_la_CFLAGS = $(AM_CFLAGS)
 +log_logstash_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBYAJL_LDFLAGS)
 +log_logstash_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
 +log_logstash_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS)
 +collectd_LDADD += "-dlopen" log_logstash.la
 +collectd_DEPENDENCIES += log_logstash.la
 +endif
 +
  if BUILD_PLUGIN_LPAR
  pkglib_LTLIBRARIES += lpar.la
  lpar_la_SOURCES = lpar.c
@@@ -889,7 -871,7 +898,7 @@@ if BUILD_PLUGIN_OLSR
  pkglib_LTLIBRARIES += olsrd.la
  olsrd_la_SOURCES = olsrd.c
  olsrd_la_LDFLAGS = -module -avoid-version
 -olsrd_la_LIBADD = 
 +olsrd_la_LIBADD =
  if BUILD_WITH_LIBSOCKET
  olsrd_la_LIBADD += -lsocket
  endif
@@@ -1296,7 -1278,6 +1305,7 @@@ pkglib_LTLIBRARIES += unixsock.l
  unixsock_la_SOURCES = unixsock.c \
                      utils_cmd_flush.h utils_cmd_flush.c \
                      utils_cmd_getval.h utils_cmd_getval.c \
 +                    utils_cmd_getthreshold.h utils_cmd_getthreshold.c \
                      utils_cmd_listval.h utils_cmd_listval.c \
                      utils_cmd_putval.h utils_cmd_putval.c \
                      utils_cmd_putnotif.h utils_cmd_putnotif.c
@@@ -1415,19 -1396,6 +1424,19 @@@ endi
  collectd_DEPENDENCIES += write_http.la
  endif
  
 +if BUILD_PLUGIN_WRITE_KAFKA
 +pkglib_LTLIBRARIES += write_kafka.la
 +write_kafka_la_SOURCES = write_kafka.c \
 +                        utils_format_graphite.c utils_format_graphite.h \
 +                        utils_format_json.c utils_format_json.h \
 +                        utils_cmd_putval.c utils_cmd_putval.h \
 +                        utils_crc32.c utils_crc32.h
 +write_kafka_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBRDKAFKA_LDFLAGS)
 +write_kafka_la_LIBADD = $(BUILD_WITH_LIBRDKAFKA_LIBS)
 +collectd_LDADD += "-dlopen" write_kafka.la
 +collectd_DEPENDENCIES += write_kafka.la
 +endif
 +
  if BUILD_PLUGIN_WRITE_MONGODB
  pkglib_LTLIBRARIES += write_mongodb.la
  write_mongodb_la_SOURCES = write_mongodb.c
@@@ -1450,7 -1418,7 +1459,7 @@@ endi
  
  if BUILD_PLUGIN_WRITE_RIEMANN
  pkglib_LTLIBRARIES += write_riemann.la
 -write_riemann_la_SOURCES = write_riemann.c
 +write_riemann_la_SOURCES = write_riemann.c write_riemann_threshold.c
  nodist_write_riemann_la_SOURCES = riemann.pb-c.c riemann.pb-c.h
  write_riemann_la_LDFLAGS = -module -avoid-version
  write_riemann_la_LIBADD = -lprotobuf-c
@@@ -1576,48 -1544,15 +1585,48 @@@ uninstall-hook
        rm -f $(DESTDIR)$(sysconfdir)/collectd.conf
        rm -f $(DESTDIR)$(pkgdatadir)/postgresql_default.conf;
  
 -if BUILD_FEATURE_DEBUG
 -bin_PROGRAMS += utils_vl_lookup_test
 -utils_vl_lookup_test_SOURCES = utils_vl_lookup_test.c \
 +check_PROGRAMS = test_common test_utils_avltree test_utils_heap test_utils_mount test_utils_vl_lookup
 +
 +test_common_SOURCES = tests/test_common.c \
 +                      common.h common.c \
 +                      tests/mock/plugin.c \
 +                      tests/mock/utils_cache.c \
 +                      tests/mock/utils_time.c
 +test_common_CPPFLAGS = $(AM_CPPFLAGS) $(LTDLINCL)
 +test_common_LDFLAGS = -export-dynamic
 +test_common_LDADD =
 +
 +test_utils_avltree_SOURCES = tests/test_utils_avltree.c \
 +                             utils_avltree.c utils_avltree.h
 +test_utils_avltree_CPPFLAGS = $(AM_CPPFLAGS) $(LTDLINCL)
 +test_utils_avltree_LDFLAGS = -export-dynamic
 +test_utils_avltree_LDADD =
 +
 +test_utils_heap_SOURCES = tests/test_utils_heap.c \
 +                          utils_heap.c utils_heap.h
 +test_utils_heap_CPPFLAGS = $(AM_CPPFLAGS) $(LTDLINCL)
 +test_utils_heap_LDFLAGS = -export-dynamic
 +test_utils_heap_LDADD =
 +
 +test_utils_mount_SOURCES = tests/test_utils_mount.c \
 +                           utils_mount.c utils_mount.h \
 +                           common.c common.h \
 +                           tests/mock/plugin.c \
 +                           tests/mock/utils_cache.c \
 +                           tests/mock/utils_time.c
 +test_utils_mount_CPPFLAGS = $(AM_CPPFLAGS) $(LTDLINCL)
 +test_utils_mount_LDFLAGS = -export-dynamic
 +test_utils_mount_LDADD =
 +
 +test_utils_vl_lookup_SOURCES = tests/test_utils_vl_lookup.c \
                                 utils_vl_lookup.h utils_vl_lookup.c \
                                 utils_avltree.c utils_avltree.h \
 -                               common.h
 -
 -utils_vl_lookup_test_CPPFLAGS =  $(AM_CPPFLAGS) $(LTDLINCL) -DBUILD_TEST=1
 -utils_vl_lookup_test_CFLAGS = $(AM_CFLAGS)
 -utils_vl_lookup_test_LDFLAGS = -export-dynamic
 -utils_vl_lookup_test_LDADD =
 -endif
 +                               common.c common.h \
 +                               tests/mock/plugin.c \
 +                               tests/mock/utils_cache.c \
 +                               tests/mock/utils_time.c
 +test_utils_vl_lookup_CPPFLAGS = $(AM_CPPFLAGS) $(LTDLINCL)
 +test_utils_vl_lookup_LDFLAGS = -export-dynamic
 +test_utils_vl_lookup_LDADD =
 +
 +TESTS = test_common test_utils_avltree test_utils_heap test_utils_mount test_utils_vl_lookup
diff --combined src/collectd.conf.in
@@@ -52,7 -52,6 +52,7 @@@
  
  @LOAD_PLUGIN_SYSLOG@LoadPlugin syslog
  @LOAD_PLUGIN_LOGFILE@LoadPlugin logfile
 +@LOAD_PLUGIN_LOG_LOGSTASH@LoadPlugin log_logstash
  
  #<Plugin logfile>
  #     LogLevel @DEFAULT_LOG_LEVEL@
  #     PrintSeverity false
  #</Plugin>
  
 +#<Plugin log_logstash>
 +#     LogLevel @DEFAULT_LOG_LEVEL@
 +#     File "@localstatedir@/log/@PACKAGE_NAME@.json.log"
 +#</Plugin>
 +
  #<Plugin syslog>
  #     LogLevel @DEFAULT_LOG_LEVEL@
  #</Plugin>
@@@ -87,7 -81,6 +87,7 @@@
  #@BUILD_PLUGIN_APPLE_SENSORS_TRUE@LoadPlugin apple_sensors
  #@BUILD_PLUGIN_AQUAERO_TRUE@LoadPlugin aquaero
  #@BUILD_PLUGIN_ASCENT_TRUE@LoadPlugin ascent
 +#@BUILD_PLUGIN_BAROMETER_TRUE@LoadPlugin barometer
  #@BUILD_PLUGIN_BATTERY_TRUE@LoadPlugin battery
  #@BUILD_PLUGIN_BIND_TRUE@LoadPlugin bind
  #@BUILD_PLUGIN_CONNTRACK_TRUE@LoadPlugin conntrack
  #@BUILD_PLUGIN_DF_TRUE@LoadPlugin df
  #@BUILD_PLUGIN_DISK_TRUE@LoadPlugin disk
  #@BUILD_PLUGIN_DNS_TRUE@LoadPlugin dns
+ #@BUILD_PLUGIN_DRBD_TRUE@LoadPlugin drbd
  #@BUILD_PLUGIN_EMAIL_TRUE@LoadPlugin email
  #@BUILD_PLUGIN_ENTROPY_TRUE@LoadPlugin entropy
  #@BUILD_PLUGIN_ETHSTAT_TRUE@LoadPlugin ethstat
  #@BUILD_PLUGIN_WIRELESS_TRUE@LoadPlugin wireless
  #@BUILD_PLUGIN_WRITE_GRAPHITE_TRUE@LoadPlugin write_graphite
  #@BUILD_PLUGIN_WRITE_HTTP_TRUE@LoadPlugin write_http
 +#@BUILD_PLUGIN_WRITE_KAFKA_TRUE@LoadPlugin write_kafka
  #@BUILD_PLUGIN_WRITE_MONGODB_TRUE@LoadPlugin write_mongodb
  #@BUILD_PLUGIN_WRITE_REDIS_TRUE@LoadPlugin write_redis
  #@BUILD_PLUGIN_WRITE_RIEMANN_TRUE@LoadPlugin write_riemann
  # ription of those options is available in the collectd.conf(5) manual page. #
  ##############################################################################
  
 -#<Plugin "aggregation">
 +#<Plugin aggregation>
  #  <Aggregation>
  #    #Host "unspecified"
  #    Plugin "cpu"
  #  </Aggregation>
  #</Plugin>
  
 -#<Plugin "amqp">
 +#<Plugin amqp>
  #  <Publish "name">
  #    Host "localhost"
  #    Port "5672"
  #     CACert "/etc/ssl/ca.crt"
  #</Plugin>
  
 +#<Plugin "barometer">
 +#   Device            "/dev/i2c-0";
 +#   Oversampling      512
 +#   PressureOffset    0.0
 +#   TemperatureOffset 0.0
 +#   Normalization     2
 +#   Altitude          238.0
 +#   TemperatureSensor "myserver/onewire-F10FCA000800/temperature"
 +#</Plugin>
 +
  #<Plugin "bind">
  #  URL "http://localhost:8053/"
  #  ParseTime       false
  #  IgnoreSelected false
  #</Plugin>
  
 +#<Plugin cpu>
 +#  ReportActive false
 +#  ReportByCpu true
 +#  ValuesPercentage false
 +#</Plugin>
 +#
  #<Plugin csv>
  #     DataDir "@localstatedir@/lib/@PACKAGE_NAME@/csv"
  #     StoreRates false
  #  </URL>
  #</Plugin>
  
 -#<Plugin "curl_xml">
 +#<Plugin curl_xml>
  #  <URL "http://localhost/stats.xml">
  #    Host "my_host"
  #    Instance "some_instance"
  #<Plugin disk>
  #     Disk "/^[hs]d[a-f][0-9]?$/"
  #     IgnoreSelected false
 +#     UseBSDName false
 +#     UdevNameAttr "DEVNAME"
  #</Plugin>
  
  #<Plugin dns>
  #     </Directory>
  #</Plugin>
  
 -#<Plugin "gmond">
 +#<Plugin gmond>
  #  MCReceiveFrom "239.2.11.71" "8649"
  #  <Metric "swap_total">
  #    Type "swap"
  #     IgnoreSelected true
  #</Plugin>
  
 -#<Plugin "java">
 +#<Plugin java>
  #     JVMArg "-verbose:jni"
  #     JVMArg "-Djava.class.path=@prefix@/share/collectd/java/collectd-api.jar"
  #
  #     IgnoreSelected false
  #     HostnameFormat name
  #     InterfaceFormat name
 +#     PluginInstanceFormat name
  #</Plugin>
  
  #<Plugin load>
  #             Password "secret"
  #             Database "db_name"
  #             MasterStats true
 +#             ConnectTimeout 10
  #     </Database>
  #
  #     <Database db_name2>
 +#             Alias "squeeze"
  #             Host "localhost"
  #             Socket "/var/run/mysql/mysqld.sock"
  #             SlaveStats true
  #  TimerPercentile 90.0
  #</Plugin>
  
 -#<Plugin "swap">
 +#<Plugin swap>
  #     ReportByDevice false
  #     ReportBytes true
  #     ValuesAbsolute true
  #     ValuesPercentage false
  #</Plugin>
  
 -#<Plugin "table">
 +#<Plugin table>
  #     <Table "/proc/slabinfo">
  #             Instance "slabinfo"
  #             Separator " "
  #     </Table>
  #</Plugin>
  
 -#<Plugin "tail">
 +#<Plugin tail>
  #  <File "/var/log/exim4/mainlog">
  #    Instance "exim"
 +#    Interval 60
  #    <Match>
  #      Regex "S=([1-9][0-9]*)"
  #      DSType "CounterAdd"
  #  </File>
  #</Plugin>
  
 -#<Plugin "tail_csv">
 +#<Plugin tail_csv>
  #   <Metric "dropped">
  #       Type "percent"
  #       Instance "dropped"
  #             VerifyPeer true
  #             VerifyHost true
  #             CACert "/etc/ssl/ca.crt"
 +#             CAPath "/etc/ssl/certs/"
 +#             ClientKey "/etc/ssl/client.pem"
 +#             ClientCert "/etc/ssl/client.crt"
 +#             ClientKeyPass "secret"
 +#             SSLVersion "TLSv1"
  #             Format "Command"
  #             StoreRates false
  #     </URL>
  #</Plugin>
  
 +#<Plugin write_kafka>
 +#  Property "metadata.broker.list" "localhost:9092"
 +#  <Topic "collectd">
 +#    Format JSON
 +#  </Topic>
 +#</Plugin>
 +
  #<Plugin write_mongodb>
  #     <Node "example">
  #             Host "localhost"
  ##############################################################################
  
  #@BUILD_PLUGIN_THRESHOLD_TRUE@LoadPlugin "threshold"
 -#<Plugin "threshold">
 +#<Plugin threshold>
  #  <Type "foo">
  #    WarningMin    0.00
  #    WarningMax 1000.00
diff --combined src/types.db
@@@ -53,6 -53,7 +53,7 @@@ dns_response          value:DERIVE:0:
  dns_transfer          value:DERIVE:0:U
  dns_update            value:DERIVE:0:U
  dns_zops              value:DERIVE:0:U
+ drbd_resource value:DERIVE:0:U
  duration              seconds:GAUGE:0:U
  email_check           value:GAUGE:0:U
  email_count           value:GAUGE:0:U
@@@ -134,7 -135,6 +135,7 @@@ ping_stddev                value:GAUGE:0:6553
  ping                  value:GAUGE:0:65535
  players                       value:GAUGE:0:1000000
  power                 value:GAUGE:0:U
 +pressure                      value:GAUGE:0:U
  protocol_counter      value:DERIVE:0:U
  ps_code                       value:GAUGE:0:9223372036854775807
  ps_count              processes:GAUGE:0:1000000, threads:GAUGE:0:1000000