Merge pull request #719 from mfournier/openldap-improvements-rebased
authorPierre-Yves Ritschard <pyr@spootnik.org>
Sat, 15 Nov 2014 09:52:47 +0000 (10:52 +0100)
committerPierre-Yves Ritschard <pyr@spootnik.org>
Sat, 15 Nov 2014 09:52:47 +0000 (10:52 +0100)
Openldap plugin

1  2 
README
configure.ac
src/Makefile.am
src/collectd.conf.in
src/collectd.conf.pod

diff --combined README
--- 1/README
--- 2/README
+++ b/README
@@@ -146,6 -146,9 +146,6 @@@ Feature
        Detailed CPU statistics of the “Logical Partitions” virtualization
        technique built into IBM's POWER processors.
  
 -    - libvirt
 -      CPU, memory, disk and network I/O statistics from virtual machines.
 -
      - lvm
        Size of “Logical Volumes” (LV) and “Volume Groups” (VG) of Linux'
        “Logical Volume Manager” (LVM).
        Read onewire sensors using the owcapu library of the owfs project.
        Please read in collectd.conf(5) why this plugin is experimental.
  
+     - openldap
+       Read monitoring information from OpenLDAP's cn=Monitor subtree.
      - openvpn
        RX and TX of each client in openvpn-status.log (status-version 2).
        <http://openvpn.net/index.php/documentation/howto.html>
        to have its measurements fed to collectd. This includes multimeters,
        sound level meters, thermometers, and much more.
  
 +    - smart
 +      Collect SMART statistics, notably load cycle count, temperature
 +      and bad sectors.
 +
      - snmp
        Read values from SNMP (Simple Network Management Protocol) enabled
        network devices such as switches, routers, thermometers, rack monitoring
      - varnish
        Various statistics from Varnish, an HTTP accelerator.
  
 +    - virt
 +      CPU, memory, disk and network I/O statistics from virtual machines.
 +
      - vmem
        Virtual memory statistics, e. g. the number of page-ins/-outs or the
        number of pagefaults.
@@@ -654,6 -653,10 +657,10 @@@ Prerequisite
      libjvm” below.
      <http://openjdk.java.net/> (and others)
  
+   * libldap (optional)
+     Used by the `openldap' plugin.
+     <http://www.openldap.org/>
    * liblvm2 (optional)
      Used by the `lvm' plugin.
      <ftp://sources.redhat.com/pub/lvm2/>
  
    * libxml2 (optional)
      Parse XML data. This is needed for the `ascent', `bind', `curl_xml' and
 -    `libvirt' plugins.
 +    `virt' plugins.
      <http://xmlsoft.org/>
  
    * libxmms (optional)
diff --combined configure.ac
@@@ -1,6 -1,6 +1,6 @@@
  dnl Process this file with autoconf to produce a configure script.
  AC_INIT([collectd],[m4_esyscmd(./version-gen.sh)])
 -AC_CONFIG_SRCDIR(src/collectd.c)
 +AC_CONFIG_SRCDIR(src/)
  AC_CONFIG_HEADERS(src/config.h)
  AC_CONFIG_AUX_DIR([libltdl/config])
  
@@@ -527,7 -527,7 +527,7 @@@ AC_CHECK_HEADERS(linux/un.h, [], []
  #endif
  ])
  
 -AC_CHECK_HEADERS(pwd.h grp.h sys/un.h ctype.h limits.h xfs/xqm.h fs_info.h fshelp.h paths.h mntent.h mnttab.h sys/fstyp.h sys/fs_types.h sys/mntent.h sys/mnttab.h sys/statfs.h sys/statvfs.h sys/vfs.h sys/vfstab.h kvm.h wordexp.h)
 +AC_CHECK_HEADERS(pwd.h grp.h sys/un.h ctype.h limits.h xfs/xqm.h fs_info.h fshelp.h paths.h mntent.h mnttab.h sys/fstyp.h sys/fs_types.h sys/mntent.h sys/mnttab.h sys/statfs.h sys/statvfs.h sys/vfs.h sys/vfstab.h kvm.h wordexp.h locale.h)
  
  # For the dns plugin
  AC_CHECK_HEADERS(arpa/nameser.h)
@@@ -602,7 -602,7 +602,7 @@@ AC_HEADER_TIM
  # Checks for library functions.
  #
  AC_PROG_GCC_TRADITIONAL
 -AC_CHECK_FUNCS(gettimeofday select strdup strtol getaddrinfo getnameinfo strchr memcpy strstr strcmp strncmp strncpy strlen strncasecmp strcasecmp openlog closelog sysconf setenv if_indextoname)
 +AC_CHECK_FUNCS(gettimeofday select strdup strtol getaddrinfo getnameinfo strchr memcpy strstr strcmp strncmp strncpy strlen strncasecmp strcasecmp openlog closelog sysconf setenv if_indextoname setlocale)
  
  AC_FUNC_STRERROR_R
  
