Merge branch 'collectd-5.6' into collectd-5.7
authorFlorian Forster <octo@collectd.org>
Fri, 12 May 2017 09:16:43 +0000 (11:16 +0200)
committerFlorian Forster <octo@collectd.org>
Fri, 12 May 2017 09:16:43 +0000 (11:16 +0200)
1  2 
configure.ac
src/bind.c
src/collectd.conf.pod

diff --combined configure.ac
@@@ -214,54 -214,7 +214,54 @@@ AC_HEADER_SYS_WAI
  AC_HEADER_DIRENT
  AC_HEADER_STDBOOL
  
 -AC_CHECK_HEADERS(stdio.h errno.h math.h stdarg.h syslog.h fcntl.h signal.h assert.h sys/types.h sys/socket.h sys/select.h poll.h netdb.h arpa/inet.h sys/resource.h sys/param.h kstat.h regex.h sys/ioctl.h endian.h sys/isa_defs.h fnmatch.h libgen.h)
 +AC_CHECK_HEADERS([ \
 +  arpa/inet.h \
 +  assert.h \
 +  ctype.h \
 +  endian.h \
 +  errno.h \
 +  fcntl.h \
 +  fnmatch.h \
 +  fs_info.h \
 +  fshelp.h \
 +  grp.h \
 +  kstat.h \
 +  kvm.h \
 +  libgen.h \
 +  limits.h \
 +  locale.h \
 +  math.h \
 +  mntent.h \
 +  mnttab.h \
 +  netdb.h \
 +  paths.h \
 +  poll.h \
 +  pthread_np.h \
 +  pwd.h \
 +  regex.h \
 +  signal.h \
 +  stdarg.h \
 +  stdio.h \
 +  sys/fs_types.h \
 +  sys/fstyp.h \
 +  sys/ioctl.h \
 +  sys/isa_defs.h \
 +  sys/mntent.h \
 +  sys/mnttab.h \
 +  sys/param.h \
 +  sys/resource.h \
 +  sys/select.h \
 +  sys/socket.h \
 +  sys/statfs.h \
 +  sys/statvfs.h \
 +  sys/types.h \
 +  sys/un.h \
 +  sys/vfs.h \
 +  sys/vfstab.h \
 +  sys/vmmeter.h \
 +  syslog.h \
 +  wordexp.h \
 +])
  
  # For entropy plugin on newer NetBSD
  AC_CHECK_HEADERS(sys/rndio.h, [], [],
@@@ -705,6 -658,31 +705,6 @@@ AC_CHECK_HEADERS(linux/un.h, [], []
  #endif
  ])
  
 -AC_CHECK_HEADERS([ \
 -  ctype.h \
 -  fs_info.h \
 -  fshelp.h \
 -  grp.h \
 -  kvm.h \
 -  limits.h \
 -  locale.h \
 -  mntent.h \
 -  mnttab.h \
 -  paths.h \
 -  pwd.h \
 -  sys/fs_types.h \
 -  sys/fstyp.h \
 -  sys/mntent.h \
 -  sys/mnttab.h \
 -  sys/statfs.h \
 -  sys/statvfs.h \
 -  sys/un.h \
 -  sys/vfs.h \
 -  sys/vfstab.h \
 -  sys/vmmeter.h \
 -  wordexp.h \
 -])
 -
  # --enable-xfs {{{
  AC_ARG_ENABLE([xfs],
    [AS_HELP_STRING([--enable-xfs], [xfs support in df plugin @<:@default=yes@:>@])],
  fi
  # }}} Check for strptime
  
+ # Check for timegm {{{
+ # These checks need -Werror because implicit function declarations are only a
+ # warning ...
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror"
+ AC_CACHE_CHECK([for timegm],
+   [c_cv_have_timegm],
+   AC_LINK_IFELSE(
+     [AC_LANG_PROGRAM(
+ [[[
+ #if STRPTIME_NEEDS_STANDARDS
+ # ifndef _ISOC99_SOURCE
+ #  define _ISOC99_SOURCE 1
+ # endif
+ # ifndef _POSIX_C_SOURCE
+ #  define _POSIX_C_SOURCE 200112L
+ # endif
+ # ifndef _XOPEN_SOURCE
+ #  define _XOPEN_SOURCE 500
+ # endif
+ #endif
+ #include <time.h>
+ ]]],
+ [[[
+  time_t t = timegm(&(struct tm){0});
+  if (t == ((time_t) -1)) {
+    return 1;
+  }
+ ]]]
+     )],
+     [c_cv_have_timegm="yes"],
+     [c_cv_have_timegm="no"]
+   )
+ )
+ if test "x$c_cv_have_timegm" != "xyes"
+ then
+   AC_CACHE_CHECK([for timegm with _BSD_SOURCE],
+     [c_cv_have_timegm_bsd],
+     AC_LINK_IFELSE(
+       [AC_LANG_PROGRAM(
+ [[[
+ #if STRPTIME_NEEDS_STANDARDS
+ # ifndef _ISOC99_SOURCE
+ #  define _ISOC99_SOURCE 1
+ # endif
+ # ifndef _POSIX_C_SOURCE
+ #  define _POSIX_C_SOURCE 200112L
+ # endif
+ # ifndef _XOPEN_SOURCE
+ #  define _XOPEN_SOURCE 500
+ # endif
+ #endif
+ #ifndef _BSD_SOURCE
+ # define _BSD_SOURCE 1
+ #endif
+ #include <time.h>
+ ]]],
+ [[[
+  time_t t = timegm(&(struct tm){0});
+  if (t == ((time_t) -1)) {
+    return 1;
+  }
+ ]]]
+       )],
+       [c_cv_have_timegm_bsd="yes"
+        c_cv_have_timegm="yes"],
+       [c_cv_have_timegm_bsd="no"]
+     )
+   )
+ fi
+ if test "x$c_cv_have_timegm" = "xyes"
+ then
+   AC_DEFINE(HAVE_TIMEGM, 1, [Define if the timegm(3) function is available.])
+   if test "x$c_cv_have_timegm_bsd" = "xyes"
+   then
+     AC_DEFINE(TIMEGM_NEEDS_BSD, 1, [Set to true if timegm is only exported in BSD mode.])
+   fi
+ fi
+ CFLAGS="$SAVE_CFLAGS"
+ # }}} Check for timegm
  AC_CHECK_FUNCS(swapctl, [have_swapctl="yes"], [have_swapctl="no"])
  if test "x$have_swapctl" = "xyes"; then
          AC_CACHE_CHECK([whether swapctl takes two arguments],
@@@ -1690,45 -1754,6 +1776,45 @@@ AC_CHECK_MEMBERS([kstat_io_t.nwritten, 
  #endif
        ])
  
 +# check for pthread_setname_np
 +SAVE_LDFLAGS="$LDFLAGS"
 +LDFLAGS="$LDFLAGS -lpthread"
 +
 +AC_MSG_CHECKING([for pthread_setname_np])
 +      have_pthread_setname_np="no"
 +      AC_LINK_IFELSE([AC_LANG_PROGRAM(
 +[[
 +#define _GNU_SOURCE
 +#include <pthread.h>
 +]],
 +[[
 +        pthread_setname_np((pthread_t) {0}, "conftest");
 +]]
 +      )], [
 +              have_pthread_setname_np="yes"
 +              AC_DEFINE(HAVE_PTHREAD_SETNAME_NP, 1, [pthread_setname_np() is available.])
 +      ])
 +
 +AC_MSG_RESULT([$have_pthread_setname_np])
 +
 +# check for pthread_set_name_np(3) (FreeBSD)
 +AC_MSG_CHECKING([for pthread_set_name_np])
 +      have_pthread_set_name_np="no"
 +      AC_LINK_IFELSE([AC_LANG_PROGRAM(
 +[[
 +#include <pthread_np.h>
 +]],
 +[[
 +        pthread_set_name_np((pthread_t) {0}, "conftest");
 +]]
 +      )], [
 +              have_pthread_set_name_np="yes"
 +              AC_DEFINE(HAVE_PTHREAD_SET_NAME_NP, 1, [pthread_set_name_np() is available.])
 +      ])
 +AC_MSG_RESULT([$have_pthread_set_name_np])
 +
 +LDFLAGS="$SAVE_LDFLAGS"
 +
  #
  # Checks for libraries begin here
  #
  fi
  # }}}
  
 +# --with-libdpdk {{{
 +AC_ARG_VAR([LIBDPDK_CPPFLAGS], [Preprocessor flags for libdpdk])
 +AC_ARG_VAR([LIBDPDK_LDFLAGS], [Linker flags for libdpdk])
 +
 +AC_ARG_WITH([libdpdk], [AS_HELP_STRING([--without-libdpdk], [Disable libdpdk.])])
 +
 +if test "x$with_libdpdk" != "xno"
 +then
 +      if test "x$LIBDPDK_CPPFLAGS" = "x"
 +      then
 +              LIBDPDK_CPPFLAGS="-I/usr/include/dpdk"
 +      fi
 +      SAVE_CPPFLAGS="$CPPFLAGS"
 +      CPPFLAGS="$LIBDPDK_CPPFLAGS $CPPFLAGS"
 +      AC_CHECK_HEADERS([rte_config.h],
 +              [with_libdpdk="yes"],
 +              [with_libdpdk="no (rte_config.h not found)"]
 +      )
 +      CPPFLAGS="$SAVE_CPPFLAGS"
 +fi
 +
 +if test "x$with_libdpdk" = "xyes"
 +then
 +      SAVE_LDFLAGS="$LDFLAGS"
 +      LDFLAGS="$LIBDPDK_LDFLAGS $LDFLAGS"
 +      AC_CHECK_LIB([dpdk], [rte_eal_init],
 +              [with_libdpdk="yes"],
 +              [with_libdpdk="no (symbol 'rte_eal_init' not found)"]
 +      )
 +      LDFLAGS="$SAVE_LDFLAGS"
 +fi
 +
 +# }}}
 +
  # --with-java {{{
  with_java_home="$JAVA_HOME"
  if test "x$with_java_home" = "x"
  AM_CONDITIONAL(BUILD_WITH_LIBMEMCACHED, test "x$with_libmemcached" = "xyes")
  # }}}
  
 +# --with-libmicrohttpd {{{
 +with_libmicrohttpd_cppflags=""
 +with_libmicrohttpd_ldflags=""
 +AC_ARG_WITH([libmicrohttpd], [AS_HELP_STRING([--with-libmicrohttpd@<:@=PREFIX@:>@], [Path to libmicrohttpd.])],
 +  [
 +    if test "x$withval" != "xno" && test "x$withval" != "xyes"
 +    then
 +      with_libmicrohttpd_cppflags="-I$withval/include"
 +      with_libmicrohttpd_ldflags="-L$withval/lib"
 +      with_libmicrohttpd="yes"
 +    fi
 +    if test "x$withval" = "xno"
 +    then
 +      with_libmicrohttpd="no (disabled on command line)"
 +    fi
 +  ],
 +  [withval="yes"]
 +)
 +if test "x$withval" = "xyes"
 +then
 +PKG_CHECK_MODULES([MICROHTTPD], [libmicrohttpd],
 +  [with_libmicrohttpd="yes"],
 +  [with_libmicrohttpd="no (pkg-config could not find libmicrohttpd)"]
 +)
 +fi
 +
 +if test "x$MICROHTTPD_LIBS" = "x"
 +then
 +  MICROHTTPD_LIBS="-lmicrohttpd"
 +fi
 +
 +SAVE_CPPFLAGS="$CPPFLAGS"
 +SAVE_LDFLAGS="$LDFLAGS"
 +SAVE_LIBS="$LIBS"
 +CPPFLAGS="$with_libmicrohttpd_cppflags $MICROHTTPD_CFLAGS"
 +LDFLAGS="$with_libmicrohttpd_ldflags $LDFLAGS"
 +LIBS="$LIBS $MICROHTTPD_LIBS"
 +
 +if test "x$with_libmicrohttpd" = "xyes"
 +then
 +  AC_CHECK_HEADERS([microhttpd.h],
 +                   [with_libmicrohttpd="yes"],
 +                   [with_libmicrohttpd="no (<microhttpd.h> not found)"])
 +fi
 +
 +if test "x$with_libmicrohttpd" = "xyes"
 +then
 +  AC_CHECK_LIB([microhttpd], [MHD_start_daemon],
 +               [with_libmicrohttpd="yes"],
 +               [with_libmicrohttpd="no (libmicrohttpd not found)"])
 +fi
 +
 +CPPFLAGS="$SAVE_CPPFLAGS"
 +LDFLAGS="$SAVE_LDFLAGS"
 +LIBS="$SAVE_LIBS"
 +
 +BUILD_WITH_LIBMICROHTTPD_CPPFLAGS="$with_libmicrohttpd_cppflags $MICROHTTPD_CFLAGS"
 +BUILD_WITH_LIBMICROHTTPD_LDFLAGS="$with_libmicrohttpd_ldflags"
 +BUILD_WITH_LIBMICROHTTPD_LIBS="$MICROHTTPD_LIBS"
 +AC_SUBST([BUILD_WITH_LIBMICROHTTPD_CPPFLAGS])
 +AC_SUBST([BUILD_WITH_LIBMICROHTTPD_LDFLAGS])
 +AC_SUBST([BUILD_WITH_LIBMICROHTTPD_LIBS])
 +# }}}
 +
  # --with-libmodbus {{{
  with_libmodbus_config=""
  with_libmodbus_cflags=""
  AM_CONDITIONAL(BUILD_WITH_LIBPQ, test "x$with_libpq" = "xyes")
  # }}}
  
 +# --with-libpqos {{{
 +with_libpqos_cppflags=""
 +with_libpqos_ldflags=""
 +AC_ARG_WITH(libpqos, [AS_HELP_STRING([--with-libpqos@<:@=PREFIX@:>@], [Path to libpqos.])],
 +[
 +      if test "x$withval" != "xno" && test "x$withval" != "xyes"
 +      then
 +              with_libpqos_cppflags="-I$withval/include"
 +              with_libpqos_ldflags="-L$withval/lib"
 +              with_libpqos="yes"
 +      else
 +              with_libpqos="$withval"
 +      fi
 +],
 +[
 +      with_libpqos="yes"
 +])
 +if test "x$with_libpqos" = "xyes"
 +then
 +      SAVE_CPPFLAGS="$CPPFLAGS"
 +      CPPFLAGS="$CPPFLAGS $with_libpqos_cppflags"
 +
 +      AC_CHECK_HEADERS(pqos.h, [with_libpqos="yes"], [with_libpqos="no (pqos.h not found)"])
 +
 +      CPPFLAGS="$SAVE_CPPFLAGS"
 +fi
 +if test "x$with_libpqos" = "xyes"
 +then
 +      SAVE_CPPFLAGS="$CPPFLAGS"
 +      SAVE_LDFLAGS="$LDFLAGS"
 +      CPPFLAGS="$CPPFLAGS $with_libpqos_cppflags"
 +      LDFLAGS="$LDFLAGS $with_libpqos_ldflags"
 +
 +      AC_CHECK_LIB(pqos, pqos_init, [with_libpqos="yes"], [with_libpqos="no (Can't find libpqos)"])
 +
 +      CPPFLAGS="$SAVE_CPPFLAGS"
 +      LDFLAGS="$SAVE_LDFLAGS"
 +fi
 +if test "x$with_libpqos" = "xyes"
 +then
 +  SAVE_CPPFLAGS="$CPPFLAGS"
 +  CPPFLAGS="$CPPFLAGS $with_libpqos_cppflags"
 +  AC_RUN_IFELSE([AC_LANG_PROGRAM(
 +    [[#include <pqos.h>]],
 +    [[return !(PQOS_VERSION >= 106)]])],
 +    [with_libpqos="yes"], [with_libpqos="no (pqos library version 1.06 or higher is required)"])
 +  CPPFLAGS="$SAVE_CPPFLAGS"
 +fi
 +if test "x$with_libpqos" = "xyes"
 +then
 +      BUILD_WITH_LIBPQOS_CPPFLAGS="$with_libpqos_cppflags"
 +      BUILD_WITH_LIBPQOS_LDFLAGS="$with_libpqos_ldflags"
 +      BUILD_WITH_LIBPQOS_LIBS="-lpqos"
 +      AC_SUBST(BUILD_WITH_LIBPQOS_CPPFLAGS)
 +      AC_SUBST(BUILD_WITH_LIBPQOS_LDFLAGS)
 +      AC_SUBST(BUILD_WITH_LIBPQOS_LIBS)
 +fi
 +# }}}
 +
  # --with-libprotobuf {{{
  with_libprotobuf_cppflags=""
  with_libprotobuf_ldflags=""
@@@ -5939,15 -5807,12 +6025,15 @@@ plugin_curl_xml="no
  plugin_df="no"
  plugin_disk="no"
  plugin_drbd="no"
 +plugin_dpdkstat="no"
  plugin_entropy="no"
  plugin_ethstat="no"
  plugin_fhcount="no"
  plugin_fscache="no"
  plugin_gps="no"
  plugin_grpc="no"
 +plugin_hugepages="no"
 +plugin_intel_rdt="no"
  plugin_interface="no"
  plugin_ipmi="no"
  plugin_ipvs="no"
@@@ -5977,7 -5842,6 +6063,7 @@@ plugin_virt="no
  plugin_vmem="no"
  plugin_vserver="no"
  plugin_wireless="no"
 +plugin_write_prometheus="no"
  plugin_xencpu="no"
  plugin_zfs_arc="no"
  plugin_zone="no"
@@@ -5997,7 -5861,6 +6083,7 @@@ the
        plugin_entropy="yes"
        plugin_fhcount="yes"
        plugin_fscache="yes"
 +      plugin_hugepages="yes"
        plugin_interface="yes"
        plugin_ipc="yes"
        plugin_irq="yes"
  if test "x$have_protoc_c" = "xyes" && test "x$with_libprotobuf_c" = "xyes"
  then
        plugin_pinba="yes"
 +      if test "x$with_libmicrohttpd" = "xyes"
 +      then
 +              plugin_write_prometheus="yes"
 +      fi
  fi
  
  # Mac OS X memory interface
    plugin_xencpu="yes"
  fi
  
 +if test "x$with_libdpdk" = "xyes"
 +then
 +  plugin_dpdkstat="yes"
 +fi
 +
  m4_divert_once([HELP_ENABLE], [
  collectd plugins:])
  
@@@ -6401,7 -6255,6 +6487,7 @@@ AC_PLUGIN([dbi],                 [$with
  AC_PLUGIN([df],                  [$plugin_df],              [Filesystem usage statistics])
  AC_PLUGIN([disk],                [$plugin_disk],            [Disk usage statistics])
  AC_PLUGIN([dns],                 [$with_libpcap],           [DNS traffic analysis])
 +AC_PLUGIN([dpdkstat],            [$plugin_dpdkstat],        [Stats & Status from DPDK])
  AC_PLUGIN([drbd],                [$plugin_drbd],            [DRBD statistics])
  AC_PLUGIN([email],               [yes],                     [EMail statistics])
  AC_PLUGIN([entropy],             [$plugin_entropy],         [Entropy statistics])
@@@ -6414,8 -6267,6 +6500,8 @@@ AC_PLUGIN([gmond],               [$with
  AC_PLUGIN([gps],                 [$plugin_gps],             [GPS plugin])
  AC_PLUGIN([grpc],                [$plugin_grpc],            [gRPC plugin])
  AC_PLUGIN([hddtemp],             [yes],                     [Query hddtempd])
 +AC_PLUGIN([hugepages],           [$plugin_hugepages],       [Hugepages statistics])
 +AC_PLUGIN([intel_rdt],           [$with_libpqos],           [Intel RDT monitor plugin])
  AC_PLUGIN([interface],           [$plugin_interface],       [Interface traffic statistics])
  AC_PLUGIN([ipc],                 [$plugin_ipc],             [IPC statistics])
  AC_PLUGIN([ipmi],                [$plugin_ipmi],            [IPMI sensor statistics])
@@@ -6513,7 -6364,6 +6599,7 @@@ AC_PLUGIN([write_http],          [$with
  AC_PLUGIN([write_kafka],         [$with_librdkafka],        [Kafka output plugin])
  AC_PLUGIN([write_log],           [yes],                     [Log output plugin])
  AC_PLUGIN([write_mongodb],       [$with_libmongoc],         [MongoDB output plugin])
 +AC_PLUGIN([write_prometheus],    [$plugin_write_prometheus], [Prometheus write plugin])
  AC_PLUGIN([write_redis],         [$with_libhiredis],        [Redis output plugin])
  AC_PLUGIN([write_riemann],       [$with_libriemann_client], [Riemann output plugin])
  AC_PLUGIN([write_sensu],         [yes],                     [Sensu output plugin])
@@@ -6744,7 -6594,6 +6830,7 @@@ AC_MSG_RESULT([    libaquaero5 . . . . 
  AC_MSG_RESULT([    libatasmart . . . . . $with_libatasmart])
  AC_MSG_RESULT([    libcurl . . . . . . . $with_libcurl])
  AC_MSG_RESULT([    libdbi  . . . . . . . $with_libdbi])
 +AC_MSG_RESULT([    libdpdk . . . . . . . $with_libdpdk])
  AC_MSG_RESULT([    libesmtp  . . . . . . $with_libesmtp])
  AC_MSG_RESULT([    libganglia  . . . . . $with_libganglia])
  AC_MSG_RESULT([    libgcrypt . . . . . . $with_libgcrypt])
@@@ -6762,7 -6611,6 +6848,7 @@@ AC_MSG_RESULT([    libldap . . . . . . 
  AC_MSG_RESULT([    liblua  . . . . . . . $with_liblua])
  AC_MSG_RESULT([    liblvm2app  . . . . . $with_liblvm2app])
  AC_MSG_RESULT([    libmemcached  . . . . $with_libmemcached])
 +AC_MSG_RESULT([    libmicrohttpd . . . . $with_libmicrohttpd])
  AC_MSG_RESULT([    libmnl  . . . . . . . $with_libmnl])
  AC_MSG_RESULT([    libmodbus . . . . . . $with_libmodbus])
  AC_MSG_RESULT([    libmongoc . . . . . . $with_libmongoc])
@@@ -6779,7 -6627,6 +6865,7 @@@ AC_MSG_RESULT([    libpcap . . . . . . 
  AC_MSG_RESULT([    libperfstat . . . . . $with_perfstat])
  AC_MSG_RESULT([    libperl . . . . . . . $with_libperl])
  AC_MSG_RESULT([    libpq . . . . . . . . $with_libpq])
 +AC_MSG_RESULT([    libpqos . . . . . . . $with_libpqos])
  AC_MSG_RESULT([    libprotobuf . . . . . $with_libprotobuf])
  AC_MSG_RESULT([    libprotobuf-c . . . . $with_libprotobuf_c])
  AC_MSG_RESULT([    libpython . . . . . . $with_libpython])
@@@ -6838,7 -6685,6 +6924,7 @@@ AC_MSG_RESULT([    dbi . . . . . . . . 
  AC_MSG_RESULT([    df  . . . . . . . . . $enable_df])
  AC_MSG_RESULT([    disk  . . . . . . . . $enable_disk])
  AC_MSG_RESULT([    dns . . . . . . . . . $enable_dns])
 +AC_MSG_RESULT([    dpdkstat  . . . . . . $enable_dpdkstat])
  AC_MSG_RESULT([    drbd  . . . . . . . . $enable_drbd])
  AC_MSG_RESULT([    email . . . . . . . . $enable_email])
  AC_MSG_RESULT([    entropy . . . . . . . $enable_entropy])
@@@ -6851,8 -6697,6 +6937,8 @@@ AC_MSG_RESULT([    gmond . . . . . . . 
  AC_MSG_RESULT([    gps . . . . . . . . . $enable_gps])
  AC_MSG_RESULT([    grpc  . . . . . . . . $enable_grpc])
  AC_MSG_RESULT([    hddtemp . . . . . . . $enable_hddtemp])
 +AC_MSG_RESULT([    hugepages . . . . . . $enable_hugepages])
 +AC_MSG_RESULT([    intel_rdt. . . . .  . $enable_intel_rdt])
  AC_MSG_RESULT([    interface . . . . . . $enable_interface])
  AC_MSG_RESULT([    ipc . . . . . . . . . $enable_ipc])
  AC_MSG_RESULT([    ipmi  . . . . . . . . $enable_ipmi])
@@@ -6949,7 -6793,6 +7035,7 @@@ AC_MSG_RESULT([    write_http  . . . . 
  AC_MSG_RESULT([    write_kafka . . . . . $enable_write_kafka])
  AC_MSG_RESULT([    write_log . . . . . . $enable_write_log])
  AC_MSG_RESULT([    write_mongodb . . . . $enable_write_mongodb])
 +AC_MSG_RESULT([    write_prometheus. . . $enable_write_prometheus])
  AC_MSG_RESULT([    write_redis . . . . . $enable_write_redis])
  AC_MSG_RESULT([    write_riemann . . . . $enable_write_riemann])
  AC_MSG_RESULT([    write_sensu . . . . . $enable_write_sensu])
diff --combined src/bind.c
  #endif
  #endif /* STRPTIME_NEEDS_STANDARDS */
  
+ #if TIMEGM_NEEDS_BSD
+ #ifndef _BSD_SOURCE
+ #define _BSD_SOURCE 1
+ #endif
+ #endif /* TIMEGM_NEEDS_BSD */
  #include "collectd.h"
  
  #include "common.h"
  #include "plugin.h"
  
+ #include <time.h>
  /* Some versions of libcurl don't include this themselves and then don't have
   * fd_set available. */
  #if HAVE_SYS_SELECT_H
@@@ -130,7 -138,7 +138,7 @@@ static const translation_info_t nsstats
          {"ReqBadSIG", "dns_request", "BadSIG"},
          {"ReqTCP", "dns_request", "TCP"},
          /* Rejects */
 -        {"AuthQryRej", "dns_reject", "authorative"},
 +        {"AuthQryRej", "dns_reject", "authoritative"},
          {"RecQryRej", "dns_reject", "recursive"},
          {"XfrRej", "dns_reject", "transfer"},
          {"UpdateRej", "dns_reject", "update"},
          {"RespTSIG", "dns_response", "TSIG"},
          {"RespSIG0", "dns_response", "SIG0"},
          /* Queries */
 -        {"QryAuthAns", "dns_query", "authorative"},
 +        {"QryAuthAns", "dns_query", "authoritative"},
          {"QryNoauthAns", "dns_query", "nonauth"},
          {"QryReferral", "dns_query", "referral"},
          {"QryRecursion", "dns_query", "recursion"},
 -        {"QryDuplicate", "dns_query", "dupliate"},
 +        {"QryDuplicate", "dns_query", "duplicate"},
          {"QryDropped", "dns_query", "dropped"},
          {"QryFailure", "dns_query", "failure"},
          /* Response codes */
          {"QryFORMERR", "dns_rcode", "tx-FORMERR"},
          {"QryNXDOMAIN", "dns_rcode", "tx-NXDOMAIN"}
  #if 0
 -  { "XfrReqDone",      "type", "type_instance"       },
 -  { "UpdateReqFwd",    "type", "type_instance"       },
 -  { "UpdateRespFwd",   "type", "type_instance"       },
 -  { "UpdateFwdFail",   "type", "type_instance"       },
 -  { "UpdateDone",      "type", "type_instance"       },
 -  { "UpdateFail",      "type", "type_instance"       },
 -  { "UpdateBadPrereq", "type", "type_instance"       },
 +  { "XfrReqDone",      "type",         "type_instance" },
 +  { "UpdateReqFwd",    "type",         "type_instance" },
 +  { "UpdateRespFwd",   "type",         "type_instance" },
 +  { "UpdateFwdFail",   "type",         "type_instance" },
 +  { "UpdateDone",      "type",         "type_instance" },
 +  { "UpdateFail",      "type",         "type_instance" },
 +  { "UpdateBadPrereq", "type",         "type_instance" },
  #endif
  };
  static int nsstats_translation_table_length =
@@@ -238,12 -246,16 +246,12 @@@ static int memsummary_translation_table
  
  static void submit(time_t ts, const char *plugin_instance, /* {{{ */
                     const char *type, const char *type_instance, value_t value) {
 -  value_t values[1];
    value_list_t vl = VALUE_LIST_INIT;
  
 -  values[0] = value;
 -
 -  vl.values = values;
 +  vl.values = &value;
    vl.values_len = 1;
    if (config_parse_time)
      vl.time = TIME_T_TO_CDTIME_T(ts);
 -  sstrncpy(vl.host, hostname_g, sizeof(vl.host));
    sstrncpy(vl.plugin, "bind", sizeof(vl.plugin));
    if (plugin_instance) {
      sstrncpy(vl.plugin_instance, plugin_instance, sizeof(vl.plugin_instance));
@@@ -429,7 -441,28 +437,28 @@@ static int bind_xml_read_timestamp(cons
      return (-1);
    }
  
-   *ret_value = mktime(&tm);
+ #if HAVE_TIMEGM
+   time_t t = timegm(&tm);
+   if (t == ((time_t)-1)) {
+     char errbuf[1024];
+     ERROR("bind plugin: timegm() failed: %s",
+           sstrerror(errno, errbuf, sizeof(errbuf)));
+     return (-1);
+   }
+   *ret_value = t;
+ #else
+   time_t t = mktime(&tm);
+   if (t == ((time_t)-1)) {
+     char errbuf[1024];
+     ERROR("bind plugin: mktime() failed: %s",
+           sstrerror(errno, errbuf, sizeof(errbuf)));
+     return (-1);
+   }
+   /* mktime assumes that tm is local time. Luckily, it also sets timezone to
+    * the offset used for the conversion, and we undo the conversion to convert
+    * back to UTC. */
+   *ret_value = t - timezone;
+ #endif
  
    xmlXPathFreeObject(xpathObj);
    return (0);
diff --combined src/collectd.conf.pod
@@@ -338,7 -338,7 +338,7 @@@ is enabled by default
  =item B<PostCacheChain> I<ChainName>
  
  Configure the name of the "pre-cache chain" and the "post-cache chain". Please
- see L<FILTER CONFIGURATION> below on information on chains and how these
+ see L</"FILTER CONFIGURATION"> below on information on chains and how these
  setting change the daemon's behavior.
  
  =back
@@@ -555,7 -555,6 +555,7 @@@ B<Synopsis:
   #   GraphiteEscapeChar "_"
   #   GraphiteSeparateInstances false
   #   GraphiteAlwaysAppendDS false
 + #   GraphitePreserveSeparator false
     </Publish>
  
     # Receive values from an AMQP broker
@@@ -730,12 -729,6 +730,12 @@@ If set to B<true>, append the name of t
  identifier. If set to B<false> (the default), this is only done when there is
  more than one DS.
  
 +=item B<GraphitePreserveSeparator> B<false>|B<true>
 +
 +If set to B<false> (the default) the C<.> (dot) character is replaced with
 +I<GraphiteEscapeChar>. Otherwise, if set to B<true>, the C<.> (dot) character
 +is preserved, i.e. passed through.
 +
  =back
  
  =head2 Plugin C<apache>
@@@ -1121,13 -1114,6 +1121,13 @@@ When set to B<true>, the battery plugi
  and "remaining capacity") and B<degraded> (difference between "design capacity"
  and "last full capacity").
  
 +=item B<QueryStateFS> B<false>|B<true>
 +
 +When set to B<true>, the battery plugin will only read statistics
 +related to battery performance as exposed by StateFS at
 +/run/state. StateFS is used in Mer-based Sailfish OS, for
 +example.
 +
  =back
  
  =head2 Plugin C<bind>
@@@ -1372,6 -1358,8 +1372,8 @@@ Select I<cgroup> based on the name. Whe
  collected or if they are ignored is controlled by the B<IgnoreSelected> option;
  see below.
  
+ See F</"IGNORELISTS"> for details.
  =item B<IgnoreSelected> B<true>|B<false>
  
  Invert the selection: If set to true, all cgroups I<except> the ones that
@@@ -2268,14 -2256,20 +2270,20 @@@ values. Defaults to the global hostnam
  
  Select partitions based on the devicename.
  
+ See F</"IGNORELISTS"> for details.
  =item B<MountPoint> I<Directory>
  
  Select partitions based on the mountpoint.
  
+ See F</"IGNORELISTS"> for details.
  =item B<FSType> I<FSType>
  
  Select partitions based on the filesystem type.
  
+ See F</"IGNORELISTS"> for details.
  =item B<IgnoreSelected> B<true>|B<false>
  
  Invert the selection: If set to true, all partitions B<except> the ones that
@@@ -2337,6 -2331,8 +2345,8 @@@ is interpreted as a regular expression
    Disk "sdd"
    Disk "/hda[34]/"
  
+ See F</"IGNORELISTS"> for details.
  =item B<IgnoreSelected> B<true>|B<false>
  
  Sets whether selected disks, i.E<nbsp>e. the ones matches by any of the B<Disk>
@@@ -2383,67 -2379,6 +2393,67 @@@ Enabled by default, collects unknown (a
  
  =back
  
 +=head2 Plugin C<dpdkstat>
 +
 +The I<dpdkstat plugin> collects information about DPDK interfaces using the
 +extended NIC stats API in DPDK.
 +
 +B<Synopsis:>
 +
 + <Plugin "dpdkstat">
 +    Coremask "0x4"
 +    MemoryChannels "4"
 +    ProcessType "secondary"
 +    FilePrefix "rte"
 +    EnabledPortMask 0xffff
 +    PortName "interface1"
 +    PortName "interface2"
 + </Plugin>
 +
 +B<Options:>
 +
 +=over 4
 +
 +=item B<Coremask> I<Mask>
 +
 +A string containing an hexadecimal bit mask of the cores to run on. Note that
 +core numbering can change between platforms and should be determined beforehand.
 +
 +=item B<Memorychannels> I<Channels>
 +
 +A string containing a number of memory channels per processor socket.
 +
 +=item B<ProcessType> I<type>
 +
 +A string containing the type of DPDK process instance.
 +
 +=item B<FilePrefix> I<File>
 +
 +The prefix text used for hugepage filenames. The filename will be set to
 +/var/run/.<prefix>_config where prefix is what is passed in by the user.
 +
 +=item B<SocketMemory> I<MB>
 +
 +A string containing amount of Memory to allocate from hugepages on specific
 +sockets in MB
 +
 +=item B<EnabledPortMask> I<Mask>
 +
 +A hexidecimal bit mask of the DPDK ports which should be enabled. A mask
 +of 0x0 means that all ports will be disabled. A bitmask of all Fs means
 +that all ports will be enabled. This is an optional argument - default
 +is all ports enabled.
 +
 +=item B<PortName> I<Name>
 +
 +A string containing an optional name for the enabled DPDK ports. Each PortName
 +option should contain only one port name; specify as many PortName options as
 +desired. Default naming convention will be used if PortName is blank. If there
 +are less PortName options than there are enabled ports, the default naming
 +convention will be used for the additional ports.
 +
 +=back
 +
  =head2 Plugin C<email>
  
  =over 4
@@@ -2894,101 -2829,6 +2904,101 @@@ TCP-Port to connect to. Defaults to B<7
  
  =back
  
 +=head2 Plugin C<hugepages>
 +
 +To collect B<hugepages> information, collectd reads directories
 +"/sys/devices/system/node/*/hugepages" and
 +"/sys/kernel/mm/hugepages".
 +Reading of these directories can be disabled by the following
 +options (default is enabled).
 +
 +=over 4
 +
 +=item B<ReportPerNodeHP> B<true>|B<false>
 +
 +If enabled, information will be collected from the hugepage
 +counters in "/sys/devices/system/node/*/hugepages".
 +This is used to check the per-node hugepage statistics on
 +a NUMA system.
 +
 +=item B<ReportRootHP> B<true>|B<false>
 +
 +If enabled, information will be collected from the hugepage
 +counters in "/sys/kernel/mm/hugepages".
 +This can be used on both NUMA and non-NUMA systems to check
 +the overall hugepage statistics.
 +
 +=item B<ValuesPages> B<true>|B<false>
 +
 +Whether to report hugepages metrics in number of pages.
 +Defaults to B<true>.
 +
 +=item B<ValuesBytes> B<false>|B<true>
 +
 +Whether to report hugepages metrics in bytes.
 +Defaults to B<false>.
 +
 +=item B<ValuesPercentage> B<false>|B<true>
 +
 +Whether to report hugepages metrics as percentage.
 +Defaults to B<false>.
 +
 +=back
 +
 +=head2 Plugin C<intel_rdt>
 +
 +The I<intel_rdt> plugin collects information provided by monitoring features of
 +Intel Resource Director Technology (Intel(R) RDT) like Cache Monitoring
 +Technology (CMT), Memory Bandwidth Monitoring (MBM). These features provide
 +information about utilization of shared resources. CMT monitors last level cache
 +occupancy (LLC). MBM supports two types of events reporting local and remote
 +memory bandwidth. Local memory bandwidth (MBL) reports the bandwidth of
 +accessing memory associated with the local socket. Remote memory bandwidth (MBR)
 +reports the bandwidth of accessing the remote socket. Also this technology
 +allows to monitor instructions per clock (IPC).
 +Monitor events are hardware dependant. Monitoring capabilities are detected on
 +plugin initialization and only supported events are monitored.
 +
 +B<Synopsis:>
 +
 +  <Plugin "intel_rdt">
 +    Cores "0-2" "3,4,6" "8-10,15"
 +  </Plugin>
 +
 +B<Options:>
 +
 +=over 4
 +
 +=item B<Interval> I<seconds>
 +
 +The interval within which to retrieve statistics on monitored events in seconds.
 +For milliseconds divide the time by 1000 for example if the desired interval
 +is 50ms, set interval to 0.05. Due to limited capacity of counters it is not
 +recommended to set interval higher than 1 sec.
 +
 +=item B<Cores> I<cores groups>
 +
 +All events are reported on a per core basis. Monitoring of the events can be
 +configured for group of cores (aggregated statistics). This field defines groups
 +of cores on which to monitor supported events. The field is represented as list
 +of strings with core group values. Each string represents a list of cores in a
 +group. Allowed formats are:
 +    0,1,2,3
 +    0-10,20-18
 +    1,3,5-8,10,0x10-12
 +
 +If an empty string is provided as value for this field default cores
 +configuration is applied - a separate group is created for each core.
 +
 +=back
 +
 +B<Note:> By default global interval is used to retrieve statistics on monitored
 +events. To configure a plugin specific interval use B<Interval> option of the
 +intel_rdt <LoadPlugin> block. For milliseconds divide the time by 1000 for
 +example if the desired interval is 50ms, set interval to 0.05.
 +Due to limited capacity of counters it is not recommended to set interval higher
 +than 1 sec.
 +
  =head2 Plugin C<interface>
  
  =over 4
  Select this interface. By default these interfaces will then be collected. For
  a more detailed description see B<IgnoreSelected> below.
  
+ See F</"IGNORELISTS"> for details.
  =item B<IgnoreSelected> I<true>|I<false>
  
  If no configuration if given, the B<interface>-plugin will collect data from
@@@ -3059,6 -2901,8 +3071,8 @@@ This option is only available on Solari
  
  Selects sensors to collect or to ignore, depending on B<IgnoreSelected>.
  
+ See F</"IGNORELISTS"> for details.
  =item B<IgnoreSelected> I<true>|I<false>
  
  If no configuration if given, the B<ipmi> plugin will collect data from all
@@@ -3115,6 -2959,8 +3129,8 @@@ comment or the number
  Select this irq. By default these irqs will then be collected. For a more
  detailed description see B<IgnoreSelected> below.
  
+ See F</"IGNORELISTS"> for details.
  =item B<IgnoreSelected> I<true>|I<false>
  
  If no configuration if given, the B<irq>-plugin will collect data from all
@@@ -3338,6 -3184,8 +3354,8 @@@ Select md devices based on device name
  the device, i.e. the name of the block device without the leading C</dev/>.
  See B<IgnoreSelected> for more details.
  
+ See F</"IGNORELISTS"> for details.
  =item B<IgnoreSelected> B<true>|B<false>
  
  Invert device selection: If set to B<true>, all md devices B<except> those
@@@ -3402,12 -3250,11 +3420,12 @@@ interpreted. For a description of matc
  
  The B<memcached plugin> connects to a memcached server and queries statistics
  about cache utilization, memory and bandwidth used.
 -L<http://www.danga.com/memcached/>
 +L<http://memcached.org/>
  
   <Plugin "memcached">
     <Instance "name">
 -     Host "memcache.example.com"
 +     #Host "memcache.example.com"
 +     Address "127.0.0.1"
       Port 11211
     </Instance>
   </Plugin>
@@@ -3420,25 -3267,16 +3438,25 @@@ following options are allowed
  
  =item B<Host> I<Hostname>
  
 -Hostname to connect to. Defaults to B<127.0.0.1>.
 +Sets the B<host> field of dispatched values. Defaults to the global hostname
 +setting.
 +For backwards compatibility, values are also dispatched with the global
 +hostname when B<Host> is set to B<127.0.0.1> or B<localhost> and B<Address> is
 +not set.
 +
 +=item B<Address> I<Address>
 +
 +Hostname or IP to connect to. For backwards compatibility, defaults to the
 +value of B<Host> or B<127.0.0.1> if B<Host> is unset.
  
  =item B<Port> I<Port>
  
 -TCP-Port to connect to. Defaults to B<11211>.
 +TCP port to connect to. Defaults to B<11211>.
  
  =item B<Socket> I<Path>
  
  Connect to I<memcached> using the UNIX domain socket at I<Path>. If this
 -setting is given, the B<Host> and B<Port> settings are ignored.
 +setting is given, the B<Address> and B<Port> settings are ignored.
  
  =back
  
@@@ -4501,6 -4339,8 +4519,8 @@@ regular and exact matching are case sen
  If no volume was specified at all for either of the three options, that data
  will be collected for all available volumes.
  
+ See F</"IGNORELISTS"> for details.
  =item B<IgnoreSelectedIO> B<true>|B<false>
  
  =item B<IgnoreSelectedOps> B<true>|B<false>
@@@ -4686,6 -4526,8 +4706,8 @@@ Here are some examples to help you unde
      Filter "ppp0" "u32-1:0"
    </Plugin>
  
+ See F</"IGNORELISTS"> for details.
  =item B<IgnoreSelected>
  
  The behavior is the same as with all other similar plugins: If nothing is
@@@ -5208,6 -5050,8 +5230,8 @@@ C</10.F10FCA000800/temperature>). B<Ign
  As there can be multiple devices on the bus you can list multiple sensor (use
  multiple B<Sensor> elements).
  
+ See F</"IGNORELISTS"> for details.
  =item B<IgnoreSelected> I<true>|I<false>
  
  If no configuration is given, the B<onewire> plugin will collect data from all
@@@ -5879,7 -5723,7 +5903,7 @@@ values are made available through thos
  
  =item B<$1>
  
 -The timestamp of the queried value as a floating point number.
 +The timestamp of the queried value as an RFC 3339-formatted local time.
  
  =item B<$2>
  
@@@ -6267,6 -6111,8 +6291,8 @@@ Whether only matched values are selecte
  depends on the B<IgnoreSelected>. By default, only matched values are selected.
  If no value is configured at all, all values will be selected.
  
+ See F</"IGNORELISTS"> for details.
  =item B<IgnoreSelected> B<true>|B<false>
  
  If set to B<true>, inverts the selection made by B<Value>, i.E<nbsp>e. all
@@@ -6695,6 -6541,8 +6721,8 @@@ on the B<IgnoreSelected> below. For exa
  I<it8712-isa-0290/voltage-in1>" will cause collectd to gather data for the
  voltage sensor I<in1> of the I<it8712> on the isa bus at the address 0290.
  
+ See F</"IGNORELISTS"> for details.
  =item B<IgnoreSelected> I<true>|I<false>
  
  If no configuration if given, the B<sensors>-plugin will collect data from all
@@@ -6804,6 -6652,8 +6832,8 @@@ is interpreted as a regular expression
    Disk "sdd"
    Disk "/hda[34]/"
  
+ See F</"IGNORELISTS"> for details.
  =item B<IgnoreSelected> B<true>|B<false>
  
  Sets whether selected disks, i.E<nbsp>e. the ones matches by any of the B<Disk>
@@@ -7089,15 -6939,6 +7119,15 @@@ user using (extended) regular expressio
          Type "counter"
          Instance "local_user"
        </Match>
 +      <Match>
 +        Regex "l=([0-9]*\\.[0-9]*)"
 +        <DSType "Distribution">
 +          Percentile 99
 +          Bucket 0 100
 +        </DSType>
 +        Type "latency"
 +        Instance "foo"
 +      </Match>
      </File>
    </Plugin>
  
@@@ -7160,13 -7001,6 +7190,13 @@@ Use the greatest number only
  
  Use the last number found.
  
 +=item B<GaugePersist>
 +
 +Use the last number found. The number is not reset at the end of an interval.
 +It is continously reported until another number is matched. This is intended
 +for cases in which only state changes are reported, for example a thermometer
 +that only reports the temperature when it changes.
 +
  =item B<CounterSet>
  
  =item B<DeriveSet>
@@@ -7196,74 -7030,14 +7226,74 @@@ Increase the internal counter by one. T
  not use the matched subexpression, but simply count the number of matched
  lines. Thus, you may use a regular expression without submatch in this case.
  
 +=item B<Distribution>
 +
 +Type to do calculations based on the distribution of values, primarily
 +calculating percentiles. This is primarily geared towards latency, but can be
 +used for other metrics as well. The range of values tracked with this setting
 +must be in the range (0–2^34) and can be fractional. Please note that neither
 +zero nor 2^34 are inclusive bounds, i.e. zero I<cannot> be handled by a
 +distribution.
 +
 +This option must be used together with the B<Percentile> and/or B<Bucket>
 +options.
 +
 +B<Synopsis:>
 +
 +  <DSType "Distribution">
 +    Percentile 99
 +    Bucket 0 100
 +  </DSType>
 +
 +=over 4
 +
 +=item B<Percentile> I<Percent>
 +
 +Calculate and dispatch the configured percentile, i.e. compute the value, so
 +that I<Percent> of all matched values are smaller than or equal to the computed
 +latency.
 +
 +Metrics are reported with the I<type> B<Type> (the value of the above option)
 +and the I<type instance> C<[E<lt>InstanceE<gt>-]E<lt>PercentE<gt>>.
 +
 +This option may be repeated to calculate more than one percentile.
 +
 +=item B<Bucket> I<lower_bound> I<upper_bound>
 +
 +Export the number of values (a C<DERIVE>) falling within the given range. Both,
 +I<lower_bound> and I<upper_bound> may be a fractional number, such as B<0.5>.
 +Each B<Bucket> option specifies an interval C<(I<lower_bound>,
 +I<upper_bound>]>, i.e. the range I<excludes> the lower bound and I<includes>
 +the upper bound. I<lower_bound> and I<upper_bound> may be zero, meaning no
 +lower/upper bound.
 +
 +To export the entire (0–inf) range without overlap, use the upper bound of the
 +previous range as the lower bound of the following range. In other words, use
 +the following schema:
 +
 +  Bucket   0   1
 +  Bucket   1   2
 +  Bucket   2   5
 +  Bucket   5  10
 +  Bucket  10  20
 +  Bucket  20  50
 +  Bucket  50   0
 +
 +Metrics are reported with the I<type> C<bucket> and the I<type instance>
 +C<E<lt>TypeE<gt>[-E<lt>InstanceE<gt>]-E<lt>lower_boundE<gt>_E<lt>upper_boundE<gt>>.
 +
 +This option may be repeated to calculate more than one rate.
 +
  =back
  
 -As you'd expect the B<Gauge*> types interpret the submatch as a floating point
 -number, using L<strtod(3)>. The B<Counter*> and B<AbsoluteSet> types interpret
 -the submatch as an unsigned integer using L<strtoull(3)>. The B<Derive*> types
 -interpret the submatch as a signed integer using L<strtoll(3)>. B<CounterInc>
 -and B<DeriveInc> do not use the submatch at all and it may be omitted in this
 -case.
 +=back
 +
 +The B<Gauge*> and B<Distribution> types interpret the submatch as a floating
 +point number, using L<strtod(3)>. The B<Counter*> and B<AbsoluteSet> types
 +interpret the submatch as an unsigned integer using L<strtoull(3)>. The
 +B<Derive*> types interpret the submatch as a signed integer using
 +L<strtoll(3)>. B<CounterInc> and B<DeriveInc> do not use the submatch at all
 +and it may be omitted in this case.
  
  =item B<Type> I<Type>
  
@@@ -7491,6 -7265,8 +7521,8 @@@ Selects the name of the thermal device 
  depending on the value of the B<IgnoreSelected> option. This option may be
  used multiple times to specify a list of devices.
  
+ See F</"IGNORELISTS"> for details.
  =item B<IgnoreSelected> I<true>|I<false>
  
  Invert the selection: If set to true, all devices B<except> the ones that
@@@ -7518,7 -7294,7 +7550,7 @@@ couple metrics: number of records, and 
  
  =item B<Host> I<Hostname/IP>
  
 -The hostname or ip which identifies the server.
 +The hostname or IP which identifies the server.
  Default: B<127.0.0.1>
  
  =item B<Port> I<Service/Port>
@@@ -7532,60 -7308,61 +7564,60 @@@ Default: B<1978
  =head2 Plugin C<turbostat>
  
  The I<Turbostat plugin> reads CPU frequency and C-state residency on modern
 -Intel processors by using the new Model Specific Registers.
 +Intel processors by using I<Model Specific Registers>.
  
  =over 4
  
  =item B<CoreCstates> I<Bitmask(Integer)>
  
 -Bitmask of the list of core C states supported by the processor.
 +Bit mask of the list of core C-states supported by the processor.
  This option should only be used if the automated detection fails.
 -Default value extracted from the cpu model and family.
 +Default value extracted from the CPU model and family.
  
  Currently supported C-states (by this plugin): 3, 6, 7
  
 -Example: (1<<3)+(1<<6)+(1<<7) = 392 for all states
 +B<Example:>
 +
 +  All states (3, 6 and 7):
 +  (1<<3) + (1<<6) + (1<<7) = 392
  
  =item B<PackageCstates> I<Bitmask(Integer)>
  
 -Bitmask of the list of pacages C states supported by the processor.
 -This option should only be used if the automated detection fails.
 -Default value extracted from the cpu model and family.
 +Bit mask of the list of packages C-states supported by the processor. This
 +option should only be used if the automated detection fails. Default value
 +extracted from the CPU model and family.
  
  Currently supported C-states (by this plugin): 2, 3, 6, 7, 8, 9, 10
  
 -Example: (1<<2)+(1<<3)+(1<<6)+(1<<7) = 396 for states 2, 3, 6 and 7
 -
 -=item B<SystemManagementInterrupt> I<true>|I<false>
 +B<Example:>
  
 -Boolean enabling the collection of the I/O System-Management Interrupt
 -counter'. This option should only be used if the automated detection
 -fails or if you want to disable this feature.
 +  States 2, 3, 6 and 7:
 +  (1<<2) + (1<<3) + (1<<6) + (1<<7) = 396
  
 -=item B<DigitalTemperatureSensor> I<true>|I<false>
 +=item B<SystemManagementInterrupt> I<true>|I<false>
  
 -Boolean enabling the collection of the temperature of each core.
 -This option should only be used if the automated detectionfails or
 -if you want to disable this feature.
 +Boolean enabling the collection of the I/O System-Management Interrupt counter.
 +This option should only be used if the automated detection fails or if you want
 +to disable this feature.
  
  =item B<DigitalTemperatureSensor> I<true>|I<false>
  
 -Boolean enabling the collection of the temperature of each package.
 -This option should only be used if the automated detectionfails or
 -if you want to disable this feature.
 +Boolean enabling the collection of the temperature of each core. This option
 +should only be used if the automated detection fails or if you want to disable
 +this feature.
  
  =item B<TCCActivationTemp> I<Temperature>
  
 -Thermal Control Circuit Activation Temperature of the installed
 -CPU. This temperature is used when collecting the temperature of
 -cores or packages. This option should only be used if the automated
 -detection fails. Default value extracted from B<MSR_IA32_TEMPERATURE_TARGET>
 +I<Thermal Control Circuit Activation Temperature> of the installed CPU. This
 +temperature is used when collecting the temperature of cores or packages. This
 +option should only be used if the automated detection fails. Default value
 +extracted from B<MSR_IA32_TEMPERATURE_TARGET>.
  
  =item B<RunningAveragePowerLimit> I<Bitmask(Integer)>
  
 -Bitmask of the list of elements to be thermally monitored. This option
 -should only be used if the automated detection fails or if you want to
 -disable some collections. The different bits of this bitmask accepted
 -by this plugin are:
 +Bit mask of the list of elements to be thermally monitored. This option should
 +only be used if the automated detection fails or if you want to disable some
 +collections. The different bits of this bit mask accepted by this plugin are:
  
  =over 4
  
  
  =back
  
 +=item B<LogicalCoreNames> I<true>|I<false>
 +
 +Boolean enabling the use of logical core numbering for per core statistics.
 +When enabled, C<cpuE<lt>nE<gt>> is used as plugin instance, where I<n> is a
 +sequential number assigned by the kernel. Otherwise, C<coreE<lt>nE<gt>> is used
 +where I<n> is the n-th core of the socket, causing name conflicts when there is
 +more than one socket.
 +
  =back
  
  =head2 Plugin C<unixsock>
@@@ -7888,49 -7657,6 +7920,49 @@@ Example
  Ignore all I<hdb> devices on any domain, but other block devices (eg. I<hda>)
  will be collected.
  
 +=item B<BlockDeviceFormat> B<target>|B<source>
 +
 +If I<BlockDeviceFormat> is set to B<target>, the default, then the device name
 +seen by the guest will be used for reporting metrics. 
 +This corresponds to the C<E<lt>targetE<gt>> node in the XML definition of the
 +domain.
 +
 +If I<BlockDeviceFormat> is set to B<source>, then metrics will be reported
 +using the path of the source, e.g. an image file.
 +This corresponds to the C<E<lt>sourceE<gt>> node in the XML definition of the
 +domain.
 +
 +B<Example:>
 +
 +If the domain XML have the following device defined:
 +
 +  <disk type='block' device='disk'>
 +    <driver name='qemu' type='raw' cache='none' io='native' discard='unmap'/>
 +    <source dev='/var/lib/libvirt/images/image1.qcow2'/>
 +    <target dev='sda' bus='scsi'/>
 +    <boot order='2'/>
 +    <address type='drive' controller='0' bus='0' target='0' unit='0'/>
 +  </disk>
 +
 +Setting C<BlockDeviceFormat target> will cause the I<type instance> to be set
 +to C<sda>.
 +Setting C<BlockDeviceFormat source> will cause the I<type instance> to be set
 +to C<var_lib_libvirt_images_image1.qcow2>.
 +
 +=item B<BlockDeviceFormatBasename> B<false>|B<true>
 +
 +The B<BlockDeviceFormatBasename> controls whether the full path or the
 +L<basename(1)> of the source is being used as the I<type instance> when
 +B<BlockDeviceFormat> is set to B<source>. Defaults to B<false>.
 +
 +B<Example:>
 +
 +Assume the device path (source tag) is C</var/lib/libvirt/images/image1.qcow2>.
 +Setting C<BlockDeviceFormatBasename false> will cause the I<type instance> to
 +be set to C<var_lib_libvirt_images_image1.qcow2>.
 +Setting C<BlockDeviceFormatBasename true> will cause the I<type instance> to be
 +set to C<image1.qcow2>.
 +
  =item B<HostnameFormat> B<name|uuid|hostname|...>
  
  When the virt plugin logs data, it sets the hostname of the collected data
@@@ -8097,38 -7823,6 +8129,38 @@@ If set to B<true>, append the name of t
  identifier. If set to B<false> (the default), this is only done when there is
  more than one DS.
  
 +=item B<PreserveSeparator> B<false>|B<true>
 +
 +If set to B<false> (the default) the C<.> (dot) character is replaced with
 +I<EscapeCharacter>. Otherwise, if set to B<true>, the C<.> (dot) character
 +is preserved, i.e. passed through.
 +
 +=item B<DropDuplicateFields> B<false>|B<true>
 +
 +If set to B<true>, detect and remove duplicate components in Graphite metric
 +names. For example, the metric name  C<host.load.load.shortterm> will
 +be shortened to C<host.load.shortterm>.
 +
 +=back
 +
 +=head2 Plugin C<write_log>
 +
 +The C<write_log> plugin writes metrics as INFO log messages.
 +
 +This plugin supports two output formats: I<Graphite> and I<JSON>.
 +
 +Synopsis:
 +
 + <Plugin write_log>
 +   Format Graphite
 + </Plugin>
 +
 +=over 4
 +
 +=item B<Format> I<Format>
 +
 +The output format to use. Can be one of C<Graphite> or C<JSON>.
 +
  =back
  
  =head2 Plugin C<write_tsdb>
@@@ -8237,41 -7931,6 +8269,41 @@@ want to use authentication all three fi
  
  =back
  
 +=head2 Plugin C<write_prometheus>
 +
 +The I<write_prometheus plugin> implements a tiny webserver that can be scraped
 +using I<Prometheus>.
 +
 +B<Options:>
 +
 +=over 4
 +
 +=item B<Port> I<Port>
 +
 +Port the embedded webserver should listen on. Defaults to B<9103>.
 +
 +=item B<StalenessDelta> I<Seconds>
 +
 +Time in seconds after which I<Prometheus> considers a metric "stale" if it
 +hasn't seen any update for it. This value must match the setting in Prometheus.
 +It defaults to B<300> seconds (5 minutes), same as Prometheus.
 +
 +B<Background:>
 +
 +I<Prometheus> has a global setting, C<StalenessDelta>, which controls after
 +which time a metric without updates is considered "stale". This setting
 +effectively puts an upper limit on the interval in which metrics are reported.
 +
 +When the I<write_prometheus plugin> encounters a metric with an interval
 +exceeding this limit, it will inform you, the user, and provide the metric to
 +I<Prometheus> B<without> a timestamp. That causes I<Prometheus> to consider the
 +metric "fresh" each time it is scraped, with the time of the scrape being
 +considered the time of the update. The result is that there appear more
 +datapoints in I<Prometheus> than were actually created, but at least the metric
 +doesn't disappear periodically.
 +
 +=back
 +
  =head2 Plugin C<write_http>
  
  This output plugin submits values to an HTTP server using POST requests and
@@@ -8505,18 -8164,6 +8537,18 @@@ path component, for example C<host.cpu.
  default), the plugin and plugin instance (and likewise the type and type
  instance) are put into one component, for example C<host.cpu-0.cpu-idle>.
  
 +=item B<GraphiteAlwaysAppendDS> B<true>|B<false>
 +
 +If set to B<true>, append the name of the I<Data Source> (DS) to the "metric"
 +identifier. If set to B<false> (the default), this is only done when there is
 +more than one DS.
 +
 +=item B<GraphitePreserveSeparator> B<false>|B<true>
 +
 +If set to B<false> (the default) the C<.> (dot) character is replaced with
 +I<GraphiteEscapeChar>. Otherwise, if set to B<true>, the C<.> (dot) character
 +is preserved, i.e. passed through.
 +
  =item B<StoreRates> B<true>|B<false>
  
  If set to B<true> (the default), convert counter values to rates. If set to
@@@ -9451,8 -9098,6 +9483,8 @@@ Available options
  
  =item B<TypeInstance> I<Regex>
  
 +=item B<MetaData> I<String> I<Regex>
 +
  Match values where the given regular expressions match the various fields of
  the identifier of a value. If multiple regular expressions are given, B<all>
  regexen must match for a value to match.
@@@ -9741,10 -9386,6 +9773,10 @@@ Available options
  
  =item B<TypeInstance> I<Regex> I<Replacement>
  
 +=item B<MetaData> I<String> I<Regex> I<Replacement>
 +
 +=item B<DeleteMetaData> I<String> I<Regex>
 +
  Match the appropriate field with the given regular expression I<Regex>. If the
  regular expression matches, that part that matches is replaced with
  I<Replacement>. If multiple places of the input buffer match a given regular
@@@ -9783,37 -9424,9 +9815,37 @@@ Available options
  
  =item B<MetaData> I<String> I<String>
  
 -Set the appropriate field to the given string. The strings for plugin instance
 -and type instance may be empty, the strings for host and plugin may not be
 -empty. It's currently not possible to set the type of a value this way.
 +Set the appropriate field to the given string. The strings for plugin instance,
 +type instance, and meta data may be empty, the strings for host and plugin may
 +not be empty. It's currently not possible to set the type of a value this way.
 +
 +The following placeholders will be replaced by an appropriate value:
 +
 +=over 4
 +
 +=item B<%{host}>
 +
 +=item B<%{plugin}>
 +
 +=item B<%{plugin_instance}>
 +
 +=item B<%{type}>
 +
 +=item B<%{type_instance}>
 +
 +These placeholders are replaced by the identifier field of the same name.
 +
 +=item B<%{meta:>I<name>B<}>
 +
 +These placeholders are replaced by the meta data value with the given name.
 +
 +=back
 +
 +Please note that these placeholders are B<case sensitive>!
 +
 +=item B<DeleteMetaData> I<String>
 +
 +Delete the named meta data field.
  
  =back
  
@@@ -9855,6 -9468,48 +9887,48 @@@ be an FQDN
     Target "write"
   </Chain>
  
+ =head1 IGNORELISTS
+ B<Ignorelists> are a generic framework to either ignore some metrics or report
+ specific metircs only. Plugins usually provide one or more options to specify
+ the items (mounts points, devices, ...) and the boolean option
+ C<IgnoreSelected>.
+ =over 4
+ =item B<Select> I<String>
+ Selects the item I<String>. This option often has a plugin specific name, e.g.
+ B<Sensor> in the C<sensors> plugin. It is also plugin specific what this string
+ is compared to. For example, the C<df> plugin's B<MountPoint> compares it to a
+ mount point and the C<sensors> plugin's B<Sensor> compares it to a sensor name.
+ By default, this option is doing a case-sensitive full-string match. The
+ following config will match C<foo>, but not C<Foo>:
+   Select "foo"
+ If I<String> starts and ends with C</> (a slash), the string is compiled as a
+ I<regular expression>. For example, so match all item starting with C<foo>, use
+ could use the following syntax:
+   Select "/^foo/"
+ The regular expression is I<not> anchored, i.e. the following config will match
+ C<foobar>, C<barfoo> and C<AfooZ>:
+   Select "/foo/"
+ The B<Select> option may be repeated to select multiple items.
+ =item B<IgnoreSelected> B<true>|B<false>
+ If set to B<true>, matching metrics are I<ignored> and all other metrics are
+ collected. If set to B<false>, matching metrics are I<collected> and all other
+ metrics are ignored.
+ =back
  =head1 SEE ALSO
  
  L<collectd(1)>,