@@@ -809,9 -809,7 +809,9 @@@ if test "x$have_swapctl" = "xyes"; the
  #  undef _LARGEFILE64_SOURCE
  #endif
  #include <sys/stat.h>
 +#include <sys/param.h>
  #include <sys/swap.h>
 +#include <unistd.h>
  ]]],
  [[[
  int num = swapctl(0, NULL);
  #  undef _LARGEFILE64_SOURCE
  #endif
  #include <sys/stat.h>
 +#include <sys/param.h>
  #include <sys/swap.h>
 +#include <unistd.h>
  ]]],
  [[[
  int num = swapctl(0, NULL, 0);
@@@ -1315,7 -1311,7 +1315,7 @@@ AC_CHECK_MEMBERS([struct kinfo_proc.ki_
  #include <sys/user.h>
        ])
  
 -AC_CHECK_MEMBERS([struct kinfo_proc.kp_proc, struct kinfo_proc.kp_eproc],
 +AC_CHECK_MEMBERS([struct kinfo_proc.p_pid, struct kinfo_proc.p_vm_rssize],
        [
                AC_DEFINE(HAVE_STRUCT_KINFO_PROC_OPENBSD, 1,
                        [Define if struct kinfo_proc exists in the OpenBSD variant.])
  
  AC_CHECK_MEMBERS([struct udphdr.uh_dport, struct udphdr.uh_sport], [], [],
  [#define _BSD_SOURCE
 +#define _DEFAULT_SOURCE
  #if HAVE_STDINT_H
  # include <stdint.h>
  #endif
  ])
  AC_CHECK_MEMBERS([struct udphdr.dest, struct udphdr.source], [], [],
  [#define _BSD_SOURCE
 +#define _DEFAULT_SOURCE
  #if HAVE_STDINT_H
  # include <stdint.h>
  #endif
                 [with_libcurl="yes"],
                 [with_libcurl="no (symbol 'curl_easy_init' not found)"],
                 [$with_curl_libs])
 +              AC_CHECK_DECL(CURLOPT_USERNAME,
 +               [have_curlopt_username="yes"],
 +               [have_curlopt_username="no"],
 +               [[#include <curl/curl.h>]])
        fi
  fi
  if test "x$with_libcurl" = "xyes"
        BUILD_WITH_LIBCURL_LIBS="$with_curl_libs"
        AC_SUBST(BUILD_WITH_LIBCURL_CFLAGS)
        AC_SUBST(BUILD_WITH_LIBCURL_LIBS)
 +
 +      if test "x$have_curlopt_username" = "xyes"
 +      then
 +              AC_DEFINE(HAVE_CURLOPT_USERNAME, 1, [Define if libcurl supports CURLOPT_USERNAME option.])
 +      fi
  fi
  AM_CONDITIONAL(BUILD_WITH_LIBCURL, test "x$with_libcurl" = "xyes")
  # }}}
@@@ -2247,6 -2232,64 +2247,64 @@@ AC_SUBST(JAVA_LIBS
  AM_CONDITIONAL(BUILD_WITH_JAVA, test "x$with_java" = "xyes")
  # }}}
  
+ # --with-libldap {{{
+ AC_ARG_WITH(libldap, [AS_HELP_STRING([--with-libldap@<:@=PREFIX@:>@], [Path to libldap.])],
+ [
+  if test "x$withval" = "xyes"
+  then
+        with_libldap="yes"
+  else if test "x$withval" = "xno"
+  then
+        with_libldap="no"
+  else
+        with_libldap="yes"
+        LIBLDAP_CPPFLAGS="$LIBLDAP_CPPFLAGS -I$withval/include"
+        LIBLDAP_LDFLAGS="$LIBLDAP_LDFLAGS -L$withval/lib"
+  fi; fi
+ ],
+ [with_libldap="yes"])
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ SAVE_LDFLAGS="$LDFLAGS"
+ CPPFLAGS="$CPPFLAGS $LIBLDAP_CPPFLAGS"
+ LDFLAGS="$LDFLAGS $LIBLDAP_LDFLAGS"
+ if test "x$with_libldap" = "xyes"
+ then
+       if test "x$LIBLDAP_CPPFLAGS" != "x"
+       then
+               AC_MSG_NOTICE([libldap CPPFLAGS: $LIBLDAP_CPPFLAGS])
+       fi
+       AC_CHECK_HEADERS(ldap.h,
+       [with_libldap="yes"],
+       [with_libldap="no ('ldap.h' not found)"])
+ fi
+ if test "x$with_libldap" = "xyes"
+ then
+       if test "x$LIBLDAP_LDFLAGS" != "x"
+       then
+               AC_MSG_NOTICE([libldap LDFLAGS: $LIBLDAP_LDFLAGS])
+       fi
+       AC_CHECK_LIB(ldap, ldap_initialize,
+       [with_libldap="yes"],
+       [with_libldap="no (symbol 'ldap_initialize' not found)"])
+ fi
+ CPPFLAGS="$SAVE_CPPFLAGS"
+ LDFLAGS="$SAVE_LDFLAGS"
+ if test "x$with_libldap" = "xyes"
+ then
+       BUILD_WITH_LIBLDAP_CPPFLAGS="$LIBLDAP_CPPFLAGS"
+       BUILD_WITH_LIBLDAP_LDFLAGS="$LIBLDAP_LDFLAGS"
+       AC_SUBST(BUILD_WITH_LIBLDAP_CPPFLAGS)
+       AC_SUBST(BUILD_WITH_LIBLDAP_LDFLAGS)
+ fi
+ AM_CONDITIONAL(BUILD_WITH_LIBLDAP, test "x$with_libldap" = "xyes")
+ # }}}
  # --with-liblvm2app {{{
  with_liblvm2app_cppflags=""
  with_liblvm2app_ldflags=""
    LDFLAGS="$SAVE_LDFLAGS"
  fi
  
 +if test "x$with_libstatgrab" = "xyes"
 +then
 +  SAVE_CFLAGS="$CFLAGS"
 +  SAVE_LDFLAGS="$LDFLAGS"
 +
 +  CFLAGS="$CFLAGS $with_libstatgrab_cflags"
 +  LDFLAGS="$LDFLAGS $with_libstatgrab_ldflags"
 +
 +  AC_CACHE_CHECK([if sg_init() requires an argument],
 +          [c_cv_have_libstatgrab_init_arg],
 +          AC_LINK_IFELSE([AC_LANG_PROGRAM(
 +[[[
 +#include <stdio.h>
 +#include <statgrab.h>
 +]]],
 +[[[
 +      if (sg_init()) return 0;
 +]]]
 +    )],
 +    [c_cv_have_libstatgrab_init_arg="no"],
 +    [c_cv_have_libstatgrab_init_arg="yes"]
 +          )
 +  )
 +
 +  AC_CACHE_CHECK([if sg_get_user_stats() requires an argument],
 +          [c_cv_have_libstatgrab_get_user_stats_arg],
 +          AC_LINK_IFELSE([AC_LANG_PROGRAM(
 +[[[
 +#include <stdio.h>
 +#include <statgrab.h>
 +]]],
 +[[[
 +      if (sg_get_user_stats()) return 0;
 +]]]
 +    )],
 +    [c_cv_have_libstatgrab_get_user_stats_arg="no"],
 +    [c_cv_have_libstatgrab_get_user_stats_arg="yes"]
 +          )
 +  )
 +
 +  AC_CACHE_CHECK([if sg_disk_io_stats() uses size_t],
 +          [c_cv_have_libstatgrab_get_disk_io_stats_sizet],
 +          AC_LINK_IFELSE([AC_LANG_PROGRAM(
 +[[[
 +#include <stdio.h>
 +#include <statgrab.h>
 +]]],
 +[[[
 +      sg_disk_io_stats *(*ptr) (size_t *);
 +      ptr = sg_get_disk_io_stats;
 +      if (ptr != NULL) return 0;
 +]]]
 +    )],
 +    [c_cv_have_libstatgrab_get_disk_io_stats_sizet="yes"],
 +    [c_cv_have_libstatgrab_get_disk_io_stats_sizet="no"]
 +          )
 +  )
 +
 +  CFLAGS="$SAVE_CFLAGS"
 +  LDFLAGS="$SAVE_LDFLAGS"
 +fi
 +
  AM_CONDITIONAL(BUILD_WITH_LIBSTATGRAB, test "x$with_libstatgrab" = "xyes")
  if test "x$with_libstatgrab" = "xyes"
  then
    BUILD_WITH_LIBSTATGRAB_LDFLAGS="$with_libstatgrab_ldflags"
    AC_SUBST(BUILD_WITH_LIBSTATGRAB_CFLAGS)
    AC_SUBST(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
 +  if test "x$c_cv_have_libstatgrab_init_arg" = "xyes"
 +  then
 +        AC_DEFINE(HAVE_LIBSTATGRAB_INIT_ARG, 1, [Define to 1 if sg_init does require an argument])
 +  fi
 +  if test "x$c_cv_have_libstatgrab_get_user_stats_arg" = "xyes"
 +  then
 +        AC_DEFINE(HAVE_LIBSTATGRAB_GET_USER_STATS_ARG, 1, [Define to 1 if sg_get_user_stats does require an argument])
 +  fi
 +  if test "x$c_cv_have_libstatgrab_get_disk_io_stats_sizet" = "xyes"
 +  then
 +        AC_DEFINE(HAVE_LIBSTATGRAB_GET_DISK_IO_STATS_SIZET, 1, [Define to 1 if sg_get_disk_io_stats does require pointer to size_t as an argument])
 +  fi
  fi
  # }}}
  
  fi
  # }}}
  
 +# --with-libatasmart {{{
 +with_libatasmart_cppflags=""
 +with_libatasmart_ldflags=""
 +AC_ARG_WITH(libatasmart, [AS_HELP_STRING([--with-libatasmart@<:@=PREFIX@:>@], [Path to libatasmart.])],
 +[
 +      if test "x$withval" != "xno" && test "x$withval" != "xyes"
 +      then
 +              with_libatasmart_cppflags="-I$withval/include"
 +              with_libatasmart_ldflags="-L$withval/lib"
 +              with_libatasmart="yes"
 +      else
 +              with_libatasmart="$withval"
 +      fi
 +],
 +[
 +      if test "x$ac_system" = "xLinux"
 +      then
 +              with_libatasmart="yes"
 +      else
 +              with_libatasmart="no (Linux only library)"
 +      fi
 +])
 +if test "x$with_libatasmart" = "xyes"
 +then
 +      SAVE_CPPFLAGS="$CPPFLAGS"
 +      CPPFLAGS="$CPPFLAGS $with_libatasmart_cppflags"
 +
 +      AC_CHECK_HEADERS(atasmart.h, [with_libatasmart="yes"], [with_libatasmart="no (atasmart.h not found)"])
 +
 +      CPPFLAGS="$SAVE_CPPFLAGS"
 +fi
 +if test "x$with_libatasmart" = "xyes"
 +then
 +      SAVE_CPPFLAGS="$CPPFLAGS"
 +      SAVE_LDFLAGS="$LDFLAGS"
 +      CPPFLAGS="$CPPFLAGS $with_libatasmart_cppflags"
 +      LDFLAGS="$LDFLAGS $with_libatasmart_ldflags"
 +
 +      AC_CHECK_LIB(atasmart, sk_disk_open, [with_libatasmart="yes"], [with_libatasmart="no (Symbol 'sk_disk_open' not found)"])
 +
 +      CPPFLAGS="$SAVE_CPPFLAGS"
 +      LDFLAGS="$SAVE_LDFLAGS"
 +fi
 +if test "x$with_libatasmart" = "xyes"
 +then
 +      BUILD_WITH_LIBATASMART_CPPFLAGS="$with_libatasmart_cppflags"
 +      BUILD_WITH_LIBATASMART_LDFLAGS="$with_libatasmart_ldflags"
 +      BUILD_WITH_LIBATASMART_LIBS="-latasmart"
 +      AC_SUBST(BUILD_WITH_LIBATASMART_CPPFLAGS)
 +      AC_SUBST(BUILD_WITH_LIBATASMART_LDFLAGS)
 +      AC_SUBST(BUILD_WITH_LIBATASMART_LIBS)
 +      AC_DEFINE(HAVE_LIBATASMART, 1, [Define if libatasmart is present and usable.])
 +fi
 +AM_CONDITIONAL(BUILD_WITH_LIBATASMART, test "x$with_libatasmart" = "xyes")
 +# }}}
 +
  PKG_CHECK_MODULES([LIBNOTIFY], [libnotify],
                [with_libnotify="yes"],
                [if test "x$LIBNOTIFY_PKG_ERRORS" = "x"; then
@@@ -5108,6 -5021,7 +5166,6 @@@ plugin_interface="no
  plugin_ipmi="no"
  plugin_ipvs="no"
  plugin_irq="no"
 -plugin_libvirt="no"
  plugin_load="no"
  plugin_log_logstash="no"
  plugin_memory="no"
@@@ -5123,9 -5037,8 +5181,9 @@@ plugin_tape="no
  plugin_tcpconns="no"
  plugin_ted="no"
  plugin_thermal="no"
 -plugin_users="no"
  plugin_uptime="no"
 +plugin_users="no"
 +plugin_virt="no"
  plugin_vmem="no"
  plugin_vserver="no"
  plugin_wireless="no"
@@@ -5350,6 -5263,11 +5408,6 @@@ the
        plugin_interface="yes"
  fi
  
 -if test "x$with_libxml2" = "xyes" && test "x$with_libvirt" = "xyes"
 -then
 -      plugin_libvirt="yes"
 -fi
 -
  if test "x$have_getloadavg" = "xyes"
  then
        plugin_load="yes"
        plugin_processes="yes"
  fi
  
 +if test "x$with_kvm_getprocs" = "xyes" && test "x$have_struct_kinfo_proc_openbsd" = "xyes"
 +then
 +      plugin_processes="yes"
 +fi
 +
  if test "x$with_kvm_getswapinfo" = "xyes"
  then
        plugin_swap="yes"
        plugin_users="yes"
  fi
  
 +if test "x$with_libxml2" = "xyes" && test "x$with_libvirt" = "xyes"
 +then
 +      plugin_virt="yes"
 +fi
 +
 +
  m4_divert_once([HELP_ENABLE], [
  collectd plugins:])
  
@@@ -5483,6 -5390,7 +5541,6 @@@ AC_PLUGIN([iptables],    [$with_libiptc
  AC_PLUGIN([ipvs],        [$plugin_ipvs],       [IPVS connection statistics])
  AC_PLUGIN([irq],         [$plugin_irq],        [IRQ statistics])
  AC_PLUGIN([java],        [$with_java],         [Embed the Java Virtual Machine])
 -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])
@@@ -5515,6 -5423,7 +5573,7 @@@ AC_PLUGIN([numa],        [$plugin_numa]
  AC_PLUGIN([nut],         [$with_libupsclient], [Network UPS tools statistics])
  AC_PLUGIN([olsrd],       [yes],                [olsrd statistics])
  AC_PLUGIN([onewire],     [$with_libowcapi],    [OneWire sensor statistics])
+ AC_PLUGIN([openldap],    [$with_libldap],      [OpenLDAP statistics])
  AC_PLUGIN([openvpn],     [yes],                [OpenVPN client statistics])
  AC_PLUGIN([oracle],      [$with_oracle],       [Oracle plugin])
  AC_PLUGIN([perl],        [$plugin_perl],       [Embed a Perl interpreter])
@@@ -5534,7 -5443,6 +5593,7 @@@ AC_PLUGIN([rrdtool],     [$with_librrd]
  AC_PLUGIN([sensors],     [$with_libsensors],   [lm_sensors statistics])
  AC_PLUGIN([serial],      [$plugin_serial],     [serial port traffic])
  AC_PLUGIN([sigrok],      [$with_libsigrok],    [sigrok acquisition sources])
 +AC_PLUGIN([smart],       [$with_libatasmart],  [SMART statistics])
  AC_PLUGIN([snmp],        [$with_libnetsnmp],   [SNMP querying plugin])
  AC_PLUGIN([statsd],      [yes],                [StatsD plugin])
  AC_PLUGIN([swap],        [$plugin_swap],       [Swap usage statistics])
@@@ -5559,7 -5467,6 +5618,7 @@@ AC_PLUGIN([uptime],      [$plugin_uptim
  AC_PLUGIN([users],       [$plugin_users],      [User statistics])
  AC_PLUGIN([uuid],        [yes],                [UUID as hostname plugin])
  AC_PLUGIN([varnish],     [$with_libvarnish],   [Varnish cache statistics])
 +AC_PLUGIN([virt],        [$plugin_virt],       [Virtual machine statistics])
  AC_PLUGIN([vmem],        [$plugin_vmem],       [Virtual memory statistics])
  AC_PLUGIN([vserver],     [$plugin_vserver],    [Linux VServer statistics])
  AC_PLUGIN([wireless],    [$plugin_wireless],   [Wireless statistics])
@@@ -5722,7 -5629,7 +5781,7 @@@ AC_SUBST(LCC_VERSION_STRING
  
  AC_CONFIG_FILES(src/libcollectdclient/collectd/lcc_features.h)
  
 -AC_CONFIG_FILES([Makefile src/Makefile src/collectd.conf src/libcollectdclient/Makefile src/libcollectdclient/libcollectdclient.pc src/liboconfig/Makefile bindings/Makefile bindings/java/Makefile])
 +AC_CONFIG_FILES([Makefile src/Makefile src/daemon/Makefile src/collectd.conf src/libcollectdclient/Makefile src/libcollectdclient/libcollectdclient.pc src/liboconfig/Makefile bindings/Makefile bindings/java/Makefile])
  AC_OUTPUT
  
  if test "x$with_librrd" = "xyes" \
@@@ -5755,7 -5662,6 +5814,7 @@@ Configuration
    Libraries:
      intel mic . . . . . . $with_mic
      libaquaero5 . . . . . $with_libaquaero5
 +    libatasmart . . . . . $with_libatasmart
      libcurl . . . . . . . $with_libcurl
      libdbi  . . . . . . . $with_libdbi
      libcredis . . . . . . $with_libcredis
      libjvm  . . . . . . . $with_java
      libkstat  . . . . . . $with_kstat
      libkvm  . . . . . . . $with_libkvm
+     libldap . . . . . . . $with_libldap
      liblvm2app  . . . . . $with_liblvm2app
      libmemcached  . . . . $with_libmemcached
      libmnl  . . . . . . . $with_libmnl
      ipvs  . . . . . . . . $enable_ipvs
      irq . . . . . . . . . $enable_irq
      java  . . . . . . . . $enable_java
 -    libvirt . . . . . . . $enable_libvirt
      load  . . . . . . . . $enable_load
      logfile . . . . . . . $enable_logfile
      lpar  . . . . . . . . $enable_lpar
      nut . . . . . . . . . $enable_nut
      olsrd . . . . . . . . $enable_olsrd
      onewire . . . . . . . $enable_onewire
+     openldap  . . . . . . $enable_openldap
      openvpn . . . . . . . $enable_openvpn
      oracle  . . . . . . . $enable_oracle
      perl  . . . . . . . . $enable_perl
      sensors . . . . . . . $enable_sensors
      serial  . . . . . . . $enable_serial
      sigrok  . . . . . . . $enable_sigrok
 +    smart . . . . . . . . $enable_smart
      snmp  . . . . . . . . $enable_snmp
      statsd  . . . . . . . $enable_statsd
      swap  . . . . . . . . $enable_swap
      users . . . . . . . . $enable_users
      uuid  . . . . . . . . $enable_uuid
      varnish . . . . . . . $enable_varnish
 +    virt  . . . . . . . . $enable_virt
      vmem  . . . . . . . . $enable_vmem
      vserver . . . . . . . $enable_vserver
      wireless  . . . . . . $enable_wireless
diff --combined src/Makefile.am
@@@ -2,16 -2,12 +2,16 @@@ SUBDIRS = libcollectdclien
  if BUILD_WITH_OWN_LIBOCONFIG
  SUBDIRS += liboconfig
  endif
 +SUBDIRS += daemon
 +
 +PLUGIN_LDFLAGS = -module -avoid-version -export-symbols-regex '\<module_register\>'
  
  if COMPILER_IS_GCC
  AM_CFLAGS = -Wall -Werror
  endif
  
 -AM_CPPFLAGS = -DPREFIX='"${prefix}"'
 +AM_CPPFLAGS = -I$(srcdir)/daemon
 +AM_CPPFLAGS += -DPREFIX='"${prefix}"'
  AM_CPPFLAGS += -DCONFIGFILE='"${sysconfdir}/${PACKAGE_NAME}.conf"'
  AM_CPPFLAGS += -DLOCALSTATEDIR='"${localstatedir}"'
  AM_CPPFLAGS += -DPKGLOCALSTATEDIR='"${localstatedir}/lib/${PACKAGE_NAME}"'
@@@ -23,14 -19,83 +23,14 @@@ AM_CPPFLAGS += -DPKGDATADIR='"${pkgdata
  
  AUTOMAKE_OPTIONS = subdir-objects
  
 -sbin_PROGRAMS = collectd collectdmon
 +sbin_PROGRAMS = collectdmon
  bin_PROGRAMS = collectd-nagios collectdctl collectd-tg
  
 -collectd_SOURCES = collectd.c collectd.h \
 -                 common.c common.h \
 -                 configfile.c configfile.h \
 -                 filter_chain.c filter_chain.h \
 -                 meta_data.c meta_data.h \
 -                 plugin.c plugin.h \
 -                 utils_avltree.c utils_avltree.h \
 -                 utils_cache.c utils_cache.h \
 -                 utils_complain.c utils_complain.h \
 -                 utils_heap.c utils_heap.h \
 -                 utils_ignorelist.c utils_ignorelist.h \
 -                 utils_llist.c utils_llist.h \
 -                 utils_parse_option.c utils_parse_option.h \
 -                 utils_random.c utils_random.h \
 -                 utils_tail_match.c utils_tail_match.h \
 -                 utils_match.c utils_match.h \
 -                 utils_subst.c utils_subst.h \
 -                 utils_tail.c utils_tail.h \
 -                 utils_time.c utils_time.h \
 -                 types_list.c types_list.h \
 -                 utils_threshold.c utils_threshold.h
 -
 -
 -collectd_CPPFLAGS =  $(AM_CPPFLAGS) $(LTDLINCL)
 -collectd_CFLAGS = $(AM_CFLAGS)
 -collectd_LDFLAGS = -export-dynamic
 -collectd_LDADD = -lm
 -collectd_DEPENDENCIES =
 -
 -# Link to these libraries..
 -if BUILD_WITH_LIBRT
 -collectd_LDADD += -lrt
 -endif
 -if BUILD_WITH_LIBPOSIX4
 -collectd_LDADD += -lposix4
 -endif
 -if BUILD_WITH_LIBSOCKET
 -collectd_LDADD += -lsocket
 -endif
 -if BUILD_WITH_LIBRESOLV
 -collectd_LDADD += -lresolv
 -endif
 -if BUILD_WITH_LIBPTHREAD
 -collectd_LDADD += -lpthread
 -endif
 -if BUILD_WITH_LIBKSTAT
 -collectd_LDADD += -lkstat
 -endif
 -if BUILD_WITH_LIBDEVINFO
 -collectd_LDADD += -ldevinfo
 -endif
 -if BUILD_AIX
 -collectd_LDFLAGS += -Wl,-bexpall,-brtllib
 -endif
 -
 -# The daemon needs to call sg_init, so we need to link it against libstatgrab,
 -# too. -octo
 -if BUILD_WITH_LIBSTATGRAB
 -collectd_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
 -collectd_LDADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
 -endif
 -
 -if BUILD_WITH_OWN_LIBOCONFIG
 -collectd_LDADD += $(LIBLTDL) liboconfig/liboconfig.la
 -collectd_DEPENDENCIES += liboconfig/liboconfig.la
 -else
 -collectd_LDADD += -loconfig
 -endif
 -
  collectdmon_SOURCES = collectdmon.c
  collectdmon_CPPFLAGS = $(AM_CPPFLAGS)
  
  collectd_nagios_SOURCES = collectd-nagios.c
 -collectd_nagios_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_builddir)/src/libcollectdclient/collectd
 +collectd_nagios_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/libcollectdclient/collectd -I$(top_builddir)/src/libcollectdclient/collectd
  collectd_nagios_LDADD =
  if BUILD_WITH_LIBSOCKET
  collectd_nagios_LDADD += -lsocket
@@@ -44,7 -109,7 +44,7 @@@ collectd_nagios_DEPENDENCIES = libcolle
  
  
  collectdctl_SOURCES = collectdctl.c
 -collectdctl_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_builddir)/src/libcollectdclient/collectd
 +collectdctl_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/libcollectdclient/collectd -I$(top_builddir)/src/libcollectdclient/collectd
  collectdctl_LDADD =
  if BUILD_WITH_LIBSOCKET
  collectdctl_LDADD += -lsocket
@@@ -56,8 -121,8 +56,8 @@@ collectdctl_LDADD += libcollectdclient/
  collectdctl_DEPENDENCIES = libcollectdclient/libcollectdclient.la
  
  collectd_tg_SOURCES = collectd-tg.c \
 -                    utils_heap.c utils_heap.h
 -collectd_tg_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_builddir)/src/libcollectdclient/collectd
 +                    daemon/utils_heap.c daemon/utils_heap.h
 +collectd_tg_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/libcollectdclient/collectd -I$(top_builddir)/src/libcollectdclient/collectd
  collectd_tg_LDADD =
  if BUILD_WITH_LIBSOCKET
  collectd_tg_LDADD += -lsocket
@@@ -68,9 -133,6 +68,9 @@@ endi
  if BUILD_AIX
  collectd_tg_LDADD += -lm
  endif
 +if BUILD_WITH_LIBPTHREAD
 +collectd_tg_LDADD += -lpthread
 +endif
  collectd_tg_LDADD += libcollectdclient/libcollectdclient.la
  collectd_tg_DEPENDENCIES = libcollectdclient/libcollectdclient.la
  
@@@ -84,8 -146,10 +84,8 @@@ if BUILD_PLUGIN_AGGREGATIO
  pkglib_LTLIBRARIES += aggregation.la
  aggregation_la_SOURCES = aggregation.c \
                           utils_vl_lookup.c utils_vl_lookup.h
 -aggregation_la_LDFLAGS = -module -avoid-version
 -aggregation_la_LIBADD =
 -collectd_LDADD += "-dlopen" aggregation.la
 -collectd_DEPENDENCIES += aggregation.la
 +aggregation_la_LDFLAGS = $(PLUGIN_LDFLAGS)
 +aggregation_la_LIBADD = -lm
  endif
  
  if BUILD_PLUGIN_AMQP
@@@ -94,112 -158,134 +94,112 @@@ amqp_la_SOURCES = amqp.c 
                  utils_cmd_putval.c utils_cmd_putval.h \
                  utils_format_graphite.c utils_format_graphite.h \
                  utils_format_json.c utils_format_json.h
 -amqp_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBRABBITMQ_LDFLAGS)
 +amqp_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBRABBITMQ_LDFLAGS)
  amqp_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBRABBITMQ_CPPFLAGS)
  amqp_la_LIBADD = $(BUILD_WITH_LIBRABBITMQ_LIBS)
 -collectd_LDADD += "-dlopen" amqp.la
 -collectd_DEPENDENCIES += amqp.la
  endif
  
  if BUILD_PLUGIN_APACHE
  pkglib_LTLIBRARIES += apache.la
  apache_la_SOURCES = apache.c
 -apache_la_LDFLAGS = -module -avoid-version
 +apache_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  apache_la_CFLAGS = $(AM_CFLAGS)
  apache_la_LIBADD =
 -collectd_LDADD += "-dlopen" apache.la
  if BUILD_WITH_LIBCURL
  apache_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
  apache_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
  endif
 -collectd_DEPENDENCIES += apache.la
  endif
  
  if BUILD_PLUGIN_APCUPS
  pkglib_LTLIBRARIES += apcups.la
  apcups_la_SOURCES = apcups.c
 -apcups_la_LDFLAGS = -module -avoid-version
 +apcups_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  apcups_la_LIBADD =
  if BUILD_WITH_LIBSOCKET
  apcups_la_LIBADD += -lsocket
  endif
 -collectd_LDADD += "-dlopen" apcups.la
 -collectd_DEPENDENCIES += apcups.la
  endif
  
  if BUILD_PLUGIN_APPLE_SENSORS
  pkglib_LTLIBRARIES += apple_sensors.la
  apple_sensors_la_SOURCES = apple_sensors.c
 -apple_sensors_la_LDFLAGS = -module -avoid-version
 +apple_sensors_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  apple_sensors_la_LDFLAGS += -framework IOKit
 -collectd_LDADD += "-dlopen" apple_sensors.la
 -collectd_DEPENDENCIES += apple_sensors.la
  endif
  
  if BUILD_PLUGIN_AQUAERO
  pkglib_LTLIBRARIES += aquaero.la
  aquaero_la_SOURCES = aquaero.c
 -aquaero_la_LDFLAGS = -module -avoid-version
 +aquaero_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  aquaero_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBAQUAERO5_CFLAGS)
  aquaero_la_LIBADD = $(BUILD_WITH_LIBAQUAERO5_LDFLAGS) -laquaero5
 -collectd_LDADD += "-dlopen" aquaero.la
 -collectd_DEPENDENCIES += aquaero.la
  endif
  
  if BUILD_PLUGIN_ASCENT
  pkglib_LTLIBRARIES += ascent.la
  ascent_la_SOURCES = ascent.c
 -ascent_la_LDFLAGS = -module -avoid-version
 +ascent_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  ascent_la_CFLAGS = $(AM_CFLAGS) \
                $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
  ascent_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
 -collectd_LDADD += "-dlopen" ascent.la
 -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_LDFLAGS = $(PLUGIN_LDFLAGS)
  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
 -battery_la_LDFLAGS = -module -avoid-version
 +battery_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  battery_la_LIBADD =
  if BUILD_WITH_LIBIOKIT
  battery_la_LDFLAGS += -framework IOKit
  endif
 -collectd_LDADD += "-dlopen" battery.la
 -collectd_DEPENDENCIES += battery.la
  endif
  
  if BUILD_PLUGIN_BIND
  pkglib_LTLIBRARIES += bind.la
  bind_la_SOURCES = bind.c
 -bind_la_LDFLAGS = -module -avoid-version
 +bind_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  bind_la_CFLAGS = $(AM_CFLAGS) \
 -              $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
 +               $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
  bind_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
 -collectd_LDADD += "-dlopen" bind.la
 -collectd_DEPENDENCIES += bind.la
  endif
  
  if BUILD_PLUGIN_CGROUPS
  pkglib_LTLIBRARIES += cgroups.la
 -cgroups_la_SOURCES = cgroups.c utils_mount.c utils_mount.h
 -cgroups_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" cgroups.la
 -collectd_DEPENDENCIES += cgroups.la
 +cgroups_la_SOURCES = cgroups.c \
 +                   utils_ignorelist.c utils_ignorelist.h \
 +                   utils_mount.c utils_mount.h
 +cgroups_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_CONNTRACK
  pkglib_LTLIBRARIES += conntrack.la
  conntrack_la_SOURCES = conntrack.c
 -conntrack_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" conntrack.la
 -collectd_DEPENDENCIES += conntrack.la
 +conntrack_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_CONTEXTSWITCH
  pkglib_LTLIBRARIES += contextswitch.la
  contextswitch_la_SOURCES = contextswitch.c
 -contextswitch_la_LDFLAGS = -module -avoid-version
 +contextswitch_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  contextswitch_la_LIBADD =
  if BUILD_WITH_PERFSTAT
  contextswitch_la_LIBADD += -lperfstat
  endif
 -collectd_LDADD += "-dlopen" contextswitch.la
 -collectd_DEPENDENCIES += contextswitch.la
  endif
  
  if BUILD_PLUGIN_CPU
  pkglib_LTLIBRARIES += cpu.la
  cpu_la_SOURCES = cpu.c
  cpu_la_CFLAGS = $(AM_CFLAGS)
 -cpu_la_LDFLAGS = -module -avoid-version
 +cpu_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  cpu_la_LIBADD =
  if BUILD_WITH_LIBKSTAT
  cpu_la_LIBADD += -lkstat
@@@ -214,52 -300,64 +214,52 @@@ endi
  if BUILD_WITH_PERFSTAT
  cpu_la_LIBADD += -lperfstat
  endif
 -collectd_LDADD += "-dlopen" cpu.la
 -collectd_DEPENDENCIES += cpu.la
  endif
  
  if BUILD_PLUGIN_CPUFREQ
  pkglib_LTLIBRARIES += cpufreq.la
  cpufreq_la_SOURCES = cpufreq.c
 -cpufreq_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" cpufreq.la
 -collectd_DEPENDENCIES += cpufreq.la
 +cpufreq_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_CSV
  pkglib_LTLIBRARIES += csv.la
  csv_la_SOURCES = csv.c
 -csv_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" csv.la
 -collectd_DEPENDENCIES += csv.la
 +csv_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_CURL
  pkglib_LTLIBRARIES += curl.la
  curl_la_SOURCES = curl.c
 -curl_la_LDFLAGS = -module -avoid-version
 +curl_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  curl_la_CFLAGS = $(AM_CFLAGS)
  curl_la_LIBADD =
 -collectd_LDADD += "-dlopen" curl.la
  if BUILD_WITH_LIBCURL
  curl_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
  curl_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
  endif
 -collectd_DEPENDENCIES += curl.la
  endif
  
  if BUILD_PLUGIN_CURL_JSON
  pkglib_LTLIBRARIES += curl_json.la
  curl_json_la_SOURCES = curl_json.c
  curl_json_la_CFLAGS = $(AM_CFLAGS)
 -curl_json_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBYAJL_LDFLAGS)
 -curl_json_la_CPPFLAGS = $(BUILD_WITH_LIBYAJL_CPPFLAGS)
 +curl_json_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
 +curl_json_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
  curl_json_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS)
  if BUILD_WITH_LIBCURL
  curl_json_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
  curl_json_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
  endif
 -collectd_LDADD += "-dlopen" curl_json.la
 -collectd_DEPENDENCIES += curl_json.la
  endif
  
  if BUILD_PLUGIN_CURL_XML
  pkglib_LTLIBRARIES += curl_xml.la
  curl_xml_la_SOURCES = curl_xml.c
 -curl_xml_la_LDFLAGS = -module -avoid-version
 +curl_xml_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  curl_xml_la_CFLAGS = $(AM_CFLAGS) \
                $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
  curl_xml_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
 -collectd_LDADD += "-dlopen" curl_xml.la
 -collectd_DEPENDENCIES += curl_xml.la
  endif
  
  if BUILD_PLUGIN_DBI
@@@ -267,24 -365,25 +267,24 @@@ pkglib_LTLIBRARIES += dbi.l
  dbi_la_SOURCES = dbi.c \
                 utils_db_query.c utils_db_query.h
  dbi_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBDBI_CPPFLAGS)
 -dbi_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBDBI_LDFLAGS)
 +dbi_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBDBI_LDFLAGS)
  dbi_la_LIBADD = $(BUILD_WITH_LIBDBI_LIBS)
 -collectd_LDADD += "-dlopen" dbi.la
 -collectd_DEPENDENCIES += dbi.la
  endif
  
  if BUILD_PLUGIN_DF
  pkglib_LTLIBRARIES += df.la
 -df_la_SOURCES = df.c utils_mount.c utils_mount.h
 -df_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" df.la
 -collectd_DEPENDENCIES += df.la
 +df_la_SOURCES = df.c \
 +              utils_ignorelist.c utils_ignorelist.h \
 +              utils_mount.c utils_mount.h
 +df_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_DISK
  pkglib_LTLIBRARIES += disk.la
 -disk_la_SOURCES = disk.c
 +disk_la_SOURCES = disk.c \
 +                utils_ignorelist.c utils_ignorelist.h
  disk_la_CFLAGS = $(AM_CFLAGS)
 -disk_la_LDFLAGS = -module -avoid-version
 +disk_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  disk_la_LIBADD =
  if BUILD_WITH_LIBKSTAT
  disk_la_LIBADD += -lkstat
@@@ -305,82 -404,102 +305,82 @@@ endi
  if BUILD_WITH_PERFSTAT
  disk_la_LIBADD += -lperfstat
  endif
 -collectd_LDADD += "-dlopen" disk.la
 -collectd_DEPENDENCIES += disk.la
  endif
  
  if BUILD_PLUGIN_DNS
  pkglib_LTLIBRARIES += dns.la
  dns_la_SOURCES = dns.c utils_dns.c utils_dns.h
 -dns_la_LDFLAGS = -module -avoid-version
 +dns_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  dns_la_LIBADD = -lpcap -lpthread
 -collectd_LDADD += "-dlopen" dns.la
 -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_LDFLAGS = $(PLUGIN_LDFLAGS)
  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
 -email_la_LDFLAGS = -module -avoid-version
 +email_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  email_la_LIBADD = -lpthread
 -collectd_LDADD += "-dlopen" email.la
 -collectd_DEPENDENCIES += email.la
  endif
  
  if BUILD_PLUGIN_ENTROPY
  pkglib_LTLIBRARIES += entropy.la
  entropy_la_SOURCES = entropy.c
 -entropy_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" entropy.la
 -collectd_DEPENDENCIES += entropy.la
 +entropy_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_EXEC
  pkglib_LTLIBRARIES += exec.la
  exec_la_SOURCES = exec.c \
                  utils_cmd_putnotif.c utils_cmd_putnotif.h \
 -                utils_cmd_putval.c utils_cmd_putval.h
 -exec_la_LDFLAGS = -module -avoid-version
 +                utils_cmd_putval.c utils_cmd_putval.h \
 +                utils_parse_option.h utils_parse_option.c
 +exec_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  exec_la_LIBADD = -lpthread
 -collectd_LDADD += "-dlopen" exec.la
 -collectd_DEPENDENCIES += exec.la
  endif
  
  if BUILD_PLUGIN_ETHSTAT
  pkglib_LTLIBRARIES += ethstat.la
  ethstat_la_SOURCES = ethstat.c
 -ethstat_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" ethstat.la
 -collectd_DEPENDENCIES += ethstat.la
 +ethstat_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_FILECOUNT
  pkglib_LTLIBRARIES += filecount.la
  filecount_la_SOURCES = filecount.c
 -filecount_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" filecount.la
 -collectd_DEPENDENCIES += filecount.la
 +filecount_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_GMOND
  pkglib_LTLIBRARIES += gmond.la
  gmond_la_SOURCES = gmond.c
  gmond_la_CPPFLAGS = $(AM_CPPFLAGS) $(GANGLIA_CPPFLAGS)
 -gmond_la_LDFLAGS = -module -avoid-version $(GANGLIA_LDFLAGS)
 +gmond_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(GANGLIA_LDFLAGS)
  gmond_la_LIBADD = $(GANGLIA_LIBS)
 -collectd_LDADD += "-dlopen" gmond.la
 -collectd_DEPENDENCIES += gmond.la
  endif
  
  if BUILD_PLUGIN_HDDTEMP
  pkglib_LTLIBRARIES += hddtemp.la
  hddtemp_la_SOURCES = hddtemp.c
 -hddtemp_la_LDFLAGS = -module -avoid-version
 +hddtemp_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  hddtemp_la_LIBADD =
  if BUILD_WITH_LIBSOCKET
  hddtemp_la_LIBADD += -lsocket
  endif
 -collectd_LDADD += "-dlopen" hddtemp.la
 -collectd_DEPENDENCIES += hddtemp.la
  endif
  
  if BUILD_PLUGIN_INTERFACE
  pkglib_LTLIBRARIES += interface.la
 -interface_la_SOURCES = interface.c
 +interface_la_SOURCES = interface.c \
 +                     utils_ignorelist.c utils_ignorelist.h
  interface_la_CFLAGS = $(AM_CFLAGS)
 -interface_la_LDFLAGS = -module -avoid-version
 +interface_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  interface_la_LIBADD =
 -collectd_LDADD += "-dlopen" interface.la
 -collectd_DEPENDENCIES += interface.la
  if BUILD_WITH_LIBSTATGRAB
  interface_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
  interface_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
@@@ -401,17 -520,20 +401,17 @@@ if BUILD_PLUGIN_IPTABLE
  pkglib_LTLIBRARIES += iptables.la
  iptables_la_SOURCES = iptables.c
  iptables_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBIPTC_CPPFLAGS)
 -iptables_la_LDFLAGS = -module -avoid-version
 +iptables_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  iptables_la_LIBADD = $(BUILD_WITH_LIBIPTC_LDFLAGS)
 -collectd_LDADD += "-dlopen" iptables.la
 -collectd_DEPENDENCIES += iptables.la
  endif
  
  if BUILD_PLUGIN_IPMI
  pkglib_LTLIBRARIES += ipmi.la
 -ipmi_la_SOURCES = ipmi.c
 +ipmi_la_SOURCES = ipmi.c \
 +                utils_ignorelist.c utils_ignorelist.h
  ipmi_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_OPENIPMI_CFLAGS)
 -ipmi_la_LDFLAGS = -module -avoid-version
 +ipmi_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  ipmi_la_LIBADD = $(BUILD_WITH_OPENIPMI_LIBS)
 -collectd_LDADD += "-dlopen" ipmi.la
 -collectd_DEPENDENCIES += ipmi.la
  endif
  
  if BUILD_PLUGIN_IPVS
@@@ -420,14 -542,17 +420,14 @@@ ipvs_la_SOURCES = ipvs.
  if IP_VS_H_NEEDS_KERNEL_CFLAGS
  ipvs_la_CFLAGS = $(AM_CFLAGS) $(KERNEL_CFLAGS)
  endif
 -ipvs_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" ipvs.la
 -collectd_DEPENDENCIES += ipvs.la
 +ipvs_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_IRQ
  pkglib_LTLIBRARIES += irq.la
 -irq_la_SOURCES = irq.c
 -irq_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" irq.la
 -collectd_DEPENDENCIES += irq.la
 +irq_la_SOURCES = irq.c \
 +               utils_ignorelist.c utils_ignorelist.h
 +irq_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_JAVA
@@@ -435,16 -560,31 +435,16 @@@ pkglib_LTLIBRARIES += java.l
  java_la_SOURCES = java.c
  java_la_CPPFLAGS = $(AM_CPPFLAGS) $(JAVA_CPPFLAGS)
  java_la_CFLAGS = $(AM_CFLAGS) $(JAVA_CFLAGS)
 -java_la_LDFLAGS = -module -avoid-version $(JAVA_LDFLAGS)
 +java_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(JAVA_LDFLAGS)
  java_la_LIBADD = $(JAVA_LIBS)
 -collectd_LDADD += "-dlopen" java.la
 -collectd_DEPENDENCIES += java.la
 -endif
 -
 -if BUILD_PLUGIN_LIBVIRT
 -pkglib_LTLIBRARIES += libvirt.la
 -libvirt_la_SOURCES = libvirt.c
 -libvirt_la_CFLAGS = $(AM_CFLAGS) \
 -              $(BUILD_WITH_LIBVIRT_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
 -libvirt_la_LIBADD = $(BUILD_WITH_LIBVIRT_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
 -libvirt_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" libvirt.la
 -collectd_DEPENDENCIES += libvirt.la
  endif
  
  if BUILD_PLUGIN_LOAD
  pkglib_LTLIBRARIES += load.la
  load_la_SOURCES = load.c
  load_la_CFLAGS = $(AM_CFLAGS)
 -load_la_LDFLAGS = -module -avoid-version
 +load_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  load_la_LIBADD =
 -collectd_LDADD += "-dlopen" load.la
 -collectd_DEPENDENCIES += load.la
  if BUILD_WITH_LIBSTATGRAB
  load_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
  load_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
@@@ -457,110 -597,138 +457,110 @@@ endif # BUILD_PLUGIN_LOA
  if BUILD_PLUGIN_LOGFILE
  pkglib_LTLIBRARIES += logfile.la
  logfile_la_SOURCES = logfile.c
 -logfile_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" logfile.la
 -collectd_DEPENDENCIES += logfile.la
 +logfile_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  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_LDFLAGS = $(PLUGIN_LDFLAGS) $(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
 -lpar_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" lpar.la
 -collectd_DEPENDENCIES += lpar.la
 +lpar_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  lpar_la_LIBADD = -lperfstat
  endif
  
  if BUILD_PLUGIN_LVM
  pkglib_LTLIBRARIES += lvm.la
  lvm_la_SOURCES = lvm.c
 -lvm_la_LDFLAGS = -module -avoid-version
 +lvm_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  lvm_la_LIBADD = $(BUILD_WITH_LIBLVM2APP_LIBS)
 -collectd_LDADD += "-dlopen" lvm.la
 -collectd_DEPENDENCIES += lvm.la
  endif
  
  if BUILD_PLUGIN_MADWIFI
  pkglib_LTLIBRARIES += madwifi.la
 -madwifi_la_SOURCES = madwifi.c madwifi.h
 -madwifi_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" madwifi.la
 -collectd_DEPENDENCIES += madwifi.la
 +madwifi_la_SOURCES = madwifi.c madwifi.h \
 +                   utils_ignorelist.c utils_ignorelist.h
 +madwifi_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_MATCH_EMPTY_COUNTER
  pkglib_LTLIBRARIES += match_empty_counter.la
  match_empty_counter_la_SOURCES = match_empty_counter.c
 -match_empty_counter_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" match_empty_counter.la
 -collectd_DEPENDENCIES += match_empty_counter.la
 +match_empty_counter_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_MATCH_HASHED
  pkglib_LTLIBRARIES += match_hashed.la
  match_hashed_la_SOURCES = match_hashed.c
 -match_hashed_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" match_hashed.la
 -collectd_DEPENDENCIES += match_hashed.la
 +match_hashed_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_MATCH_REGEX
  pkglib_LTLIBRARIES += match_regex.la
  match_regex_la_SOURCES = match_regex.c
 -match_regex_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" match_regex.la
 -collectd_DEPENDENCIES += match_regex.la
 +match_regex_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_MATCH_TIMEDIFF
  pkglib_LTLIBRARIES += match_timediff.la
  match_timediff_la_SOURCES = match_timediff.c
 -match_timediff_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" match_timediff.la
 -collectd_DEPENDENCIES += match_timediff.la
 +match_timediff_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_MATCH_VALUE
  pkglib_LTLIBRARIES += match_value.la
  match_value_la_SOURCES = match_value.c
 -match_value_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" match_value.la
 -collectd_DEPENDENCIES += match_value.la
 +match_value_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_MBMON
  pkglib_LTLIBRARIES += mbmon.la
  mbmon_la_SOURCES = mbmon.c
 -mbmon_la_LDFLAGS = -module -avoid-version
 +mbmon_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  mbmon_la_LIBADD =
  if BUILD_WITH_LIBSOCKET
  mbmon_la_LIBADD += -lsocket
  endif
 -collectd_LDADD += "-dlopen" mbmon.la
 -collectd_DEPENDENCIES += mbmon.la
  endif
  
  if BUILD_PLUGIN_MD
  pkglib_LTLIBRARIES += md.la
 -md_la_SOURCES = md.c
 -md_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" md.la
 -collectd_DEPENDENCIES += md.la
 +md_la_SOURCES = md.c \
 +              utils_ignorelist.c utils_ignorelist.h
 +md_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_MEMCACHEC
  pkglib_LTLIBRARIES += memcachec.la
  memcachec_la_SOURCES = memcachec.c
 -memcachec_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBMEMCACHED_LDFLAGS)
 -memcachec_la_CPPFLAGS = $(BUILD_WITH_LIBMEMCACHED_CPPFLAGS)
 +memcachec_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBMEMCACHED_LDFLAGS)
 +memcachec_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBMEMCACHED_CPPFLAGS)
  memcachec_la_LIBADD = $(BUILD_WITH_LIBMEMCACHED_LIBS)
 -collectd_LDADD += "-dlopen" memcachec.la
 -collectd_DEPENDENCIES += memcachec.la
  endif
  
  if BUILD_PLUGIN_MEMCACHED
  pkglib_LTLIBRARIES += memcached.la
  memcached_la_SOURCES = memcached.c
 -memcached_la_LDFLAGS = -module -avoid-version
 +memcached_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  memcached_la_LIBADD =
  if BUILD_WITH_LIBSOCKET
  memcached_la_LIBADD += -lsocket
  endif
 -collectd_LDADD += "-dlopen" memcached.la
 -collectd_DEPENDENCIES += memcached.la
  endif
  
  if BUILD_PLUGIN_MEMORY
  pkglib_LTLIBRARIES += memory.la
  memory_la_SOURCES = memory.c
  memory_la_CFLAGS = $(AM_CFLAGS)
 -memory_la_LDFLAGS = -module -avoid-version
 +memory_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  memory_la_LIBADD =
 -collectd_LDADD += "-dlopen" memory.la
 -collectd_DEPENDENCIES += memory.la
  if BUILD_WITH_LIBKSTAT
  memory_la_LIBADD += -lkstat
  endif
@@@ -576,56 -744,56 +576,56 @@@ memory_la_LIBADD += -lperfsta
  endif
  endif
  
 +if BUILD_PLUGIN_MIC
 +pkglib_LTLIBRARIES += mic.la
 +mic_la_SOURCES = mic.c \
 +               utils_ignorelist.c utils_ignorelist.h
 +mic_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_MIC_LIBPATH)
 +mic_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_MIC_CPPFLAGS)
 +mic_la_LIBADD = $(BUILD_WITH_MIC_LDADD)
 +endif
 +
  if BUILD_PLUGIN_MODBUS
  pkglib_LTLIBRARIES += modbus.la
  modbus_la_SOURCES = modbus.c
 -modbus_la_LDFLAGS = -module -avoid-version
 +modbus_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  modbus_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMODBUS_CFLAGS)
  modbus_la_LIBADD = $(BUILD_WITH_LIBMODBUS_LIBS)
 -collectd_LDADD += "-dlopen" modbus.la
 -collectd_DEPENDENCIES += modbus.la
  endif
  
  if BUILD_PLUGIN_MULTIMETER
  pkglib_LTLIBRARIES += multimeter.la
  multimeter_la_SOURCES = multimeter.c
 -multimeter_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" multimeter.la
 -collectd_DEPENDENCIES += multimeter.la
 +multimeter_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_MYSQL
  pkglib_LTLIBRARIES += mysql.la
  mysql_la_SOURCES = mysql.c
 -mysql_la_LDFLAGS = -module -avoid-version
 +mysql_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  mysql_la_CFLAGS = $(AM_CFLAGS)
  mysql_la_LIBADD =
 -collectd_LDADD += "-dlopen" mysql.la
  if BUILD_WITH_LIBMYSQL
  mysql_la_CFLAGS += $(BUILD_WITH_LIBMYSQL_CFLAGS)
  mysql_la_LIBADD += $(BUILD_WITH_LIBMYSQL_LIBS)
  endif
 -collectd_DEPENDENCIES += mysql.la
  endif
  
  if BUILD_PLUGIN_NETAPP
  pkglib_LTLIBRARIES += netapp.la
 -netapp_la_SOURCES = netapp.c
 +netapp_la_SOURCES = netapp.c \
 +                  utils_ignorelist.c utils_ignorelist.h
  netapp_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBNETAPP_CPPFLAGS)
 -netapp_la_LDFLAGS = -module -avoid-version $(LIBNETAPP_LDFLAGS)
 +netapp_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(LIBNETAPP_LDFLAGS)
  netapp_la_LIBADD = $(LIBNETAPP_LIBS)
 -collectd_LDADD += "-dlopen" netapp.la
 -collectd_DEPENDENCIES += netapp.la
  endif
  
  if BUILD_PLUGIN_NETLINK
  pkglib_LTLIBRARIES += netlink.la
  netlink_la_SOURCES = netlink.c
 -netlink_la_LDFLAGS = -module -avoid-version
 +netlink_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  netlink_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMNL_CFLAGS)
  netlink_la_LIBADD = $(BUILD_WITH_LIBMNL_LIBS)
 -collectd_LDADD += "-dlopen" netlink.la
 -collectd_DEPENDENCIES += netlink.la
  endif
  
  if BUILD_PLUGIN_NETWORK
@@@ -633,7 -801,7 +633,7 @@@ pkglib_LTLIBRARIES += network.l
  network_la_SOURCES = network.c network.h \
                     utils_fbhash.c utils_fbhash.h
  network_la_CPPFLAGS = $(AM_CPPFLAGS)
 -network_la_LDFLAGS = -module -avoid-version
 +network_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  network_la_LIBADD = -lpthread
  if BUILD_WITH_LIBSOCKET
  network_la_LIBADD += -lsocket
@@@ -643,18 -811,24 +643,18 @@@ network_la_CPPFLAGS += $(GCRYPT_CPPFLAG
  network_la_LDFLAGS += $(GCRYPT_LDFLAGS)
  network_la_LIBADD += $(GCRYPT_LIBS)
  endif
 -collectd_LDADD += "-dlopen" network.la
 -collectd_DEPENDENCIES += network.la
  endif
  
  if BUILD_PLUGIN_NFS
  pkglib_LTLIBRARIES += nfs.la
  nfs_la_SOURCES = nfs.c
 -nfs_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" nfs.la
 -collectd_DEPENDENCIES += nfs.la
 +nfs_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_FSCACHE
  pkglib_LTLIBRARIES += fscache.la
  fscache_la_SOURCES = fscache.c
 -fscache_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" fscache.la
 -collectd_DEPENDENCIES += fscache.la
 +fscache_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_NGINX
@@@ -662,77 -836,102 +662,85 @@@ pkglib_LTLIBRARIES += nginx.l
  nginx_la_SOURCES = nginx.c
  nginx_la_CFLAGS = $(AM_CFLAGS)
  nginx_la_LIBADD =
 -nginx_la_LDFLAGS = -module -avoid-version
 +nginx_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  if BUILD_WITH_LIBCURL
  nginx_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
  nginx_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
  endif
 -collectd_LDADD += "-dlopen" nginx.la
 -collectd_DEPENDENCIES += nginx.la
  endif
  
  if BUILD_PLUGIN_NOTIFY_DESKTOP
  pkglib_LTLIBRARIES += notify_desktop.la
  notify_desktop_la_SOURCES = notify_desktop.c
  notify_desktop_la_CFLAGS = $(AM_CFLAGS) $(LIBNOTIFY_CFLAGS)
 -notify_desktop_la_LDFLAGS = -module -avoid-version
 +notify_desktop_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  notify_desktop_la_LIBADD = $(LIBNOTIFY_LIBS)
 -collectd_LDADD += "-dlopen" notify_desktop.la
 -collectd_DEPENDENCIES += notify_desktop.la
  endif
  
  if BUILD_PLUGIN_NOTIFY_EMAIL
  pkglib_LTLIBRARIES += notify_email.la
  notify_email_la_SOURCES = notify_email.c
 -notify_email_la_LDFLAGS = -module -avoid-version
 +notify_email_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  notify_email_la_LIBADD = -lesmtp -lssl -lcrypto -lpthread -ldl
 -collectd_LDADD += "-dlopen" notify_email.la
 -collectd_DEPENDENCIES += notify_email.la
  endif
  
  if BUILD_PLUGIN_NTPD
  pkglib_LTLIBRARIES += ntpd.la
  ntpd_la_SOURCES = ntpd.c
 -ntpd_la_LDFLAGS = -module -avoid-version
 +ntpd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  ntpd_la_LIBADD =
  if BUILD_WITH_LIBSOCKET
  ntpd_la_LIBADD += -lsocket
  endif
 -collectd_LDADD += "-dlopen" ntpd.la
 -collectd_DEPENDENCIES += ntpd.la
  endif
  
  if BUILD_PLUGIN_NUMA
  pkglib_LTLIBRARIES += numa.la
  numa_la_SOURCES = numa.c
 -numa_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" numa.la
 -collectd_DEPENDENCIES += numa.la
 +numa_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_NUT
  pkglib_LTLIBRARIES += nut.la
  nut_la_SOURCES = nut.c
  nut_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBUPSCLIENT_CFLAGS)
 -nut_la_LDFLAGS = -module -avoid-version
 +nut_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  nut_la_LIBADD = -lpthread $(BUILD_WITH_LIBUPSCLIENT_LIBS)
 -collectd_LDADD += "-dlopen" nut.la
 -collectd_DEPENDENCIES += nut.la
  endif
  
  if BUILD_PLUGIN_OLSRD
  pkglib_LTLIBRARIES += olsrd.la
  olsrd_la_SOURCES = olsrd.c
 -olsrd_la_LDFLAGS = -module -avoid-version
 +olsrd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  olsrd_la_LIBADD =
  if BUILD_WITH_LIBSOCKET
  olsrd_la_LIBADD += -lsocket
  endif
 -collectd_LDADD += "-dlopen" olsrd.la
 -collectd_DEPENDENCIES += olsrd.la
  endif
  
  if BUILD_PLUGIN_ONEWIRE
  pkglib_LTLIBRARIES += onewire.la
 -onewire_la_SOURCES = onewire.c
 +onewire_la_SOURCES = onewire.c \
 +                   utils_ignorelist.c utils_ignorelist.h
  onewire_la_CFLAGS = $(AM_CFLAGS)
 -onewire_la_CPPFLAGS = $(BUILD_WITH_LIBOWCAPI_CPPFLAGS)
 +onewire_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBOWCAPI_CPPFLAGS)
  onewire_la_LIBADD = $(BUILD_WITH_LIBOWCAPI_LIBS)
 -onewire_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" onewire.la
 -collectd_DEPENDENCIES += onewire.la
 +onewire_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
+ if BUILD_PLUGIN_OPENLDAP
+ pkglib_LTLIBRARIES += openldap.la
+ openldap_la_SOURCES = openldap.c
+ openldap_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBLDAP_LDFLAGS)
+ openldap_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBLDAP_CPPFLAGS)
+ openldap_la_LIBADD = -lldap
+ endif
  if BUILD_PLUGIN_OPENVPN
  pkglib_LTLIBRARIES += openvpn.la
  openvpn_la_SOURCES = openvpn.c
  openvpn_la_CFLAGS = $(AM_CFLAGS)
 -openvpn_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" openvpn.la
 -collectd_DEPENDENCIES += openvpn.la
 +openvpn_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_ORACLE
@@@ -740,9 -939,11 +748,9 @@@ pkglib_LTLIBRARIES += oracle.l
  oracle_la_SOURCES = oracle.c \
        utils_db_query.c utils_db_query.h
  oracle_la_CFLAGS = $(AM_CFLAGS)
 -oracle_la_CPPFLAGS = $(BUILD_WITH_ORACLE_CFLAGS)
 +oracle_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_ORACLE_CFLAGS)
  oracle_la_LIBADD = $(BUILD_WITH_ORACLE_LIBS)
 -oracle_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" oracle.la
 -collectd_DEPENDENCIES += oracle.la
 +oracle_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_PERL
@@@ -759,30 -960,38 +767,30 @@@ perl_la_CFLAGS  = $(AM_CFLAGS) 
  if HAVE_BROKEN_PERL_LOAD_MODULE
  perl_la_CFLAGS += -Wno-nonnull
  endif
 -perl_la_LDFLAGS = -module -avoid-version \
 +perl_la_LDFLAGS = $(PLUGIN_LDFLAGS) \
                $(PERL_LDFLAGS)
 -collectd_LDADD += "-dlopen" perl.la
 -collectd_DEPENDENCIES += perl.la
  endif
  
  if BUILD_PLUGIN_PF
  pkglib_LTLIBRARIES += pf.la
  pf_la_SOURCES = pf.c
 -pf_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" pf.la
 -collectd_DEPENDENCIES += pf.la
 +pf_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_PINBA
  pkglib_LTLIBRARIES += pinba.la
  pinba_la_SOURCES = pinba.c
  nodist_pinba_la_SOURCES = pinba.pb-c.c pinba.pb-c.h
 -pinba_la_LDFLAGS = -module -avoid-version
 +pinba_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  pinba_la_LIBADD = -lprotobuf-c
 -collectd_LDADD += "-dlopen" pinba.la
 -collectd_DEPENDENCIES += pinba.la
  endif
  
  if BUILD_PLUGIN_PING
  pkglib_LTLIBRARIES += ping.la
  ping_la_SOURCES = ping.c
  ping_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBOPING_CPPFLAGS)
 -ping_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBOPING_LDFLAGS)
 +ping_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBOPING_LDFLAGS)
  ping_la_LIBADD = -loping -lm
 -collectd_LDADD += "-dlopen" ping.la
 -collectd_DEPENDENCIES += ping.la
  endif
  
  if BUILD_PLUGIN_POSTGRESQL
@@@ -790,15 -999,19 +798,15 @@@ pkglib_LTLIBRARIES += postgresql.l
  postgresql_la_SOURCES = postgresql.c \
                 utils_db_query.c utils_db_query.h
  postgresql_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBPQ_CPPFLAGS)
 -postgresql_la_LDFLAGS = -module -avoid-version \
 +postgresql_la_LDFLAGS = $(PLUGIN_LDFLAGS) \
                $(BUILD_WITH_LIBPQ_LDFLAGS)
  postgresql_la_LIBADD = -lpq
 -collectd_LDADD += "-dlopen" postgresql.la
 -collectd_DEPENDENCIES += postgresql.la
  endif
  
  if BUILD_PLUGIN_POWERDNS
  pkglib_LTLIBRARIES += powerdns.la
  powerdns_la_SOURCES = powerdns.c
 -powerdns_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" powerdns.la
 -collectd_DEPENDENCIES += powerdns.la
 +powerdns_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_PYTHON
@@@ -809,15 -1022,19 +817,15 @@@ python_la_CFLAGS = $(AM_CFLAGS
  if COMPILER_IS_GCC
  python_la_CFLAGS += -fno-strict-aliasing -Wno-strict-aliasing
  endif
 -python_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_PYTHON_LDFLAGS)
 +python_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_PYTHON_LDFLAGS)
  python_la_LIBADD = $(BUILD_WITH_PYTHON_LIBS)
 -collectd_LDADD += "-dlopen" python.la
 -collectd_DEPENDENCIES += python.la
  endif
  
  if BUILD_PLUGIN_PROCESSES
  pkglib_LTLIBRARIES += processes.la
  processes_la_SOURCES = processes.c
 -processes_la_LDFLAGS = -module -avoid-version
 +processes_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  processes_la_LIBADD =
 -collectd_LDADD += "-dlopen" processes.la
 -collectd_DEPENDENCIES += processes.la
  if BUILD_WITH_LIBKVM_GETPROCS
  processes_la_LIBADD += -lkvm
  endif
@@@ -825,81 -1042,84 +833,81 @@@ endi
  
  if BUILD_PLUGIN_PROTOCOLS
  pkglib_LTLIBRARIES += protocols.la
 -protocols_la_SOURCES = protocols.c
 -protocols_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" protocols.la
 -collectd_DEPENDENCIES += protocols.la
 +protocols_la_SOURCES = protocols.c \
 +                     utils_ignorelist.c utils_ignorelist.h
 +protocols_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_REDIS
  pkglib_LTLIBRARIES += redis.la
  redis_la_SOURCES = redis.c
 -redis_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBCREDIS_LDFLAGS)
 +redis_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBCREDIS_LDFLAGS)
  redis_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBCREDIS_CPPFLAGS)
  redis_la_LIBADD = -lcredis
 -collectd_LDADD += "-dlopen" redis.la
 -collectd_DEPENDENCIES += redis.la
  endif
  
  if BUILD_PLUGIN_ROUTEROS
  pkglib_LTLIBRARIES += routeros.la
  routeros_la_SOURCES = routeros.c
 -routeros_la_CPPFLAGS = $(BUILD_WITH_LIBROUTEROS_CPPFLAGS)
 -routeros_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBROUTEROS_LDFLAGS)
 +routeros_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBROUTEROS_CPPFLAGS)
 +routeros_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBROUTEROS_LDFLAGS)
  routeros_la_LIBADD = -lrouteros
 -collectd_LDADD += "-dlopen" routeros.la
 -collectd_DEPENDENCIES += routeros.la
  endif
  
  if BUILD_PLUGIN_RRDCACHED
  pkglib_LTLIBRARIES += rrdcached.la
  rrdcached_la_SOURCES = rrdcached.c utils_rrdcreate.c utils_rrdcreate.h
 -rrdcached_la_LDFLAGS = -module -avoid-version
 +rrdcached_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  rrdcached_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBRRD_CFLAGS)
  rrdcached_la_LIBADD = $(BUILD_WITH_LIBRRD_LDFLAGS)
 -collectd_LDADD += "-dlopen" rrdcached.la
 -collectd_DEPENDENCIES += rrdcached.la
  endif
  
  if BUILD_PLUGIN_RRDTOOL
  pkglib_LTLIBRARIES += rrdtool.la
  rrdtool_la_SOURCES = rrdtool.c utils_rrdcreate.c utils_rrdcreate.h
 -rrdtool_la_LDFLAGS = -module -avoid-version
 +rrdtool_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  rrdtool_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBRRD_CFLAGS)
  rrdtool_la_LIBADD = $(BUILD_WITH_LIBRRD_LDFLAGS)
 -collectd_LDADD += "-dlopen" rrdtool.la
 -collectd_DEPENDENCIES += rrdtool.la
  endif
  
  if BUILD_PLUGIN_SENSORS
  pkglib_LTLIBRARIES += sensors.la
 -sensors_la_SOURCES = sensors.c
 +sensors_la_SOURCES = sensors.c \
 +                   utils_ignorelist.c utils_ignorelist.h
  sensors_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBSENSORS_CFLAGS)
 -sensors_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBSENSORS_LDFLAGS)
 +sensors_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBSENSORS_LDFLAGS)
  sensors_la_LIBADD = -lsensors
 -collectd_LDADD += "-dlopen" sensors.la
 -collectd_DEPENDENCIES += sensors.la
  endif
  
  if BUILD_PLUGIN_SERIAL
  pkglib_LTLIBRARIES += serial.la
  serial_la_SOURCES = serial.c
 -serial_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" serial.la
 -collectd_DEPENDENCIES += serial.la
 +serial_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_SIGROK
  pkglib_LTLIBRARIES += sigrok.la
  sigrok_la_SOURCES = sigrok.c
  sigrok_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBSIGROK_CFLAGS)
 -sigrok_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBSIGROK_LDFLAGS)
 +sigrok_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBSIGROK_LDFLAGS)
  sigrok_la_LIBADD = -lsigrok
 -collectd_LDADD += "-dlopen" sigrok.la
 -collectd_DEPENDENCIES += sigrok.la
 +endif
 +
 +if BUILD_PLUGIN_SMART
 +if BUILD_WITH_LIBUDEV
 +pkglib_LTLIBRARIES += smart.la
 +smart_la_SOURCES = smart.c \
 +                 utils_ignorelist.c utils_ignorelist.h
 +smart_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBATASMART_CPPFLAGS)
 +smart_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBATASMART_LDFLAGS)
 +smart_la_LIBADD = $(BUILD_WITH_LIBATASMART_LIBS) -ludev
 +endif
  endif
  
  if BUILD_PLUGIN_SNMP
  pkglib_LTLIBRARIES += snmp.la
  snmp_la_SOURCES = snmp.c
 -snmp_la_LDFLAGS = -module -avoid-version
 +snmp_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  snmp_la_CFLAGS = $(AM_CFLAGS)
  snmp_la_LIBADD =
  if BUILD_WITH_LIBNETSNMP
@@@ -909,22 -1129,28 +917,22 @@@ endi
  if BUILD_WITH_LIBPTHREAD
  snmp_la_LIBADD += -lpthread
  endif
 -collectd_LDADD += "-dlopen" snmp.la
 -collectd_DEPENDENCIES += snmp.la
  endif
  
  if BUILD_PLUGIN_STATSD
  pkglib_LTLIBRARIES += statsd.la
  statsd_la_SOURCES = statsd.c \
                      utils_latency.h utils_latency.c
 -statsd_la_LDFLAGS = -module -avoid-version
 +statsd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  statsd_la_LIBADD = -lpthread
 -collectd_LDADD += "-dlopen" statsd.la
 -collectd_DEPENDENCIES += statsd.la
  endif
  
  if BUILD_PLUGIN_SWAP
  pkglib_LTLIBRARIES += swap.la
  swap_la_SOURCES = swap.c
  swap_la_CFLAGS = $(AM_CFLAGS)
 -swap_la_LDFLAGS = -module -avoid-version
 +swap_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  swap_la_LIBADD =
 -collectd_LDADD += "-dlopen" swap.la
 -collectd_DEPENDENCIES += swap.la
  if BUILD_WITH_LIBKSTAT
  swap_la_LIBADD += -lkstat
  endif
@@@ -947,69 -1173,91 +955,69 @@@ endi
  if BUILD_PLUGIN_SYSLOG
  pkglib_LTLIBRARIES += syslog.la
  syslog_la_SOURCES = syslog.c
 -syslog_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" syslog.la
 -collectd_DEPENDENCIES += syslog.la
 +syslog_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_TABLE
  pkglib_LTLIBRARIES += table.la
  table_la_SOURCES = table.c
 -table_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" table.la
 -collectd_DEPENDENCIES += table.la
 +table_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_TAIL
  pkglib_LTLIBRARIES += tail.la
  tail_la_SOURCES = tail.c
 -tail_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" tail.la
 -collectd_DEPENDENCIES += tail.la
 +tail_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_TAIL_CSV
  pkglib_LTLIBRARIES += tail_csv.la
  tail_csv_la_SOURCES = tail_csv.c
 -tail_csv_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" tail_csv.la
 -collectd_DEPENDENCIES += tail_csv.la
 +tail_csv_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_TAPE
  pkglib_LTLIBRARIES += tape.la
  tape_la_SOURCES = tape.c
 -tape_la_LDFLAGS = -module -avoid-version
 +tape_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  tape_la_LIBADD = -lkstat -ldevinfo
 -collectd_LDADD += "-dlopen" tape.la
 -collectd_DEPENDENCIES += tape.la
  endif
  
  if BUILD_PLUGIN_TARGET_NOTIFICATION
  pkglib_LTLIBRARIES += target_notification.la
  target_notification_la_SOURCES = target_notification.c
 -target_notification_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" target_notification.la
 -collectd_DEPENDENCIES += target_notification.la
 +target_notification_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_TARGET_REPLACE
  pkglib_LTLIBRARIES += target_replace.la
  target_replace_la_SOURCES = target_replace.c
 -target_replace_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" target_replace.la
 -collectd_DEPENDENCIES += target_replace.la
 +target_replace_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_TARGET_SCALE
  pkglib_LTLIBRARIES += target_scale.la
  target_scale_la_SOURCES = target_scale.c
 -target_scale_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" target_scale.la
 -collectd_DEPENDENCIES += target_scale.la
 +target_scale_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_TARGET_SET
  pkglib_LTLIBRARIES += target_set.la
  target_set_la_SOURCES = target_set.c
 -target_set_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" target_set.la
 -collectd_DEPENDENCIES += target_set.la
 +target_set_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_TARGET_V5UPGRADE
  pkglib_LTLIBRARIES += target_v5upgrade.la
  target_v5upgrade_la_SOURCES = target_v5upgrade.c
 -target_v5upgrade_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" target_v5upgrade.la
 -collectd_DEPENDENCIES += target_v5upgrade.la
 +target_v5upgrade_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_TCPCONNS
  pkglib_LTLIBRARIES += tcpconns.la
  tcpconns_la_SOURCES = tcpconns.c
 -tcpconns_la_LDFLAGS = -module -avoid-version
 +tcpconns_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  tcpconns_la_LIBADD =
 -collectd_LDADD += "-dlopen" tcpconns.la
 -collectd_DEPENDENCIES += tcpconns.la
  if BUILD_WITH_LIBKVM_NLIST
  tcpconns_la_LIBADD += -lkvm
  endif
@@@ -1018,37 -1266,46 +1026,37 @@@ endi
  if BUILD_PLUGIN_TEAMSPEAK2
  pkglib_LTLIBRARIES += teamspeak2.la
  teamspeak2_la_SOURCES = teamspeak2.c
 -teamspeak2_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" teamspeak2.la
 -collectd_DEPENDENCIES += teamspeak2.la
 +teamspeak2_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_TED
  pkglib_LTLIBRARIES += ted.la
  ted_la_SOURCES = ted.c
 -ted_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" ted.la
 -collectd_DEPENDENCIES += ted.la
 +ted_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_THERMAL
  pkglib_LTLIBRARIES += thermal.la
 -thermal_la_SOURCES = thermal.c
 -thermal_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" thermal.la
 -collectd_DEPENDENCIES += thermal.la
 +thermal_la_SOURCES = thermal.c \
 +                   utils_ignorelist.c utils_ignorelist.h
 +thermal_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_THRESHOLD
  pkglib_LTLIBRARIES += threshold.la
  threshold_la_SOURCES = threshold.c
 -threshold_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" threshold.la
 -collectd_DEPENDENCIES += threshold.la
 +threshold_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_TOKYOTYRANT
  pkglib_LTLIBRARIES += tokyotyrant.la
  tokyotyrant_la_SOURCES = tokyotyrant.c
  tokyotyrant_la_CPPFLAGS  = $(AM_CPPFLAGS) $(BUILD_WITH_LIBTOKYOTYRANT_CPPFLAGS)
 -tokyotyrant_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBTOKYOTYRANT_LDFLAGS)
 +tokyotyrant_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBTOKYOTYRANT_LDFLAGS)
  tokyotyrant_la_LIBADD  = $(BUILD_WITH_LIBTOKYOTYRANT_LIBS)
  if BUILD_WITH_LIBSOCKET
  tokyotyrant_la_LIBADD += -lsocket
  endif
 -collectd_LDADD += "-dlopen" tokyotyrant.la
 -collectd_DEPENDENCIES += tokyotyrant.la
  endif
  
  if BUILD_PLUGIN_UNIXSOCK
@@@ -1059,17 -1316,18 +1067,17 @@@ unixsock_la_SOURCES = unixsock.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
 -unixsock_la_LDFLAGS = -module -avoid-version
 +                    utils_cmd_putnotif.h utils_cmd_putnotif.c \
 +                    utils_parse_option.h utils_parse_option.c
 +unixsock_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  unixsock_la_LIBADD = -lpthread
 -collectd_LDADD += "-dlopen" unixsock.la
 -collectd_DEPENDENCIES += unixsock.la
  endif
  
  if BUILD_PLUGIN_UPTIME
  pkglib_LTLIBRARIES += uptime.la
  uptime_la_SOURCES = uptime.c
  uptime_la_CFLAGS = $(AM_CFLAGS)
 -uptime_la_LDFLAGS = -module -avoid-version
 +uptime_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  uptime_la_LIBADD =
  if BUILD_WITH_LIBKSTAT
  uptime_la_LIBADD += -lkstat
@@@ -1077,18 -1335,22 +1085,18 @@@ endi
  if BUILD_WITH_PERFSTAT
  uptime_la_LIBADD += -lperfstat
  endif
 -collectd_LDADD += "-dlopen" uptime.la
 -collectd_DEPENDENCIES += uptime.la
  endif
  
  if BUILD_PLUGIN_USERS
  pkglib_LTLIBRARIES += users.la
  users_la_SOURCES = users.c
  users_la_CFLAGS = $(AM_CFLAGS)
 -users_la_LDFLAGS = -module -avoid-version
 +users_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  users_la_LIBADD =
  if BUILD_WITH_LIBSTATGRAB
  users_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
  users_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
  endif
 -collectd_LDADD += "-dlopen" users.la
 -collectd_DEPENDENCIES += users.la
  endif
  
  if BUILD_PLUGIN_UUID
@@@ -1096,43 -1358,53 +1104,43 @@@ pkglib_LTLIBRARIES += uuid.l
  uuid_la_SOURCES = uuid.c
  uuid_la_CFLAGS  = $(AM_CFLAGS) $(BUILD_WITH_LIBHAL_CFLAGS)
  uuid_la_LIBADD  = $(BUILD_WITH_LIBHAL_LIBS)
 -uuid_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" uuid.la
 -collectd_DEPENDENCIES += uuid.la
 -endif
 -
 -if BUILD_PLUGIN_MIC
 -pkglib_LTLIBRARIES += mic.la
 -mic_la_SOURCES = mic.c
 -mic_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_MIC_LIBPATH)
 -mic_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_MIC_CPPFLAGS)
 -mic_la_LIBADD = $(BUILD_WITH_MIC_LDADD)
 -collectd_LDADD += "-dlopen" mic.la
 -collectd_DEPENDENCIES += mic.la
 +uuid_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_VARNISH
  pkglib_LTLIBRARIES += varnish.la
  varnish_la_SOURCES = varnish.c
 -varnish_la_LDFLAGS = -module -avoid-version
 +varnish_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  varnish_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBVARNISH_CFLAGS)
  varnish_la_LIBADD = $(BUILD_WITH_LIBVARNISH_LIBS)
 -collectd_LDADD += "-dlopen" varnish.la
 -collectd_DEPENDENCIES += varnish.la
 +endif
 +
 +if BUILD_PLUGIN_VIRT
 +pkglib_LTLIBRARIES += virt.la
 +virt_la_SOURCES = virt.c \
 +                utils_ignorelist.c utils_ignorelist.h
 +virt_la_CFLAGS = $(AM_CFLAGS) \
 +              $(BUILD_WITH_LIBVIRT_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
 +virt_la_LIBADD = $(BUILD_WITH_LIBVIRT_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
 +virt_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_VMEM
  pkglib_LTLIBRARIES += vmem.la
  vmem_la_SOURCES = vmem.c
 -vmem_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" vmem.la
 -collectd_DEPENDENCIES += vmem.la
 +vmem_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_VSERVER
  pkglib_LTLIBRARIES += vserver.la
  vserver_la_SOURCES = vserver.c
 -vserver_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" vserver.la
 -collectd_DEPENDENCIES += vserver.la
 +vserver_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_WIRELESS
  pkglib_LTLIBRARIES += wireless.la
  wireless_la_SOURCES = wireless.c
 -wireless_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" wireless.la
 -collectd_DEPENDENCIES += wireless.la
 +wireless_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_WRITE_GRAPHITE
@@@ -1140,20 -1412,24 +1148,20 @@@ pkglib_LTLIBRARIES += write_graphite.l
  write_graphite_la_SOURCES = write_graphite.c \
                          utils_format_graphite.c utils_format_graphite.h \
                          utils_format_json.c utils_format_json.h
 -write_graphite_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" write_graphite.la
 -collectd_DEPENDENCIES += write_graphite.la
 +write_graphite_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_WRITE_HTTP
  pkglib_LTLIBRARIES += write_http.la
  write_http_la_SOURCES = write_http.c \
                        utils_format_json.c utils_format_json.h
 -write_http_la_LDFLAGS = -module -avoid-version
 +write_http_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  write_http_la_CFLAGS = $(AM_CFLAGS)
  write_http_la_LIBADD =
 -collectd_LDADD += "-dlopen" write_http.la
  if BUILD_WITH_LIBCURL
  write_http_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
  write_http_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
  endif
 -collectd_DEPENDENCIES += write_http.la
  endif
  
  if BUILD_PLUGIN_WRITE_KAFKA
@@@ -1163,53 -1439,65 +1171,53 @@@ write_kafka_la_SOURCES = write_kafka.c 
                          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_LDFLAGS = $(PLUGIN_LDFLAGS) $(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
  write_mongodb_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBMONGOC_CPPFLAGS)
 -write_mongodb_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBMONGOC_LDFLAGS)
 +write_mongodb_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBMONGOC_LDFLAGS)
  write_mongodb_la_LIBADD = -lmongoc
 -collectd_LDADD += "-dlopen" write_mongodb.la
 -collectd_DEPENDENCIES += write_mongodb.la
  endif
  
  if BUILD_PLUGIN_WRITE_REDIS
  pkglib_LTLIBRARIES += write_redis.la
  write_redis_la_SOURCES = write_redis.c
 -write_redis_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBCREDIS_LDFLAGS)
 +write_redis_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBCREDIS_LDFLAGS)
  write_redis_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBCREDIS_CPPFLAGS)
  write_redis_la_LIBADD = -lcredis
 -collectd_LDADD += "-dlopen" write_redis.la
 -collectd_DEPENDENCIES += write_redis.la
  endif
  
  if BUILD_PLUGIN_WRITE_RIEMANN
  pkglib_LTLIBRARIES += write_riemann.la
  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_LDFLAGS = $(PLUGIN_LDFLAGS)
  write_riemann_la_LIBADD = -lprotobuf-c
 -collectd_LDADD += "-dlopen" write_riemann.la
 -collectd_DEPENDENCIES += write_riemann.la
  endif
  
  if BUILD_PLUGIN_WRITE_TSDB
  pkglib_LTLIBRARIES += write_tsdb.la
  write_tsdb_la_SOURCES = write_tsdb.c
 -write_tsdb_la_LDFLAGS = -module -avoid-version
 -collectd_LDADD += "-dlopen" write_tsdb.la
 -collectd_DEPENDENCIES += write_tsdb.la
 +write_tsdb_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
  if BUILD_PLUGIN_XMMS
  pkglib_LTLIBRARIES += xmms.la
  xmms_la_SOURCES = xmms.c
  xmms_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBXMMS_CFLAGS)
 -xmms_la_LDFLAGS = -module -avoid-version
 +xmms_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  xmms_la_LIBADD = $(BUILD_WITH_LIBXMMS_LIBS)
 -collectd_LDADD += "-dlopen" xmms.la
 -collectd_DEPENDENCIES += xmms.la
  endif
  
  if BUILD_PLUGIN_ZFS_ARC
  pkglib_LTLIBRARIES += zfs_arc.la
  zfs_arc_la_SOURCES = zfs_arc.c
  zfs_arc_la_CFLAGS = $(AM_CFLAGS)
 -zfs_arc_la_LDFLAGS = -module -avoid-version
 +zfs_arc_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  if BUILD_FREEBSD
  zfs_arc_la_LIBADD = -lm
  else
@@@ -1220,6 -1508,8 +1228,6 @@@ els
  zfs_arc_la_LIBADD = -lkstat
  endif
  endif
 -collectd_LDADD += "-dlopen" zfs_arc.la
 -collectd_DEPENDENCIES += zfs_arc.la
  endif
  
  BUILT_SOURCES += $(dist_man_MANS)
@@@ -1319,7 -1609,7 +1327,7 @@@ uninstall-hook
  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 \
 +                      daemon/common.h daemon/common.c \
                        tests/mock/plugin.c \
                        tests/mock/utils_cache.c \
                        tests/mock/utils_time.c
@@@ -1328,20 -1618,20 +1336,20 @@@ test_common_LDFLAGS = -export-dynami
  test_common_LDADD =
  
  test_utils_avltree_SOURCES = tests/test_utils_avltree.c \
 -                             utils_avltree.c utils_avltree.h
 +                             daemon/utils_avltree.c daemon/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
 +                          daemon/utils_heap.c daemon/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 \
 +                           daemon/common.c daemon/common.h \
                             tests/mock/plugin.c \
                             tests/mock/utils_cache.c \
                             tests/mock/utils_time.c
@@@ -1351,8 -1641,8 +1359,8 @@@ 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.c common.h \
 +                               daemon/utils_avltree.c daemon/utils_avltree.h \
 +                               daemon/common.c daemon/common.h \
                                 tests/mock/plugin.c \
                                 tests/mock/utils_cache.c \
                                 tests/mock/utils_time.c
diff --combined src/collectd.conf.in
  #AutoLoadPlugin false
  
  #----------------------------------------------------------------------------#
 +# When enabled, internal statistics are collected, using "collectd" as the   #
 +# plugin name.                                                               #
 +# Disabled by default.                                                       #
 +#----------------------------------------------------------------------------#
 +#CollectInternalStats false
 +
 +#----------------------------------------------------------------------------#
  # Interval at which to query values. This may be overwritten on a per-plugin #
  # base by using the 'Interval' option of the LoadPlugin block:               #
  #   <LoadPlugin foo>                                                         #
  #----------------------------------------------------------------------------#
  #Interval     10
  
 -#Timeout      2
 -#ReadThreads  5
 -#WriteThreads 5
 +#MaxReadInterval 86400
 +#Timeout         2
 +#ReadThreads     5
 +#WriteThreads    5
  
  # Limit the size of the write queue. Default is no limit. Setting up a limit is
  # recommended for servers handling a high volume of traffic.
  #@BUILD_PLUGIN_IPVS_TRUE@LoadPlugin ipvs
  #@BUILD_PLUGIN_IRQ_TRUE@LoadPlugin irq
  #@BUILD_PLUGIN_JAVA_TRUE@LoadPlugin java
 -#@BUILD_PLUGIN_LIBVIRT_TRUE@LoadPlugin libvirt
  @BUILD_PLUGIN_LOAD_TRUE@@BUILD_PLUGIN_LOAD_TRUE@LoadPlugin load
  #@BUILD_PLUGIN_LPAR_TRUE@LoadPlugin lpar
  #@BUILD_PLUGIN_LVM_TRUE@LoadPlugin lvm
  #@BUILD_PLUGIN_NUT_TRUE@LoadPlugin nut
  #@BUILD_PLUGIN_OLSRD_TRUE@LoadPlugin olsrd
  #@BUILD_PLUGIN_ONEWIRE_TRUE@LoadPlugin onewire
+ #@BUILD_PLUGIN_OPENLDAP_TRUE@LoadPlugin openldap
  #@BUILD_PLUGIN_OPENVPN_TRUE@LoadPlugin openvpn
  #@BUILD_PLUGIN_ORACLE_TRUE@LoadPlugin oracle
  #@BUILD_PLUGIN_PERL_TRUE@<LoadPlugin perl>
  #@BUILD_PLUGIN_SENSORS_TRUE@LoadPlugin sensors
  #@BUILD_PLUGIN_SERIAL_TRUE@LoadPlugin serial
  #@BUILD_PLUGIN_SIGROK_TRUE@LoadPlugin sigrok
 +#@BUILD_PLUGIN_SMART_TRUE@LoadPlugin smart
  #@BUILD_PLUGIN_SNMP_TRUE@LoadPlugin snmp
  #@BUILD_PLUGIN_STATSD_TRUE@LoadPlugin statsd
  #@BUILD_PLUGIN_SWAP_TRUE@LoadPlugin swap
  #@BUILD_PLUGIN_UUID_TRUE@LoadPlugin uuid
  #@BUILD_PLUGIN_VARNISH_TRUE@LoadPlugin varnish
  #@BUILD_PLUGIN_MIC_TRUE@LoadPlugin mic
 +#@BUILD_PLUGIN_VIRT_TRUE@LoadPlugin virt
  #@BUILD_PLUGIN_VMEM_TRUE@LoadPlugin vmem
  #@BUILD_PLUGIN_VSERVER_TRUE@LoadPlugin vserver
  #@BUILD_PLUGIN_WIRELESS_TRUE@LoadPlugin wireless
  #   TemperatureSensor "myserver/onewire-F10FCA000800/temperature"
  #</Plugin>
  
 +#<Plugin "battery">
 +#  ValuesPercentage false
 +#  ReportDegraded
 +#</Plugin>
 +
  #<Plugin "bind">
  #  URL "http://localhost:8053/"
  #  ParseTime       false
  #</Plugin>
  
  #<Plugin cpu>
 -#  ReportActive false
  #  ReportByCpu true
 +#  ReportByState true
  #  ValuesPercentage false
  #</Plugin>
  #
  #    URL "http://finance.google.com/finance?q=NYSE%3AAMD"
  #    User "foo"
  #    Password "bar"
 +#    Digest false
 +#    VerifyPeer true
 +#    VerifyHost true
 +#    CACert "/path/to/ca.crt"
 +#    Header "X-Custom-Header: foobar"
 +#    Post "foo=bar"
 +#
  #    MeasureResponseTime false
 +#    MeasureResponseCode false
  #    <Match>
  #      Regex "<span +class=\"pr\"[^>]*> *([0-9]*\\.[0-9]+) *</span>"
  #      DSType "GaugeAverage"
  #    Instance "some_instance"
  #    User "collectd"
  #    Password "thaiNg0I"
 +#    Digest false
  #    VerifyPeer true
  #    VerifyHost true
  #    CACert "/path/to/ca.crt"
 +#    Header "X-Custom-Header: foobar"
 +#    Post "foo=bar"
  #
  #    <XPath "table[@id=\"magic_level\"]/tr">
  #      Type "magic_level"
  #     </Plugin>
  #</Plugin>
  
 -#<Plugin libvirt>
 -#     Connection "xen:///"
 -#     RefreshInterval 60
 -#     Domain "name"
 -#     BlockDevice "name:device"
 -#     InterfaceDevice "name:device"
 -#     IgnoreSelected false
 -#     HostnameFormat name
 -#     InterfaceFormat name
 -#     PluginInstanceFormat name
 -#</Plugin>
 -
  #<Plugin load>
  #        ReportRelative true
  #</Plugin>
  #             Username "user"
  #             Password "secret"
  #             Interface "eth0"
 +#             ResolveInterval 14400
  @LOAD_PLUGIN_NETWORK@ </Server>
  #     TimeToLive "128"
  #
  #             AuthFile "/etc/collectd/passwd"
  #             Interface "eth0"
  #     </Listen>
 -#     MaxPacketSize 1024
 +#     MaxPacketSize 1452
  #
  #     # proxy setup (client and server as above):
  #     Forward true
  #     IgnoreSelected false
  #</Plugin>
  
+ #<Plugin openldap>
+ #  <Instance "localhost">
+ #    URL "ldap://localhost:389"
+ #    StartTLS false
+ #    VerifyHost true
+ #    CACert "/path/to/ca.crt"
+ #    Timeout -1
+ #    Version 3
+ #  </Instance>
+ #</Plugin>
  #<Plugin openvpn>
  #     StatusFile "/etc/openvpn/openvpn-status.log"
  #     ImprovedNamingSchema false
  #  </Device>
  #</Plugin>
  
 +#<Plugin smart>
 +#  Disk "/^[hs]d[a-f][0-9]?$/"
 +#  IgnoreSelected false
 +#</Plugin>
 +
  #<Plugin snmp>
  #   <Data "powerplus_voltge_input">
  #       Type "voltage"
  
  #<Plugin tcpconns>
  #     ListeningPorts false
 +#     AllPortsSummary false
  #     LocalPort "25"
  #     RemotePort "25"
  #</Plugin>
  #   </Instance>
  #</Plugin>
  
 +#<Plugin virt>
 +#     Connection "xen:///"
 +#     RefreshInterval 60
 +#     Domain "name"
 +#     BlockDevice "name:device"
 +#     InterfaceDevice "name:device"
 +#     IgnoreSelected false
 +#     HostnameFormat name
 +#     InterfaceFormat name
 +#     PluginInstanceFormat name
 +#</Plugin>
 +
  #<Plugin vmem>
  #     Verbose false
  #</Plugin>
  #             SSLVersion "TLSv1"
  #             Format "Command"
  #             StoreRates false
 +#             BufferSize 4096
  #     </URL>
  #</Plugin>
  
diff --combined src/collectd.conf.pod
@@@ -6,9 -6,9 +6,9 @@@ collectd.conf - Configuration for the s
  
  =head1 SYNOPSIS
  
 -  BaseDir "/path/to/data/"
 -  PIDFile "/path/to/pidfile/collectd.pid"
 -  Server  "123.123.123.123" 12345
 +  BaseDir "/var/lib/collectd"
 +  PIDFile "/run/collectd.pid"
 +  Interval 10.0
  
    LoadPlugin cpu
    LoadPlugin load
@@@ -16,9 -16,6 +16,9 @@@
    <LoadPlugin df>
      Interval 3600
    </LoadPlugin>
 +  <Plugin df>
 +    ValuesPercentage true
 +  </Plugin>
  
    LoadPlugin ping
    <Plugin ping>
@@@ -31,9 -28,7 +31,9 @@@
  This config file controls how the system statistics collection daemon
  B<collectd> behaves. The most significant option is B<LoadPlugin>, which
  controls which plugins to load. These plugins ultimately define collectd's
 -behavior.
 +behavior. If the B<AutoLoadPlugin> option has been enabled, the explicit
 +B<LoadPlugin> lines may be omitted for all plugins with a configuration block,
 +i.e. a C<E<lt>PluginE<nbsp>...E<gt>> block.
  
  The syntax of this config file is similar to the config file of the famous
  I<Apache> webserver. Each line contains either an option (a key and a list of
@@@ -60,9 -55,8 +60,9 @@@ indenting the wrapped lines
  The configuration is read and processed in order, i.e. from top to bottom. So
  the plugins are loaded in the order listed in this config file. It is a good
  idea to load any logging plugins first in order to catch messages from plugins
 -during configuration. Also, the C<LoadPlugin> option B<must> occur B<before>
 -the appropriate C<E<lt>Plugin ...E<gt>> block.
 +during configuration. Also, unless B<AutoLoadPlugin> is enabled, the
 +B<LoadPlugin> option I<must> occur I<before> the appropriate
 +C<E<lt>B<Plugin> ...E<gt>> block.
  
  =head1 GLOBAL OPTIONS
  
@@@ -146,18 -140,6 +146,18 @@@ B<E<lt>PluginE<nbsp>...E<gt>> block act
  B<LoadPlugin> statement. B<LoadPlugin> statements are still required for
  plugins that don't provide any configuration, e.g. the I<Load plugin>.
  
 +=item B<CollectInternalStats> B<false>|B<true>
 +
 +When set to B<true>, various statistics about the I<collectd> daemon will be
 +collected, with "collectd" as the I<plugin name>. Defaults to B<false>.
 +
 +The "write_queue" I<plugin instance> reports the number of elements currently
 +queued and the number of elements dropped off the queue by the
 +B<WriteQueueLimitLow>/B<WriteQueueLimitHigh> mechanism.
 +
 +The "cache" I<plugin instance> reports the number of elements in the value list
 +cache (the cache you can interact with using L<collectd-unixsock(5)>).
 +
  =item B<Include> I<Path> [I<pattern>]
  
  If I<Path> points to a file, includes that file. If I<Path> points to a
@@@ -230,14 -212,6 +230,14 @@@ B<Warning:> You should set this once an
  I<you will have to delete all your RRD files> or know some serious RRDtool
  magic! (Assuming you're using the I<RRDtool> or I<RRDCacheD> plugin.)
  
 +=item B<MaxReadInterval> I<Seconds>
 +
 +Read plugin doubles interval between queries after each failed attempt
 +to get data.
 +
 +This options limits the maximum value of the interval. The default value is
 +B<86400>.
 +
  =item B<Timeout> I<Iterations>
  
  Consider a value list "missing" when no update has been read or received for
@@@ -288,11 -262,8 +288,11 @@@ If B<WriteQueueLimitHigh> is set to non
  unset, the latter will default to half of B<WriteQueueLimitHigh>.
  
  If you do not want to randomly drop values when the queue size is between
 -I<LowNum> and I<HighNum>, set If B<WriteQueueLimitHigh> and
 -B<WriteQueueLimitLow> to same value.
 +I<LowNum> and I<HighNum>, set B<WriteQueueLimitHigh> and B<WriteQueueLimitLow>
 +to the same value.
 +
 +Enabling the B<CollectInternalStats> option is of great help to figure out the
 +values to set B<WriteQueueLimitHigh> and B<WriteQueueLimitLow> to.
  
  =item B<Hostname> I<Name>
  
@@@ -860,7 -831,7 +860,7 @@@ and are checked by default depends on t
  
  This plugin reads absolute air pressure using digital barometer sensor MPL115A2
  or MPL3115 from Freescale (sensor attached to any I2C bus available in
 -the computer, for HW details see 
 +the computer, for HW details see
  I<http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MPL115A> or
  I<http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MPL3115A2>).
  The sensor type - one fo these two - is detected automatically by the plugin
@@@ -973,7 -944,7 +973,7 @@@ Temperature sensor which should be use
  When specified more sensors a minumum is found and uses each time.
  The temperature reading directly from this pressure sensor/plugin
  is typically not suitable as the pressure sensor
 -will be probably inside while we want outside temperature. 
 +will be probably inside while we want outside temperature.
  The collectd reference name is something like
  <hostname>/<plugin_name>-<plugin_instance>/<type>-<type_instance>
  (<type_instance> is usually omitted when there is just single value type).
@@@ -981,40 -952,6 +981,40 @@@ Or you can figure it out from the path 
  
  =back
  
 +=head2 Plugin C<battery>
 +
 +The I<battery plugin> reports the remaining capacity, power and voltage of
 +laptop batteries.
 +
 +=over 4
 +
 +=item B<ValuesPercentage> B<false>|B<true>
 +
 +When enabled, remaining capacity is reported as a percentage, e.g. "42%
 +capacity remaining". Otherwise the capacity is stored as reported by the
 +battery, most likely in "Wh". This option does not work with all input methods,
 +in particular when only C</proc/pmu> is available on an old Linux system.
 +Defaults to B<false>.
 +
 +=item B<ReportDegraded> B<false>|B<true>
 +
 +Typical laptop batteries degrade over time, meaning the capacity decreases with
 +recharge cycles. The maximum charge of the previous charge cycle is tracked as
 +"last full capacity" and used to determine that a battery is "fully charged".
 +
 +When this option is set to B<false>, the default, the I<battery plugin> will
 +only report the remaining capacity. If the B<ValuesPercentage> option is
 +enabled, the relative remaining capacity is calculated as the ratio of the
 +"remaining capacity" and the "last full capacity". This is what most tools,
 +such as the status bar of desktop environments, also do.
 +
 +When set to B<true>, the battery plugin will report three values: B<charged>
 +(remaining capacity), B<discharged> (difference between "last full capacity"
 +and "remaining capacity") and B<degraded> (difference between "design capacity"
 +and "last full capacity").
 +
 +=back
 +
  =head2 Plugin C<bind>
  
  Starting with BIND 9.5.0, the most widely used DNS server software provides
@@@ -1207,53 -1144,29 +1207,53 @@@ F</proc/sys/net/ipv4/netfilter> instea
  
  =head2 Plugin C<cpu>
  
 -The I<CPU plugin> collects CPU usage metrics.
 +The I<CPU plugin> collects CPU usage metrics. By default, CPU usage is reported
 +as Jiffies, using the C<cpu> type. Two aggregations are available:
 +
 +=over 4
 +
 +=item
 +
 +Sum, per-state, over all CPUs installed in the system; and
 +
 +=item
 +
 +Sum, per-CPU, over all non-idle states of a CPU, creating an "active" state.
 +
 +=back
 +
 +The two aggregations can be combined, leading to I<collectd> only emitting a
 +single "active" metric for the entire system. As soon as one of these
 +aggregations (or both) is enabled, the I<cpu plugin> will report a percentage,
 +rather than Jiffies. In addition, you can request individual, per-state,
 +per-CPU metrics to be reported as percentage.
  
  The following configuration options are available:
  
  =over 4
  
 -=item B<ReportActive> B<false>|B<true>
 +=item B<ReportByState> B<true>|B<false>
  
 -Reports non-idle CPU usage as the "active" value. Defaults to false.
 +When set to B<true>, the default, reports per-state metrics, e.g. "system",
 +"user" and "idle".
 +When set to B<false>, aggregates (sums) all I<non-idle> states into one
 +"active" metric.
  
 -=item B<ReportByCpu> B<false>|B<true>
 +=item B<ReportByCpu> B<true>|B<false>
  
 -When true reports usage for all cores. When false, reports cpu usage
 -aggregated over all cores.
 -Defaults to true.
 +When set to B<true>, the default, reports per-CPU (per-core) metrics.
 +When set to B<false>, instead of reporting metrics for individual CPUs, only a
 +global sum of CPU states is emitted.
  
  =item B<ValuesPercentage> B<false>|B<true>
  
 -When true report percentage usage instead of tick values. Defaults to false.
 +This option is only considered when both, B<ReportByCpu> and B<ReportByState>
 +are set to B<true>. In this case, by default, metrics will be reported as
 +Jiffies. By setting this option to B<true>, you can request percentage values
 +in the un-aggregated (per-CPU, per-state) mode as well.
  
  =back
  
 -
  =head2 Plugin C<cpufreq>
  
  This plugin doesn't have any options. It reads
@@@ -1296,16 -1209,6 +1296,16 @@@ finance page and dispatch the value to 
        URL "http://finance.google.com/finance?q=NYSE%3AAMD"
        User "foo"
        Password "bar"
 +      Digest false
 +      VerifyPeer true
 +      VerifyHost true
 +      CACert "/path/to/ca.crt"
 +      Header "X-Custom-Header: foobar"
 +      Post "foo=bar"
 +
 +      MeasureResponseTime false
 +      MeasureResponseCode false
 +
        <Match>
          Regex "<span +class=\"pr\"[^>]*> *([0-9]*\\.[0-9]+) *</span>"
          DSType "GaugeAverage"
@@@ -1378,19 -1281,13 +1378,19 @@@ C<application/x-www-form-urlencoded>)
  Measure response time for the request. If this setting is enabled, B<Match>
  blocks (see below) are optional. Disabled by default.
  
 +=item B<MeasureResponseCode> B<true>|B<false>
 +
 +Measure response code for the request. If this setting is enabled, B<Match>
 +blocks (see below) are optional. Disabled by default.
 +
  =item B<E<lt>MatchE<gt>>
  
  One or more B<Match> blocks that define how to match information in the data
  returned by C<libcurl>. The C<curl> plugin uses the same infrastructure that's
  used by the C<tail> plugin, so please see the documentation of the C<tail>
 -plugin below on how matches are defined. If the B<MeasureResponseTime> option
 -is set to B<true>, B<Match> blocks are optional.
 +plugin below on how matches are defined. If the B<MeasureResponseTime> or
 +B<MeasureResponseCode> options are set to B<true>, B<Match> blocks are
 +optional.
  
  =back
  
@@@ -1513,8 -1410,6 +1513,8 @@@ The B<curl_xml plugin> uses B<libcurl> 
       VerifyPeer true
       VerifyHost true
       CACert "/path/to/ca.crt"
 +     Header "X-Custom-Header: foobar"
 +     Post "foo=bar"
  
       <XPath "table[@id=\"magic_level\"]/tr">
         Type "magic_level"
@@@ -1810,7 -1705,7 +1810,7 @@@ There must be at least one B<ValuesFrom
  =item B<MetadataFrom> [I<column0> I<column1> ...]
  
  Names the columns whose content is used as metadata for the data sets
 -that are dispatched to the daemon. 
 +that are dispatched 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
@@@ -2454,6 -2349,101 +2454,6 @@@ independent from the I<JavaClass> argum
  
  =back
  
 -=head2 Plugin C<libvirt>
 -
 -This plugin allows CPU, disk and network load to be collected for virtualized
 -guests on the machine. This means that these characteristics can be collected
 -for guest systems without installing any software on them - collectd only runs
 -on the hosting system. The statistics are collected through libvirt
 -(L<http://libvirt.org/>).
 -
 -Only I<Connection> is required.
 -
 -=over 4
 -
 -=item B<Connection> I<uri>
 -
 -Connect to the hypervisor given by I<uri>. For example if using Xen use:
 -
 - Connection "xen:///"
 -
 -Details which URIs allowed are given at L<http://libvirt.org/uri.html>.
 -
 -=item B<RefreshInterval> I<seconds>
 -
 -Refresh the list of domains and devices every I<seconds>. The default is 60
 -seconds. Setting this to be the same or smaller than the I<Interval> will cause
 -the list of domains and devices to be refreshed on every iteration.
 -
 -Refreshing the devices in particular is quite a costly operation, so if your
 -virtualization setup is static you might consider increasing this. If this
 -option is set to 0, refreshing is disabled completely.
 -
 -=item B<Domain> I<name>
 -
 -=item B<BlockDevice> I<name:dev>
 -
 -=item B<InterfaceDevice> I<name:dev>
 -
 -=item B<IgnoreSelected> I<true>|I<false>
 -
 -Select which domains and devices are collected.
 -
 -If I<IgnoreSelected> is not given or I<false> then only the listed domains and
 -disk/network devices are collected.
 -
 -If I<IgnoreSelected> is I<true> then the test is reversed and the listed
 -domains and disk/network devices are ignored, while the rest are collected.
 -
 -The domain name and device names may use a regular expression, if the name is
 -surrounded by I</.../> and collectd was compiled with support for regexps.
 -
 -The default is to collect statistics for all domains and all their devices.
 -
 -Example:
 -
 - BlockDevice "/:hdb/"
 - IgnoreSelected "true"
 -
 -Ignore all I<hdb> devices on any domain, but other block devices (eg. I<hda>)
 -will be collected.
 -
 -=item B<HostnameFormat> B<name|uuid|hostname|...>
 -
 -When the libvirt plugin logs data, it sets the hostname of the collected data
 -according to this setting. The default is to use the guest name as provided by
 -the hypervisor, which is equal to setting B<name>.
 -
 -B<uuid> means use the guest's UUID. This is useful if you want to track the
 -same guest across migrations.
 -
 -B<hostname> means to use the global B<Hostname> setting, which is probably not
 -useful on its own because all guests will appear to have the same name.
 -
 -You can also specify combinations of these fields. For example B<name uuid>
 -means to concatenate the guest name and UUID (with a literal colon character
 -between, thus I<"foo:1234-1234-1234-1234">).
 -
 -=item B<InterfaceFormat> B<name>|B<address>
 -
 -When the libvirt plugin logs interface data, it sets the name of the collected
 -data according to this setting. The default is to use the path as provided by
 -the hypervisor (the "dev" property of the target node), which is equal to
 -setting B<name>.
 -
 -B<address> means use the interface's mac address. This is useful since the
 -interface path might change between reboots of a guest or across migrations.
 -
 -=item B<PluginInstanceFormat> B<name|uuid>
 -
 -When the libvirt plugin logs data, it sets the plugin_instance of the collected 
 -data according to this setting. The default is to use the guest name as provided 
 -by the hypervisor, which is equal to setting B<name>.
 -
 -B<uuid> means use the guest's UUID.
 -
 -=back
 -
  =head2 Plugin C<load>
  
  The I<Load plugin> collects the system load. These numbers give a rough overview
@@@ -3819,12 -3809,6 +3819,12 @@@ behavior is to let the kernel choose th
  that the manual selection of an interface for unicast traffic is only
  necessary in rare cases.
  
 +=item B<ResolveInterval> I<Seconds>
 +
 +Sets the interval at which to re-resolve the DNS for the I<Host>. This is
 +useful to force a regular DNS lookup to support a high availability setup. If
 +not specified, re-resolves are never attempted.
 +
  =back
  
  =item B<E<lt>Listen> I<Host> [I<Port>]B<E<gt>>
@@@ -4245,6 -4229,70 +4245,70 @@@ short: If it works for you: Great! But 
  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<nbsp>:)
  
+ =head2 Plugin C<openldap>
+ To use the C<openldap> plugin you first need to configure the I<OpenLDAP>
+ server correctly. The backend database C<monitor> needs to be loaded and
+ working. See slapd-monitor(5) for the details.
+ The configuration of the C<openldap> plugin consists of one or more B<Instance>
+ blocks. Each block requires one string argument as the instance name. For
+ example:
+  <Plugin "openldap">
+    <Instance "foo">
+      URL "ldap://localhost/"
+    </Instance>
+    <Instance "bar">
+      URL "ldaps://localhost/"
+    </Instance>
+  </Plugin>
+ The instance name will be used as the I<plugin instance>. To emulate the old
+ (versionE<nbsp>4) behavior, you can use an empty string (""). In order for the
+ plugin to work correctly, each instance name must be unique. This is not
+ enforced by the plugin and it is your responsibility to ensure it is.
+ The following options are accepted within each B<Instance> block:
+ =over 4
+ =item B<URL> I<ldap://host/binddn>
+ Sets the URL to use to connect to the I<OpenLDAP> server. This option is
+ I<mandatory>.
+ =item B<StartTLS> B<true|false>
+ Defines whether TLS must be used when connecting to the I<OpenLDAP> server.
+ Disabled by default.
+ =item B<VerifyHost> B<true|false>
+ Enables or disables peer host name verification. If enabled, the plugin checks
+ if the C<Common Name> or a C<Subject Alternate Name> field of the SSL
+ certificate matches the host name provided by the B<URL> option. If this
+ identity check fails, the connection is aborted. Enabled by default.
+ =item B<CACert> I<File>
+ File that holds one or more SSL certificates. If you want to use TLS/SSL you
+ may possibly need this option. What CA certificates are checked by default
+ depends on the distribution you use and can be changed with the usual ldap
+ client configuration mechanisms. See ldap.conf(5) for the details.
+ =item B<Timeout> I<Seconds>
+ Sets the timeout value for ldap operations. Defaults to B<-1> which results in
+ an infinite timeout.
+ =item B<Version> I<Version>
+ An integer which sets the LDAP protocol version number to use when connecting
+ to the I<OpenLDAP> server. Defaults to B<3> for using I<LDAPv3>.
+ =back
  =head2 Plugin C<openvpn>
  
  The OpenVPN plugin reads a status file maintained by OpenVPN and gathers
@@@ -5639,40 -5687,6 +5703,40 @@@ measurements are discarded
  
  =back
  
 +=head2 Plugin C<smart>
 +
 +The C<smart> plugin collects SMART information from physical
 +disks. Values collectd include temperature, power cycle count, poweron
 +time and bad sectors. Also, all SMART attributes are collected along
 +with the normalized current value, the worst value, the threshold and
 +a human readable value.
 +
 +Using the following two options you can ignore some disks or configure the
 +collection only of specific disks.
 +
 +=over 4
 +
 +=item B<Disk> I<Name>
 +
 +Select the disk I<Name>. Whether it is collected or ignored depends on the
 +B<IgnoreSelected> setting, see below. As with other plugins that use the
 +daemon's ignorelist functionality, a string that starts and ends with a slash
 +is interpreted as a regular expression. Examples:
 +
 +  Disk "sdd"
 +  Disk "/hda[34]/"
 +
 +=item B<IgnoreSelected> B<true>|B<false>
 +
 +Sets whether selected disks, i.E<nbsp>e. the ones matches by any of the B<Disk>
 +statements, are ignored or if all other disks are ignored. The behavior
 +(hopefully) is intuitive: If no B<Disk> option is configured, all disks are
 +collected. If at least one B<Disk> option is given and no B<IgnoreSelected> or
 +set to B<false>, B<only> matching disks will be collected. If B<IgnoreSelected>
 +is set to B<true>, all disks are collected B<except> the ones matched.
 +
 +=back
 +
  =head2 Plugin C<snmp>
  
  Since the configuration of the C<snmp plugin> is a little more complicated than
@@@ -6210,11 -6224,6 +6274,11 @@@ connections a mail server or news serve
  how many connections a web proxy holds to web servers. You have to give the
  port in numeric form.
  
 +=item B<AllPortsSummary> I<true>|I<false>
 +
 +If this option is set to I<true> a summary of statistics from all connections
 +are collectd. This option defaults to I<false>.
 +
  =back
  
  =head2 Plugin C<thermal>
@@@ -6472,101 -6481,6 +6536,101 @@@ Collect statistics about worker threads
  
  =back
  
 +=head2 Plugin C<virt>
 +
 +This plugin allows CPU, disk and network load to be collected for virtualized
 +guests on the machine. This means that these metrics can be collected for guest
 +systems without installing any software on them - I<collectd> only runs on the
 +host system. The statistics are collected through libvirt
 +(L<http://libvirt.org/>).
 +
 +Only I<Connection> is required.
 +
 +=over 4
 +
 +=item B<Connection> I<uri>
 +
 +Connect to the hypervisor given by I<uri>. For example if using Xen use:
 +
 + Connection "xen:///"
 +
 +Details which URIs allowed are given at L<http://libvirt.org/uri.html>.
 +
 +=item B<RefreshInterval> I<seconds>
 +
 +Refresh the list of domains and devices every I<seconds>. The default is 60
 +seconds. Setting this to be the same or smaller than the I<Interval> will cause
 +the list of domains and devices to be refreshed on every iteration.
 +
 +Refreshing the devices in particular is quite a costly operation, so if your
 +virtualization setup is static you might consider increasing this. If this
 +option is set to 0, refreshing is disabled completely.
 +
 +=item B<Domain> I<name>
 +
 +=item B<BlockDevice> I<name:dev>
 +
 +=item B<InterfaceDevice> I<name:dev>
 +
 +=item B<IgnoreSelected> B<true>|B<false>
 +
 +Select which domains and devices are collected.
 +
 +If I<IgnoreSelected> is not given or B<false> then only the listed domains and
 +disk/network devices are collected.
 +
 +If I<IgnoreSelected> is B<true> then the test is reversed and the listed
 +domains and disk/network devices are ignored, while the rest are collected.
 +
 +The domain name and device names may use a regular expression, if the name is
 +surrounded by I</.../> and collectd was compiled with support for regexps.
 +
 +The default is to collect statistics for all domains and all their devices.
 +
 +Example:
 +
 + BlockDevice "/:hdb/"
 + IgnoreSelected "true"
 +
 +Ignore all I<hdb> devices on any domain, but other block devices (eg. I<hda>)
 +will be collected.
 +
 +=item B<HostnameFormat> B<name|uuid|hostname|...>
 +
 +When the virt plugin logs data, it sets the hostname of the collected data
 +according to this setting. The default is to use the guest name as provided by
 +the hypervisor, which is equal to setting B<name>.
 +
 +B<uuid> means use the guest's UUID. This is useful if you want to track the
 +same guest across migrations.
 +
 +B<hostname> means to use the global B<Hostname> setting, which is probably not
 +useful on its own because all guests will appear to have the same name.
 +
 +You can also specify combinations of these fields. For example B<name uuid>
 +means to concatenate the guest name and UUID (with a literal colon character
 +between, thus I<"foo:1234-1234-1234-1234">).
 +
 +=item B<InterfaceFormat> B<name>|B<address>
 +
 +When the virt plugin logs interface data, it sets the name of the collected
 +data according to this setting. The default is to use the path as provided by
 +the hypervisor (the "dev" property of the target node), which is equal to
 +setting B<name>.
 +
 +B<address> means use the interface's mac address. This is useful since the
 +interface path might change between reboots of a guest or across migrations.
 +
 +=item B<PluginInstanceFormat> B<name|uuid>
 +
 +When the virt plugin logs data, it sets the plugin_instance of the collected
 +data according to this setting. The default is to use the guest name as provided
 +by the hypervisor, which is equal to setting B<name>.
 +
 +B<uuid> means use the guest's UUID.
 +
 +=back
 +
  =head2 Plugin C<vmem>
  
  The C<vmem> plugin collects information about the usage of virtual memory.
@@@ -6791,9 -6705,8 +6855,9 @@@ want to use authentication all three fi
  
  =head2 Plugin C<write_http>
  
 -This output plugin submits values to an http server by POST them using the
 -PUTVAL plain-text protocol. Each destination you want to post data to needs to
 +This output plugin submits values to an HTTP server using POST requests and
 +encoding metrics with JSON or using the C<PUTVAL> command described in
 +L<collectd-unixsock(5)>. Each destination you want to post data to needs to
  have one B<URL> block, within which the destination can be configured further,
  for example by specifying authentication data.
  
@@@ -6803,7 -6716,6 +6867,7 @@@ Synopsis
     <URL "http://example.com/post-collectd">
       User "collectd"
       Password "weCh3ik0"
 +     Format JSON
     </URL>
   </Plugin>
  
@@@ -6877,16 -6789,8 +6941,16 @@@ Defaults to B<Command>
  =item B<StoreRates> B<true|false>
  
  If set to B<true>, convert counter values to rates. If set to B<false> (the
 -default) counter values are stored as is, i.E<nbsp>e. as an increasing integer
 -number.
 +default) counter values are stored as is, i.e. as an increasing integer number.
 +
 +=item B<BufferSize> I<Bytes>
 +
 +Sets the send buffer size to I<Bytes>. By increasing this buffer, less HTTP
 +requests will be generated, but more metrics will be batched / metrics are
 +cached for longer before being sent, introducing additional delay until they
 +are available on the server side. I<Bytes> must be at least 1024 and cannot
 +exceed the size of an C<int>, i.e. 2E<nbsp>GByte.
 +Defaults to C<4096>.
  
  =back
  
@@@ -6939,7 -6843,7 +7003,7 @@@ If set to B<JSON>, the values are encod
  an easy and straight forward exchange format.
  
  If set to B<Graphite>, values are encoded in the I<Graphite> format, which is
 -"<metric> <value> <timestamp>\n".
 +C<E<lt>metricE<gt> E<lt>valueE<gt> E<lt>timestampE<gt>\n>.
  
  =item B<StoreRates> B<true>|B<false>
  
@@@ -6953,24 -6857,22 +7017,24 @@@ 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.
 -Metric name will be "<prefix><host><postfix><plugin><type><name>"
 +A prefix can be added in the metric name when outputting in the I<Graphite>
 +format. It's 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>>
  
  =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.
 -Metric name will be "<prefix><host><postfix><plugin><type><name>"
 +A postfix can be added in the metric name when outputting in the I<Graphite>
 +format. It's 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>>
  
  =item B<GraphiteEscapeChar> (B<Format>=I<Graphite> only)
  
  Specify a character to replace dots (.) in the host part of the metric name.
  In I<Graphite> metric name, dots are used as separators between different
  metric parts (host, plugin, type).
 -Default is "_" (I<Underscore>).
 +Default is C<_> (I<Underscore>).
  
  =item B<GraphiteSeparateInstances> B<false>|B<true>
  
@@@ -7044,20 -6946,6 +7108,20 @@@ Service name or port number to connect 
  Specify the protocol to use when communicating with I<Riemann>. Defaults to
  B<UDP>.
  
 +=item B<Batch> B<true>|B<false>
 +
 +If set to B<true> and B<Protocol> is set to B<TCP>,
 +events will be batched in memory and flushed at
 +regular intervals or when B<BatchMaxSize> is exceeded.
 +
 +Notifications are not batched and sent as soon as possible.
 +
 +Defaults to false
 +
 +=item B<BatchMaxSize> I<size>
 +
 +Maximum payload size for a riemann packet. Defaults to 8192
 +
  =item B<StoreRates> B<true>|B<false>
  
  If set to B<true> (the default), convert counter values to rates. If set to