Merge branch 'master' into connectivity
authorAndrew Bays <andrew.bays@gmail.com>
Fri, 9 Nov 2018 12:25:46 +0000 (07:25 -0500)
committerGitHub <noreply@github.com>
Fri, 9 Nov 2018 12:25:46 +0000 (07:25 -0500)
1  2 
Makefile.am
README
configure.ac
src/collectd.conf.in
src/collectd.conf.pod

diff --combined Makefile.am
@@@ -1,6 -1,15 +1,15 @@@
  ACLOCAL_AMFLAGS = -I m4
  AM_YFLAGS = -d
  
+ if BUILD_WIN32
+ cpkgdatadir=$(datadir)
+ cpkglibdir=$(libdir)/plugins
+ cpkglocalstatedir=${localstatedir}
+ else
+ cpkgdatadir=$(pkgdatadir)
+ cpkglibdir=$(pkglibdir)
+ cpkglocalstatedir=${localstatedir}/lib/${PACKAGE_NAME}
+ endif
  
  BUILT_SOURCES = \
        src/libcollectdclient/collectd/lcc_features.h \
@@@ -99,7 -108,13 +108,13 @@@ pkginclude_HEADERS = 
  
  lib_LTLIBRARIES = libcollectdclient.la
  
+ if BUILD_WIN32
+ # TODO: Build all executables on Windows as well.
+ sbin_PROGRAMS = \
+         collectd
  
+ bin_PROGRAMS =
+ else
  sbin_PROGRAMS = \
        collectd \
        collectdmon
@@@ -109,6 -124,7 +124,7 @@@ bin_PROGRAMS = 
        collectd-nagios \
        collectd-tg \
        collectdctl
+ endif # BUILD_WIN32
  
  
  noinst_LTLIBRARIES = \
@@@ -151,7 -167,7 +167,7 @@@ TESTS = $(check_PROGRAMS
  LOG_COMPILER = env VALGRIND="@VALGRIND@" $(abs_srcdir)/testwrapper.sh
  
  
- jardir = $(pkgdatadir)/java
+ jardir = $(cpkgdatadir)/java
  
  pkglib_LTLIBRARIES =
  
@@@ -160,6 -176,9 +176,9 @@@ PLUGIN_LDFLAGS = 
        -module \
        -avoid-version \
        -export-symbols-regex '\<module_register\>'
+ if BUILD_WIN32
+ PLUGIN_LDFLAGS += -shared -no-undefined -lcollectd -L.
+ endif
  
  
  AM_CPPFLAGS = \
        -DPREFIX='"${prefix}"' \
        -DCONFIGFILE='"${sysconfdir}/${PACKAGE_NAME}.conf"' \
        -DLOCALSTATEDIR='"${localstatedir}"' \
-       -DPKGLOCALSTATEDIR='"${localstatedir}/lib/${PACKAGE_NAME}"' \
-       -DPLUGINDIR='"${pkglibdir}"' \
-       -DPKGDATADIR='"${pkgdatadir}"'
+       -DPKGLOCALSTATEDIR='"${cpkglocalstatedir}"' \
+       -DPLUGINDIR='"${cpkglibdir}"' \
+       -DPKGDATADIR='"${cpkgdatadir}"'
+ if BUILD_WIN32
+ AM_CPPFLAGS += -DNOGDI
+ endif
  
+ COMMON_DEPS =
+ if BUILD_WIN32
+ COMMON_DEPS += collectd.exe
+ endif
  
  # Link to these libraries..
  COMMON_LIBS = $(PTHREAD_LIBS)
+ if BUILD_WIN32
+ COMMON_LIBS += -lws2_32
+ endif
+ if BUILD_WITH_GNULIB
+ COMMON_LIBS += -lgnu
+ endif
  if BUILD_WITH_CAPABILITY
  COMMON_LIBS += -lcap
  endif
@@@ -195,7 -227,6 +227,6 @@@ endi
  
  
  collectd_SOURCES = \
-       src/daemon/cmd.c \
        src/daemon/cmd.h \
        src/daemon/collectd.c \
        src/daemon/collectd.h \
@@@ -239,6 -270,13 +270,13 @@@ collectd_LDADD = 
        $(COMMON_LIBS) \
        $(DLOPEN_LIBS)
  
+ if BUILD_WIN32
+ collectd_SOURCES += src/daemon/cmd_windows.c
+ collectd_LDFLAGS += -ldl -Wl,--out-implib,libcollectd.a
+ else
+ collectd_SOURCES += src/daemon/cmd.c
+ endif
+       
  if BUILD_FEATURE_DAEMON
  collectd_CPPFLAGS += -DPIDFILE='"${localstatedir}/run/${PACKAGE_NAME}.pid"'
  endif
@@@ -250,6 -288,9 +288,9 @@@ collectd_CFLAGS += $(BUILD_WITH_LIBSTAT
  collectd_LDADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
  endif
  
+ if BUILD_WIN32
+ collectd_LDFLAGS += -Wl,--out-implib,libcollectd.a
+ endif
  
  collectdmon_SOURCES = src/collectdmon.c
  
@@@ -501,6 -542,10 +542,10 @@@ libcollectdclient_la_CPPFLAGS = 
        -I$(srcdir)/src/daemon
  libcollectdclient_la_LDFLAGS = -version-info 2:0:1
  libcollectdclient_la_LIBADD = -lm
+ if BUILD_WIN32
+ libcollectdclient_la_LDFLAGS += -shared -no-undefined
+ libcollectdclient_la_LIBADD += -lgnu -lws2_32 -liphlpapi
+ endif
  if BUILD_WITH_LIBGCRYPT
  libcollectdclient_la_CPPFLAGS += $(GCRYPT_CPPFLAGS)
  libcollectdclient_la_LDFLAGS += $(GCRYPT_LDFLAGS)
@@@ -529,6 -574,68 +574,68 @@@ liboconfig_la_SOURCES = 
  liboconfig_la_CPPFLAGS = -I$(srcdir)/src/liboconfig $(AM_CPPFLAGS)
  liboconfig_la_LDFLAGS = -avoid-version $(LEXLIB)
  
+ if BUILD_WITH_LIBCURL
+ if BUILD_WITH_LIBSSL
+ if BUILD_WITH_LIBYAJL2
+ noinst_LTLIBRARIES += liboauth.la
+ liboauth_la_SOURCES = \
+       src/utils_oauth.c \
+       src/utils_oauth.h
+ liboauth_la_CPPFLAGS = \
+       $(AM_CPPFLAGS) \
+       $(BUILD_WITH_LIBCURL_CFLAGS) \
+       $(BUILD_WITH_LIBSSL_CFLAGS) \
+       $(BUILD_WITH_LIBYAJL_CPPFLAGS)
+ liboauth_la_LIBADD = \
+       $(BUILD_WITH_LIBCURL_LIBS) \
+       $(BUILD_WITH_LIBSSL_LIBS) \
+       $(BUILD_WITH_LIBYAJL_LIBS)
+ check_PROGRAMS += test_utils_oauth
+ TESTS += test_utils_oauth
+ test_utils_oauth_SOURCES = \
+       src/utils_oauth_test.c
+ test_utils_oauth_LDADD = \
+       liboauth.la \
+       libcommon.la \
+       libplugin_mock.la
+ noinst_LTLIBRARIES += libgce.la
+ libgce_la_SOURCES = \
+       src/utils_gce.c \
+       src/utils_gce.h
+ libgce_la_CPPFLAGS = \
+       $(AM_CPPFLAGS) \
+       $(BUILD_WITH_LIBCURL_CFLAGS)
+ libgce_la_LIBADD = \
+       $(BUILD_WITH_LIBCURL_LIBS)
+ endif
+ endif
+ endif
+ if BUILD_WITH_LIBYAJL2
+ noinst_LTLIBRARIES += libformat_stackdriver.la
+ libformat_stackdriver_la_SOURCES = \
+       src/utils_format_stackdriver.c \
+       src/utils_format_stackdriver.h
+ libformat_stackdriver_la_CPPFLAGS = \
+       $(AM_CPPFLAGS) \
+       $(BUILD_WITH_LIBYAJL_CPPFLAGS)
+ libformat_stackdriver_la_LIBADD = \
+       libavltree.la \
+       $(BUILD_WITH_LIBSSL_LIBS) \
+       $(BUILD_WITH_LIBYAJL_LIBS)
+ check_PROGRAMS += test_format_stackdriver
+ TESTS += test_format_stackdriver
+ test_format_stackdriver_SOURCES = \
+       src/utils_format_stackdriver_test.c \
+       src/testing.h
+ test_format_stackdriver_LDADD = \
+       libformat_stackdriver.la \
+       libplugin_mock.la \
+       -lm
+ endif
  
  if BUILD_PLUGIN_AGGREGATION
  pkglib_LTLIBRARIES += aggregation.la
@@@ -661,15 -768,6 +768,15 @@@ chrony_la_LDFLAGS = $(PLUGIN_LDFLAGS
  chrony_la_LIBADD = -lm
  endif
  
 +if BUILD_PLUGIN_CONNECTIVITY
 +pkglib_LTLIBRARIES += connectivity.la
 +connectivity_la_SOURCES = src/connectivity.c
 +connectivity_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMNL_CFLAGS)
 +connectivity_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
 +connectivity_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
 +connectivity_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS) $(BUILD_WITH_LIBMNL_LIBS) libignorelist.la
 +endif
 +
  if BUILD_PLUGIN_CONNTRACK
  pkglib_LTLIBRARIES += conntrack.la
  conntrack_la_SOURCES = src/conntrack.c
@@@ -916,6 -1014,13 +1023,13 @@@ gps_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BU
  gps_la_LIBADD = -lpthread $(BUILD_WITH_LIBGPS_LIBS)
  endif
  
+ if BUILD_PLUGIN_GPU_NVIDIA
+ pkglib_LTLIBRARIES += gpu_nvidia.la
+ gpu_nvidia_la_SOURCES = src/gpu_nvidia.c
+ gpu_nvidia_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_GPU_CUDA_LDFLAGS)
+ gpu_nvidia_la_LIBADD = $(BUILD_WITH_CUDA_LIBS)
+ endif
  if BUILD_PLUGIN_GRPC
  pkglib_LTLIBRARIES += grpc.la
  grpc_la_SOURCES = src/grpc.cc
@@@ -1051,6 -1156,7 +1165,7 @@@ if BUILD_PLUGIN_LOGFIL
  pkglib_LTLIBRARIES += logfile.la
  logfile_la_SOURCES = src/logfile.c
  logfile_la_LDFLAGS = $(PLUGIN_LDFLAGS)
+ logfile_la_DEPENDENCIES = $(COMMON_DEPS)
  endif
  
  if BUILD_PLUGIN_LOG_LOGSTASH
@@@ -1390,6 -1496,24 +1505,24 @@@ ovs_stats_la_LDFLAGS = $(PLUGIN_LDFLAGS
  ovs_stats_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS)
  endif
  
+ if BUILD_PLUGIN_PCIE_ERRORS
+ pkglib_LTLIBRARIES += pcie_errors.la
+ pcie_errors_la_SOURCES = src/pcie_errors.c
+ pcie_errors_la_CPPFLAGS = $(AM_CPPFLAGS)
+ pcie_errors_la_LDFLAGS = $(PLUGIN_LDFLAGS)
+ test_plugin_pcie_errors_SOURCES = \
+       src/pcie_errors_test.c \
+       src/daemon/utils_llist.c \
+       src/daemon/configfile.c \
+       src/daemon/types_list.c
+ test_plugin_pcie_errors_CPPFLAGS = $(AM_CPPFLAGS)
+ test_plugin_pcie_errors_LDFLAGS = $(PLUGIN_LDFLAGS)
+ test_plugin_pcie_errors_LDADD = liboconfig.la libplugin_mock.la
+ check_PROGRAMS += test_plugin_pcie_errors
+ TESTS += test_plugin_pcie_errors
+ endif
  if BUILD_PLUGIN_PERL
  pkglib_LTLIBRARIES += perl.la
  perl_la_SOURCES = src/perl.c
@@@ -1922,6 -2046,15 +2055,15 @@@ write_sensu_la_SOURCES = src/write_sens
  write_sensu_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
+ if BUILD_PLUGIN_WRITE_STACKDRIVER
+ pkglib_LTLIBRARIES += write_stackdriver.la
+ write_stackdriver_la_SOURCES = src/write_stackdriver.c
+ write_stackdriver_la_LDFLAGS = $(PLUGIN_LDFLAGS)
+ write_stackdriver_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBCURL_CFLAGS)
+ write_stackdriver_la_LIBADD = libformat_stackdriver.la libgce.la liboauth.la \
+                      $(BUILD_WITH_LIBCURL_LIBS)
+ endif
  if BUILD_PLUGIN_WRITE_TSDB
  pkglib_LTLIBRARIES += write_tsdb.la
  write_tsdb_la_SOURCES = src/write_tsdb.c
@@@ -2041,15 -2174,15 +2183,15 @@@ install-exec-hook
        else \
                $(INSTALL) -m 0640 $(builddir)/src/collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf; \
        fi; \
-       $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
-       $(INSTALL) -m 0644 $(srcdir)/src/types.db $(DESTDIR)$(pkgdatadir)/types.db;
+       $(mkinstalldirs) $(DESTDIR)$(cpkgdatadir)
+       $(INSTALL) -m 0644 $(srcdir)/src/types.db $(DESTDIR)$(cpkgdatadir)/types.db;
        $(INSTALL) -m 0644 $(srcdir)/src/postgresql_default.conf \
-               $(DESTDIR)$(pkgdatadir)/postgresql_default.conf;
+               $(DESTDIR)$(cpkgdatadir)/postgresql_default.conf;
  
  uninstall-hook:
-       rm -f $(DESTDIR)$(pkgdatadir)/types.db;
+       rm -f $(DESTDIR)$(cpkgdatadir)/types.db;
        rm -f $(DESTDIR)$(sysconfdir)/collectd.conf
-       rm -f $(DESTDIR)$(pkgdatadir)/postgresql_default.conf;
+       rm -f $(DESTDIR)$(cpkgdatadir)/postgresql_default.conf;
  
  all-local: @PERL_BINDINGS@
  
@@@ -2129,3 -2262,4 +2271,4 @@@ generic-jmx.jar: $(JAVA_TIMESTAMP_FILE
  
  jar_DATA = collectd-api.jar generic-jmx.jar
  endif
diff --combined README
--- 1/README
--- 2/README
+++ b/README
@@@ -54,9 -54,6 +54,9 @@@ Feature
      - chrony
        Chrony daemon statistics: Local clock drift, offset to peers, etc.
  
 +    - connectivity
 +      Event-based interface status.
 +
      - conntrack
        Number of nf_conntrack entries.
  
      - gps
        Monitor gps related data through gpsd.
  
+     - gpu_nvidia
+       Monitor NVIDIA GPU statistics available through NVML.
      - hddtemp
        Hard disk temperatures using hddtempd.
  
        OVS documentation.
        <http://openvswitch.org/support/dist-docs/INSTALL.rst.html>
  
+     - pcie_errors
+       Read errors from PCI Express Device Status and AER extended capabilities.
+       <https://www.design-reuse.com/articles/38374/pcie-error-logging-and-handling-on-a-typical-soc.html>
      - perl
        The perl plugin implements a Perl-interpreter into collectd. You can
        write your own plugins in Perl and return arbitrary values using this
@@@ -748,6 -752,10 +755,10 @@@ Prerequisite
      particular.
      <http://developer.apple.com/corefoundation/>
  
+   * CUDA (optional)
+     Used by the `gpu_nvidia' plugin
+     <https://developer.nvidia.com/cuda-downloads>
    * libatasmart (optional)
      Used by the `smart' plugin.
      <http://git.0pointer.de/?p=libatasmart.git>
@@@ -1043,6 -1051,37 +1054,37 @@@ To generate the `configure` script, you
  The `build.sh' script takes no arguments.
  
  
+ Building on Windows
+ -----------------------------------------------
+ Collectd can be built on Windows using Cygwin, and the result is a binary that
+ runs natively on Windows. That is, Cygwin is only needed for building, not running,
+ collectd.
+ You will need to install the following Cygwin packages:
+ - automake
+ - bison
+ - flex
+ - git
+ - libtool
+ - make
+ - mingw64-x86_64-dlfcn
+ - mingw64-x86_64-gcc-core
+ - mingw64-x86_64-zlib
+ - pkg-config
+ To build, just run the `build.sh' script in your Cygwin terminal. By default, it installs
+ to "C:/Program Files/collectd". You can change the location by setting the INSTALL_DIR
+ variable:
+ $ export INSTALL_DIR="C:/some/other/install/directory"
+ $ ./build.sh
+ or:
+ $ INSTALL_DIR="C:/some/other/install/directory" ./build.sh
  Crosscompiling
  --------------
  
diff --combined configure.ac
@@@ -99,6 -99,10 +99,10 @@@ case $host_os i
      AC_DEFINE([KERNEL_SOLARIS], [1], [True if program is to be compiled for a Solaris kernel])
      ac_system="Solaris"
      ;;
+   *mingw32*)
+     AC_DEFINE([KERNEL_WIN32], [1], [True if program is to be compiled for a Windows kernel])
+     ac_system="Windows"
+     ;;
    *)
      ac_system="unknown"
      ;;
@@@ -111,6 -115,7 +115,7 @@@ AM_CONDITIONAL([BUILD_FREEBSD], [test "
  AM_CONDITIONAL([BUILD_LINUX], [test "x$ac_system" = "xLinux"])
  AM_CONDITIONAL([BUILD_OPENBSD], [test "x$ac_system" = "xOpenBSD"])
  AM_CONDITIONAL([BUILD_SOLARIS], [test "x$ac_system" = "xSolaris"])
+ AM_CONDITIONAL([BUILD_WIN32], [test "x$ac_system" = "xWindows"])
  
  if test "x$ac_system" = "xSolaris"; then
    AC_DEFINE([_POSIX_PTHREAD_SEMANTICS], [1], [Define to enforce POSIX thread semantics under Solaris.])
@@@ -550,6 -555,12 +555,12 @@@ if test "x$ac_system" = "xLinux"; the
      AC_DEFINE([HAVE_CAPABILITY], [1], [Define to 1 if you have cap_get_proc() (-lcap).])
    fi
  
+   # For pcie_errors plugin
+   AC_CHECK_HEADERS([linux/pci_regs.h],
+     [have_pci_regs_h="yes"],
+     [have_pci_regs_h="no (linux/pci_regs.h not found)"]
+   )
  else
    have_linux_raid_md_u_h="no"
    have_linux_wireless_h="no"
@@@ -745,6 -756,7 +756,7 @@@ AC_CHECK_FUNCS_ONCE([ 
      getaddrinfo \
      getgrnam_r \
      getnameinfo \
+     getpwnam \
      getpwnam_r \
      gettimeofday \
      if_indextoname \
@@@ -767,8 -779,12 +779,12 @@@ AC_FUNC_STRERROR_
  
  SAVE_CFLAGS="$CFLAGS"
  CFLAGS="-Wall -Werror"
- SAVE_LDFAGS="$LDFLAGS"
+ SAVE_LDFLAGS="$LDFLAGS"
  LDFLAGS=""
+ if test "x$ac_system" = "xWindows"; then
+   # This is exported from build.sh
+   LDFLAGS="$LDFLAGS -L${GNULIB_DIR}"
+ fi
  
  AC_CACHE_CHECK([for strtok_r],
    [c_cv_have_strtok_r_default],
@@@ -851,11 -867,17 +867,17 @@@ AC_CHECK_FUNCS([socket]
    [
      AC_CHECK_LIB([socket], [socket],
        [socket_needs_socket="yes"],
-       [AC_MSG_ERROR([cannot find socket() in libsocket])]
+       [
+         AC_CHECK_LIB([gnu], [rpl_socket],
+           [socket_needs_gnulib="yes"],
+           [AC_MSG_ERROR([cannot find socket() in libsocket])]
+         )
+       ]
      )
    ]
  )
  AM_CONDITIONAL([BUILD_WITH_LIBSOCKET], [test "x$socket_needs_socket" = "xyes"])
+ AM_CONDITIONAL([BUILD_WITH_GNULIB], [test "x$socket_needs_gnulib" = "xyes"])
  
  clock_gettime_needs_posix4="no"
  AC_CHECK_FUNCS([clock_gettime],
@@@ -2052,6 -2074,58 +2074,58 @@@ if test "x$with_kvm_openfiles" = "xyes"
    with_libkvm="yes"
  fi
  
+ # --with-cuda {{{
+ # only CUDA provides the nvml.h header
+ AC_ARG_WITH([cuda],
+   [AS_HELP_STRING([--with-cuda@<:@=PREFIX@:>@], [Path to cuda.])],
+   [
+     if test "x$withval" = "xyes"; then
+       with_cuda="yes"
+     else if test "x$withval" = "xno"; then
+       with_cuda="no"
+     else
+       with_cuda="yes"
+       CUDA_CFLAGS="$CUDA_CFLAGS -I$withval/include"
+       CUDA_LDFLAGS="$CUDA_LDFLAGS -L$withval/lib"
+     fi; fi
+   ],
+   [ with_cuda="yes"
+     CUDA_CFLAGS="$CUDA_CFLAGS -I/opt/cuda/include"
+     CUDA_LDFLAGS="$CUDA_LDFLAGS -L/opt/cuda/lib64"
+   ]
+ )
+ SAVE_CFLAGS="$CFLAGS"
+ SAVE_LDFLAGS="$LDFLAGS"
+ CFLAGS="$CFLAGS $CUDA_CFLAGS"
+ LDFLAGS="$LDFLAGS $CUDA_LDFLAGS"
+ if test "x$with_cuda" = "xyes"; then
+   AC_CHECK_HEADERS([nvml.h],
+     [with_cuda="yes"],
+     [with_cuda="no (header file missing)"]
+   )
+ fi
+ if test "x$with_cuda" = "xpkgconfig"; then
+   AC_CHECK_HEADERS([nvml.h],
+     [],
+     [with_cuda="no (header file missing)"]
+   )
+ fi
+ if test "x$with_cuda" = "xyes"; then
+   BUILD_WITH_CUDA_CFLAGS="$CUDA_CFLAGS"
+   BUILD_WITH_CUDA_LDFLAGS="$CUDA_LDFLAGS"
+   BUILD_WITH_CUDA_LIBS="-lnvidia-ml"
+ fi
+ AC_SUBST([BUILD_WITH_CUDA_CFLAGS])
+ AC_SUBST([BUILD_WITH_CUDA_LDFLAGS])
+ AC_SUBST([BUILD_WITH_CUDA_LIBS])
+ # }}}
  # --with-libaquaero5 {{{
  AC_ARG_WITH([libaquaero5],
    [AS_HELP_STRING([--with-libaquaero5@<:@=PREFIX@:>@], [Path to aquatools-ng source code.])],
  
  AC_SUBST(BUILD_WITH_LIBCURL_CFLAGS)
  AC_SUBST(BUILD_WITH_LIBCURL_LIBS)
+ AM_CONDITIONAL([BUILD_WITH_LIBCURL], [test "x$with_libcurl" = "xyes"])
  # }}}
  
  # --with-libdbi {{{
@@@ -5212,6 -5288,55 +5288,55 @@@ PKG_CHECK_MODULES([LIBSIGROK], [libsigr
  )
  # }}}
  
+ # --with-libssl {{{
+ with_libssl_cflags=""
+ with_libssl_ldflags=""
+ AC_ARG_WITH([libssl], [AS_HELP_STRING([--with-libssl@<:@=PREFIX@:>@], [Path to libssl.])],
+ [
+       if test "x$withval" != "xno" && test "x$withval" != "xyes"; then
+               with_libssl_cppflags="-I$withval/include"
+               with_libssl_ldflags="-L$withval/lib"
+               with_libssl="yes"
+       else
+               with_libssl="$withval"
+       fi
+ ],
+ [
+       with_libssl="yes"
+ ])
+ if test "x$with_libssl" = "xyes"; then
+       SAVE_CPPFLAGS="$CPPFLAGS"
+       CPPFLAGS="$CPPFLAGS $with_libssl_cppflags"
+   AC_CHECK_HEADERS([openssl/sha.h openssl/blowfish.h openssl/rand.h],
+     [with_libssl="yes"],
+     [with_libssl="no (ssl header not found)"])
+       CPPFLAGS="$SAVE_CPPFLAGS"
+ fi
+ if test "x$with_libssl" = "xyes"; then
+       SAVE_CPPFLAGS="$CPPFLAGS"
+       SAVE_LDFLAGS="$LDFLAGS"
+       CPPFLAGS="$CPPFLAGS $with_libssl_cppflags"
+       LDFLAGS="$LDFLAGS $with_libssl_ldflags"
+       AC_CHECK_LIB([ssl], [OPENSSL_init_ssl], [with_libssl="yes"], [with_libssl="no (Symbol 'SSL_library_init' not found)"])
+       CPPFLAGS="$SAVE_CPPFLAGS"
+       LDFLAGS="$SAVE_LDFLAGS"
+ fi
+ if test "x$with_libssl" = "xyes"; then
+       BUILD_WITH_LIBSSL_CFLAGS="$with_libssl_cflags"
+       BUILD_WITH_LIBSSL_LDFLAGS="$with_libssl_ldflags"
+       BUILD_WITH_LIBSSL_LIBS="-lssl -lcrypto"
+       AC_SUBST([BUILD_WITH_LIBSSL_CFLAGS])
+       AC_SUBST([BUILD_WITH_LIBSSL_LDFLAGS])
+       AC_SUBST([BUILD_WITH_LIBSSL_LIBS])
+       AC_DEFINE([HAVE_LIBSSL], [1], [Define if libssl is present and usable.])
+ fi
+ AM_CONDITIONAL(BUILD_WITH_LIBSSL, test "x$with_libssl" = "xyes")
+ # }}}
  # --with-libstatgrab {{{
  AC_ARG_WITH([libstatgrab],
    [AS_HELP_STRING([--with-libstatgrab@<:@=PREFIX@:>@], [Path to libstatgrab.])],
@@@ -5672,15 -5797,15 +5797,15 @@@ if test "x$with_libxmms" = "xyes"; the
  fi
  
  if test "x$with_libxmms" = "xyes"; then
-   SAVE_CFLAGS="$CFLAGS"
-   CFLAGS="$with_xmms_cflags"
+   SAVE_CPPFLAGS="$CFLAGS"
+   CPPFLAGS="$with_xmms_cflags"
  
    AC_CHECK_HEADER([xmmsctrl.h],
      [with_libxmms="yes"],
      [with_libxmms="no"],
    )
  
-   CFLAGS="$SAVE_CFLAGS"
+   CPPFLAGS="$SAVE_CPPFLAGS"
  fi
  
  if test "x$with_libxmms" = "xyes"; then
@@@ -5767,6 -5892,7 +5892,7 @@@ AC_SUBST([BUILD_WITH_LIBYAJL_LDFLAGS]
  AC_SUBST([BUILD_WITH_LIBYAJL_LIBS])
  
  AM_CONDITIONAL([BUILD_WITH_LIBYAJL], [test "x$with_libyajl" = "xyes"])
+ AM_CONDITIONAL([BUILD_WITH_LIBYAJL2], [test "x$with_libyajl$with_libyajl2" = "xyesyes"])
  # }}}
  
  # --with-mic {{{
@@@ -5898,32 -6024,41 +6024,41 @@@ AC_SUBST([BUILD_WITH_LIBVARNISH_CFLAGS]
  AC_SUBST([BUILD_WITH_LIBVARNISH_LIBS])
  # }}}
  
- # pkg-config --exists 'libxml-2.0'; pkg-config --exists libvirt {{{
- $PKG_CONFIG --exists 'libxml-2.0' 2>/dev/null
- if test $? -eq 0; then
-   with_libxml2="yes"
- else
-   with_libxml2="no (pkg-config doesn't know libxml-2.0)"
- fi
- $PKG_CONFIG --exists libvirt 2>/dev/null
- if test $? = 0; then
-   with_libvirt="yes"
- else
-   with_libvirt="no (pkg-config doesn't know libvirt)"
- fi
- if test "x$with_libxml2" = "xyes"; then
-   with_libxml2_cflags="`$PKG_CONFIG --cflags libxml-2.0`"
-   if test $? -ne 0; then
-     with_libxml2="no"
-   fi
-   with_libxml2_ldflags="`$PKG_CONFIG --libs libxml-2.0`"
-   if test $? -ne 0; then
-     with_libxml2="no"
-   fi
- fi
+ # --with-libxml2 {{{
+ AC_ARG_WITH(libxml2,
+   [AS_HELP_STRING([--with-libxml2@<:@=PREFIX@:>@], [Path to libxml2.])],
+   [
+     if test "x$withval" = "xno"; then
+       with_libxml2="no"
+     else if test "x$withval" = "xyes"; then
+       $PKG_CONFIG --exists 'libxml-2.0' 2>/dev/null
+       if test $? -eq 0; then
+         with_libxml2="yes"
+         with_libxml2_cflags="`$PKG_CONFIG --cflags libxml-2.0`"
+         with_libxml2_ldflags="`$PKG_CONFIG --libs libxml-2.0`"
+       else
+         with_libxml2="no (pkg-config doesn't know libxml-2.0)"
+       fi
+     else
+       with_libxml2="yes"
+       with_libxml2_cflags="-I$withval/include"
+       with_libxml2_ldflags="-L$withval/lib"
+     fi; fi
+   ],
+   dnl  if no argument --with-libxml2 was passed, find the library locations
+   dnl  with pkg-config just like above, when --with-libxml2=yes.
+   [
+     with_libxml2="yes"
+     $PKG_CONFIG --exists 'libxml-2.0' 2>/dev/null
+     if test $? -eq 0; then
+       with_libxml2="yes"
+       with_libxml2_cflags="`$PKG_CONFIG --cflags libxml-2.0`"
+       with_libxml2_ldflags="`$PKG_CONFIG --libs libxml-2.0`"
+     else
+       with_libxml2="no (pkg-config doesn't know libxml-2.0)"
+     fi
+   ]
+ )
  
  if test "x$with_libxml2" = "xyes"; then
    SAVE_CPPFLAGS="$CPPFLAGS"
  
  AC_SUBST([BUILD_WITH_LIBXML2_CFLAGS])
  AC_SUBST([BUILD_WITH_LIBXML2_LIBS])
+ # }}}
+ # pkg-config --exists libvirt {{{
+ $PKG_CONFIG --exists libvirt 2>/dev/null
+ if test $? = 0; then
+   with_libvirt="yes"
+ else
+   with_libvirt="no (pkg-config doesn't know libvirt)"
+ fi
  
  if test "x$with_libvirt" = "xyes"; then
    with_libvirt_cflags="`$PKG_CONFIG --cflags libvirt`"
@@@ -6253,7 -6397,6 +6397,7 @@@ plugin_battery="no
  plugin_bind="no"
  plugin_ceph="no"
  plugin_cgroups="no"
 +plugin_connectivity="no"
  plugin_conntrack="no"
  plugin_contextswitch="no"
  plugin_cpu="no"
@@@ -6271,6 -6414,7 +6415,7 @@@ plugin_ethstat="no
  plugin_fhcount="no"
  plugin_fscache="no"
  plugin_gps="no"
+ plugin_gpu_nvidia="no"
  plugin_grpc="no"
  plugin_hugepages="no"
  plugin_intel_pmu="no"
@@@ -6289,6 -6433,7 +6434,7 @@@ plugin_nfs="no
  plugin_numa="no"
  plugin_ovs_events="no"
  plugin_ovs_stats="no"
+ plugin_pcie_errors="no"
  plugin_perl="no"
  plugin_pinba="no"
  plugin_processes="no"
@@@ -6310,6 -6455,7 +6456,7 @@@ plugin_vmem="no
  plugin_vserver="no"
  plugin_wireless="no"
  plugin_write_prometheus="no"
+ plugin_write_stackdriver="no"
  plugin_xencpu="no"
  plugin_zfs_arc="no"
  plugin_zone="no"
@@@ -6366,11 -6512,11 +6513,15 @@@ if test "x$ac_system" = "xLinux"; the
    if test "x$with_libyajl" = "xyes" && test "x$with_libyajl2" = "xyes"; then
      plugin_ovs_events="yes"
      plugin_ovs_stats="yes"
 +
 +    if test "x$with_libmnl" = "xyes"; then
 +      plugin_connectivity="yes"
 +    fi
    fi
+   if test "x$have_pci_regs_h" = "xyes"; then
+     plugin_pcie_errors="yes"
+   fi
  fi
  
  if test "x$ac_system" = "xOpenBSD"; then
@@@ -6468,6 -6614,10 +6619,10 @@@ if test "x$with_libcurl" = "xyes" && te
    plugin_curl_json="yes"
  fi
  
+ if test "x$with_libcurl" = "xyes" && test "x$with_libssl" = "xyes" && test "x$with_libyajl" = "xyes" && test "x$with_libyajl2" = "xyes"; then
+   plugin_write_stackdriver="yes"
+ fi
  if test "x$with_libcurl" = "xyes" && test "x$with_libxml2" = "xyes"; then
    plugin_curl_xml="yes"
  fi
@@@ -6656,163 -6806,165 +6811,166 @@@ AC_ARG_ENABLE([all-plugins]
  
  m4_divert_once([HELP_ENABLE], [])
  
- AC_PLUGIN([aggregation],         [yes],                     [Aggregation plugin])
- AC_PLUGIN([amqp],                [$with_librabbitmq],       [AMQP output plugin])
- AC_PLUGIN([amqp1],               [$with_libqpid_proton],    [AMQP 1.0 output plugin])
- AC_PLUGIN([apache],              [$with_libcurl],           [Apache httpd statistics])
- AC_PLUGIN([apcups],              [yes],                     [Statistics of UPSes by APC])
- AC_PLUGIN([apple_sensors],       [$with_libiokit],          [Apple hardware sensors])
- AC_PLUGIN([aquaero],             [$with_libaquaero5],       [Aquaero hardware sensors])
- AC_PLUGIN([ascent],              [$plugin_ascent],          [AscentEmu player statistics])
- AC_PLUGIN([barometer],           [$plugin_barometer],       [Barometer sensor on I2C])
- AC_PLUGIN([battery],             [$plugin_battery],         [Battery statistics])
- AC_PLUGIN([bind],                [$plugin_bind],            [ISC Bind nameserver statistics])
- AC_PLUGIN([ceph],                [$plugin_ceph],            [Ceph daemon statistics])
- AC_PLUGIN([cgroups],             [$plugin_cgroups],         [CGroups CPU usage accounting])
- AC_PLUGIN([chrony],              [yes],                     [Chrony statistics])
- AC_PLUGIN([connectivity],        [$plugin_connectivity],    [Network interface up/down events])
- AC_PLUGIN([conntrack],           [$plugin_conntrack],       [nf_conntrack statistics])
- AC_PLUGIN([contextswitch],       [$plugin_contextswitch],   [context switch statistics])
- AC_PLUGIN([cpu],                 [$plugin_cpu],             [CPU usage statistics])
- AC_PLUGIN([cpufreq],             [$plugin_cpufreq],         [CPU frequency statistics])
- AC_PLUGIN([cpusleep],            [$plugin_cpusleep],        [CPU sleep statistics])
- AC_PLUGIN([csv],                 [yes],                     [CSV output plugin])
- AC_PLUGIN([curl],                [$with_libcurl],           [CURL generic web statistics])
- AC_PLUGIN([curl_json],           [$plugin_curl_json],       [CouchDB statistics])
- AC_PLUGIN([curl_xml],            [$plugin_curl_xml],        [CURL generic xml statistics])
- AC_PLUGIN([dbi],                 [$with_libdbi],            [General database statistics])
- AC_PLUGIN([df],                  [$plugin_df],              [Filesystem usage statistics])
- AC_PLUGIN([disk],                [$plugin_disk],            [Disk usage statistics])
- AC_PLUGIN([dns],                 [$with_libpcap],           [DNS traffic analysis])
- AC_PLUGIN([dpdkevents],          [$plugin_dpdkevents],      [Events from DPDK])
- AC_PLUGIN([dpdkstat],            [$plugin_dpdkstat],        [Stats from DPDK])
- AC_PLUGIN([drbd],                [$plugin_drbd],            [DRBD statistics])
- AC_PLUGIN([email],               [yes],                     [EMail statistics])
- AC_PLUGIN([entropy],             [$plugin_entropy],         [Entropy statistics])
- AC_PLUGIN([ethstat],             [$plugin_ethstat],         [Stats from NIC driver])
- AC_PLUGIN([exec],                [yes],                     [Execution of external programs])
- AC_PLUGIN([fhcount],             [$plugin_fhcount],         [File handles statistics])
- AC_PLUGIN([filecount],           [yes],                     [Count files in directories])
- AC_PLUGIN([fscache],             [$plugin_fscache],         [fscache statistics])
- AC_PLUGIN([gmond],               [$with_libganglia],        [Ganglia plugin])
- 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_pmu],           [$with_libjevents],        [Intel performance monitor plugin])
- 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])
- AC_PLUGIN([iptables],            [$with_libiptc],           [IPTables rule counters])
- 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([load],                [$plugin_load],            [System load])
- AC_PLUGIN([log_logstash],        [$plugin_log_logstash],    [Logstash json_event compatible logging])
- AC_PLUGIN([logfile],             [yes],                     [File logging plugin])
- AC_PLUGIN([lpar],                [$with_perfstat],          [AIX logical partitions statistics])
- AC_PLUGIN([lua],                 [$with_liblua],            [Lua plugin])
- AC_PLUGIN([lvm],                 [$with_liblvm2app],        [LVM statistics])
- AC_PLUGIN([madwifi],             [$have_linux_wireless_h],  [Madwifi wireless statistics])
- AC_PLUGIN([match_empty_counter], [yes],                     [The empty counter match])
- AC_PLUGIN([match_hashed],        [yes],                     [The hashed match])
- AC_PLUGIN([match_regex],         [yes],                     [The regex match])
- AC_PLUGIN([match_timediff],      [yes],                     [The timediff match])
- AC_PLUGIN([match_value],         [yes],                     [The value match])
- AC_PLUGIN([mbmon],               [yes],                     [Query mbmond])
- AC_PLUGIN([mcelog],              [$plugin_mcelog],          [Machine Check Exceptions notifications])
- AC_PLUGIN([md],                  [$have_linux_raid_md_u_h], [md (Linux software RAID) devices])
- AC_PLUGIN([memcachec],           [$with_libmemcached],      [memcachec statistics])
- AC_PLUGIN([memcached],           [yes],                     [memcached statistics])
- AC_PLUGIN([memory],              [$plugin_memory],          [Memory usage])
- AC_PLUGIN([mic],                 [$with_mic],               [Intel Many Integrated Core stats])
- AC_PLUGIN([modbus],              [$with_libmodbus],         [Modbus plugin])
- AC_PLUGIN([mqtt],                [$with_libmosquitto],      [MQTT output plugin])
- AC_PLUGIN([multimeter],          [$plugin_multimeter],      [Read multimeter values])
- AC_PLUGIN([mysql],               [$with_libmysql],          [MySQL statistics])
- AC_PLUGIN([netapp],              [$with_libnetapp],         [NetApp plugin])
- AC_PLUGIN([netlink],             [$with_libmnl],            [Enhanced Linux network statistics])
- AC_PLUGIN([network],             [yes],                     [Network communication plugin])
- AC_PLUGIN([nfs],                 [$plugin_nfs],             [NFS statistics])
- AC_PLUGIN([nginx],               [$with_libcurl],           [nginx statistics])
- AC_PLUGIN([notify_desktop],      [$with_libnotify],         [Desktop notifications])
- AC_PLUGIN([notify_email],        [$with_libesmtp],          [Email notifier])
- AC_PLUGIN([notify_nagios],       [yes],                     [Nagios notification plugin])
- AC_PLUGIN([ntpd],                [yes],                     [NTPd statistics])
- AC_PLUGIN([numa],                [$plugin_numa],            [NUMA virtual memory statistics])
- 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([ovs_events],          [$plugin_ovs_events],      [OVS events plugin])
- AC_PLUGIN([ovs_stats],           [$plugin_ovs_stats],       [OVS statistics plugin])
- AC_PLUGIN([perl],                [$plugin_perl],            [Embed a Perl interpreter])
- AC_PLUGIN([pf],                  [$have_net_pfvar_h],       [BSD packet filter (PF) statistics])
+ AC_PLUGIN([aggregation],         [yes],                       [Aggregation plugin])
+ AC_PLUGIN([amqp],                [$with_librabbitmq],         [AMQP output plugin])
+ AC_PLUGIN([amqp1],               [$with_libqpid_proton],      [AMQP 1.0 output plugin])
+ AC_PLUGIN([apache],              [$with_libcurl],             [Apache httpd statistics])
+ AC_PLUGIN([apcups],              [yes],                       [Statistics of UPSes by APC])
+ AC_PLUGIN([apple_sensors],       [$with_libiokit],            [Apple hardware sensors])
+ AC_PLUGIN([aquaero],             [$with_libaquaero5],         [Aquaero hardware sensors])
+ AC_PLUGIN([ascent],              [$plugin_ascent],            [AscentEmu player statistics])
+ AC_PLUGIN([barometer],           [$plugin_barometer],         [Barometer sensor on I2C])
+ AC_PLUGIN([battery],             [$plugin_battery],           [Battery statistics])
+ AC_PLUGIN([bind],                [$plugin_bind],              [ISC Bind nameserver statistics])
+ AC_PLUGIN([ceph],                [$plugin_ceph],              [Ceph daemon statistics])
+ AC_PLUGIN([cgroups],             [$plugin_cgroups],           [CGroups CPU usage accounting])
+ AC_PLUGIN([chrony],              [yes],                       [Chrony statistics])
++AC_PLUGIN([connectivity],        [$plugin_connectivity],      [Network interface up/down events])
+ AC_PLUGIN([conntrack],           [$plugin_conntrack],         [nf_conntrack statistics])
+ AC_PLUGIN([contextswitch],       [$plugin_contextswitch],     [context switch statistics])
+ AC_PLUGIN([cpu],                 [$plugin_cpu],               [CPU usage statistics])
+ AC_PLUGIN([cpufreq],             [$plugin_cpufreq],           [CPU frequency statistics])
+ AC_PLUGIN([cpusleep],            [$plugin_cpusleep],          [CPU sleep statistics])
+ AC_PLUGIN([csv],                 [yes],                       [CSV output plugin])
+ AC_PLUGIN([curl],                [$with_libcurl],             [CURL generic web statistics])
+ AC_PLUGIN([curl_json],           [$plugin_curl_json],         [CouchDB statistics])
+ AC_PLUGIN([curl_xml],            [$plugin_curl_xml],          [CURL generic xml statistics])
+ AC_PLUGIN([dbi],                 [$with_libdbi],              [General database statistics])
+ AC_PLUGIN([df],                  [$plugin_df],                [Filesystem usage statistics])
+ AC_PLUGIN([disk],                [$plugin_disk],              [Disk usage statistics])
+ AC_PLUGIN([dns],                 [$with_libpcap],             [DNS traffic analysis])
+ AC_PLUGIN([dpdkevents],          [$plugin_dpdkevents],        [Events from DPDK])
+ AC_PLUGIN([dpdkstat],            [$plugin_dpdkstat],          [Stats from DPDK])
+ AC_PLUGIN([drbd],                [$plugin_drbd],              [DRBD statistics])
+ AC_PLUGIN([email],               [yes],                       [EMail statistics])
+ AC_PLUGIN([entropy],             [$plugin_entropy],           [Entropy statistics])
+ AC_PLUGIN([ethstat],             [$plugin_ethstat],           [Stats from NIC driver])
+ AC_PLUGIN([exec],                [yes],                       [Execution of external programs])
+ AC_PLUGIN([fhcount],             [$plugin_fhcount],           [File handles statistics])
+ AC_PLUGIN([filecount],           [yes],                       [Count files in directories])
+ AC_PLUGIN([fscache],             [$plugin_fscache],           [fscache statistics])
+ AC_PLUGIN([gmond],               [$with_libganglia],          [Ganglia plugin])
+ AC_PLUGIN([gps],                 [$plugin_gps],               [GPS plugin])
+ AC_PLUGIN([gpu_nvidia],          [$with_cuda],                [NVIDIA GPU plugin])
+ AC_PLUGIN([grpc],                [$plugin_grpc],              [gRPC plugin])
+ AC_PLUGIN([hddtemp],             [yes],                       [Query hddtempd])
+ AC_PLUGIN([hugepages],           [$plugin_hugepages],         [Hugepages statistics])
+ AC_PLUGIN([intel_pmu],           [$with_libjevents],          [Intel performance monitor plugin])
+ 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])
+ AC_PLUGIN([iptables],            [$with_libiptc],             [IPTables rule counters])
+ 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([load],                [$plugin_load],              [System load])
+ AC_PLUGIN([log_logstash],        [$plugin_log_logstash],      [Logstash json_event compatible logging])
+ AC_PLUGIN([logfile],             [yes],                       [File logging plugin])
+ AC_PLUGIN([lpar],                [$with_perfstat],            [AIX logical partitions statistics])
+ AC_PLUGIN([lua],                 [$with_liblua],              [Lua plugin])
+ AC_PLUGIN([lvm],                 [$with_liblvm2app],          [LVM statistics])
+ AC_PLUGIN([madwifi],             [$have_linux_wireless_h],    [Madwifi wireless statistics])
+ AC_PLUGIN([match_empty_counter], [yes],                       [The empty counter match])
+ AC_PLUGIN([match_hashed],        [yes],                       [The hashed match])
+ AC_PLUGIN([match_regex],         [yes],                       [The regex match])
+ AC_PLUGIN([match_timediff],      [yes],                       [The timediff match])
+ AC_PLUGIN([match_value],         [yes],                       [The value match])
+ AC_PLUGIN([mbmon],               [yes],                       [Query mbmond])
+ AC_PLUGIN([mcelog],              [$plugin_mcelog],            [Machine Check Exceptions notifications])
+ AC_PLUGIN([md],                  [$have_linux_raid_md_u_h],   [md (Linux software RAID) devices])
+ AC_PLUGIN([memcachec],           [$with_libmemcached],        [memcachec statistics])
+ AC_PLUGIN([memcached],           [yes],                       [memcached statistics])
+ AC_PLUGIN([memory],              [$plugin_memory],            [Memory usage])
+ AC_PLUGIN([mic],                 [$with_mic],                 [Intel Many Integrated Core stats])
+ AC_PLUGIN([modbus],              [$with_libmodbus],           [Modbus plugin])
+ AC_PLUGIN([mqtt],                [$with_libmosquitto],        [MQTT output plugin])
+ AC_PLUGIN([multimeter],          [$plugin_multimeter],        [Read multimeter values])
+ AC_PLUGIN([mysql],               [$with_libmysql],            [MySQL statistics])
+ AC_PLUGIN([netapp],              [$with_libnetapp],           [NetApp plugin])
+ AC_PLUGIN([netlink],             [$with_libmnl],              [Enhanced Linux network statistics])
+ AC_PLUGIN([network],             [yes],                       [Network communication plugin])
+ AC_PLUGIN([nfs],                 [$plugin_nfs],               [NFS statistics])
+ AC_PLUGIN([nginx],               [$with_libcurl],             [nginx statistics])
+ AC_PLUGIN([notify_desktop],      [$with_libnotify],           [Desktop notifications])
+ AC_PLUGIN([notify_email],        [$with_libesmtp],            [Email notifier])
+ AC_PLUGIN([notify_nagios],       [yes],                       [Nagios notification plugin])
+ AC_PLUGIN([ntpd],                [yes],                       [NTPd statistics])
+ AC_PLUGIN([numa],                [$plugin_numa],              [NUMA virtual memory statistics])
+ 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([ovs_events],          [$plugin_ovs_events],        [OVS events plugin])
+ AC_PLUGIN([ovs_stats],           [$plugin_ovs_stats],         [OVS statistics plugin])
+ AC_PLUGIN([pcie_errors],         [$plugin_pcie_errors],       [PCIe errors plugin])
+ AC_PLUGIN([perl],                [$plugin_perl],              [Embed a Perl interpreter])
+ AC_PLUGIN([pf],                  [$have_net_pfvar_h],         [BSD packet filter (PF) statistics])
  # FIXME: Check for libevent, too.
- AC_PLUGIN([pinba],               [$plugin_pinba],           [Pinba statistics])
- AC_PLUGIN([ping],                [$with_liboping],          [Network latency statistics])
- AC_PLUGIN([postgresql],          [$with_libpq],             [PostgreSQL database statistics])
- AC_PLUGIN([powerdns],            [yes],                     [PowerDNS statistics])
- AC_PLUGIN([processes],           [$plugin_processes],       [Process statistics])
- AC_PLUGIN([protocols],           [$plugin_protocols],       [Protocol (IP, TCP, ...) statistics])
- AC_PLUGIN([python],              [$plugin_python],          [Embed a Python interpreter])
- AC_PLUGIN([redis],               [$with_libhiredis],        [Redis plugin])
- AC_PLUGIN([routeros],            [$with_librouteros],       [RouterOS plugin])
- AC_PLUGIN([rrdcached],           [$librrd_rrdc_update],     [RRDTool output plugin])
- AC_PLUGIN([rrdtool],             [$with_librrd],            [RRDTool output plugin])
- 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],               [$plugin_smart],           [SMART statistics])
- AC_PLUGIN([snmp],                [$with_libnetsnmp],        [SNMP querying plugin])
- AC_PLUGIN([snmp_agent],          [$with_libnetsnmpagent],   [SNMP agent plugin])
- AC_PLUGIN([statsd],              [yes],                     [StatsD plugin])
- AC_PLUGIN([swap],                [$plugin_swap],            [Swap usage statistics])
- AC_PLUGIN([synproxy],            [$plugin_synproxy],        [Synproxy stats plugin])
- AC_PLUGIN([syslog],              [$have_syslog],            [Syslog logging plugin])
- AC_PLUGIN([table],               [yes],                     [Parsing of tabular data])
- AC_PLUGIN([tail],                [yes],                     [Parsing of logfiles])
- AC_PLUGIN([tail_csv],            [yes],                     [Parsing of CSV files])
- AC_PLUGIN([tape],                [$plugin_tape],            [Tape drive statistics])
- AC_PLUGIN([target_notification], [yes],                     [The notification target])
- AC_PLUGIN([target_replace],      [yes],                     [The replace target])
- AC_PLUGIN([target_scale],        [yes],                     [The scale target])
- AC_PLUGIN([target_set],          [yes],                     [The set target])
- AC_PLUGIN([target_v5upgrade],    [yes],                     [The v5upgrade target])
- AC_PLUGIN([tcpconns],            [$plugin_tcpconns],        [TCP connection statistics])
- AC_PLUGIN([teamspeak2],          [yes],                     [TeamSpeak2 server statistics])
- AC_PLUGIN([ted],                 [$plugin_ted],             [Read The Energy Detective values])
- AC_PLUGIN([thermal],             [$plugin_thermal],         [Linux ACPI thermal zone statistics])
- AC_PLUGIN([threshold],           [yes],                     [Threshold checking plugin])
- AC_PLUGIN([tokyotyrant],         [$with_libtokyotyrant],    [TokyoTyrant database statistics])
- AC_PLUGIN([turbostat],           [$plugin_turbostat],       [Advanced statistic on Intel cpu states])
- AC_PLUGIN([unixsock],            [yes],                     [Unixsock communication plugin])
- AC_PLUGIN([uptime],              [$plugin_uptime],          [Uptime statistics])
- 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])
- AC_PLUGIN([write_graphite],      [yes],                     [Graphite / Carbon output plugin])
- AC_PLUGIN([write_http],          [$with_libcurl],           [HTTP output plugin])
- AC_PLUGIN([write_kafka],         [$with_librdkafka],        [Kafka output plugin])
- AC_PLUGIN([write_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])
- AC_PLUGIN([write_tsdb],          [yes],                     [TSDB output plugin])
- AC_PLUGIN([xencpu],              [$plugin_xencpu],          [Xen Host CPU usage])
- AC_PLUGIN([xmms],                [$with_libxmms],           [XMMS statistics])
- AC_PLUGIN([zfs_arc],             [$plugin_zfs_arc],         [ZFS ARC statistics])
- AC_PLUGIN([zone],                [$plugin_zone],            [Solaris container statistics])
- AC_PLUGIN([zookeeper],           [yes],                     [Zookeeper statistics])
+ AC_PLUGIN([pinba],               [$plugin_pinba],             [Pinba statistics])
+ AC_PLUGIN([ping],                [$with_liboping],            [Network latency statistics])
+ AC_PLUGIN([postgresql],          [$with_libpq],               [PostgreSQL database statistics])
+ AC_PLUGIN([powerdns],            [yes],                       [PowerDNS statistics])
+ AC_PLUGIN([processes],           [$plugin_processes],         [Process statistics])
+ AC_PLUGIN([protocols],           [$plugin_protocols],         [Protocol (IP, TCP, ...) statistics])
+ AC_PLUGIN([python],              [$plugin_python],            [Embed a Python interpreter])
+ AC_PLUGIN([redis],               [$with_libhiredis],          [Redis plugin])
+ AC_PLUGIN([routeros],            [$with_librouteros],         [RouterOS plugin])
+ AC_PLUGIN([rrdcached],           [$librrd_rrdc_update],       [RRDTool output plugin])
+ AC_PLUGIN([rrdtool],             [$with_librrd],              [RRDTool output plugin])
+ 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],               [$plugin_smart],             [SMART statistics])
+ AC_PLUGIN([snmp],                [$with_libnetsnmp],          [SNMP querying plugin])
+ AC_PLUGIN([snmp_agent],          [$with_libnetsnmpagent],     [SNMP agent plugin])
+ AC_PLUGIN([statsd],              [yes],                       [StatsD plugin])
+ AC_PLUGIN([swap],                [$plugin_swap],              [Swap usage statistics])
+ AC_PLUGIN([synproxy],            [$plugin_synproxy],          [Synproxy stats plugin])
+ AC_PLUGIN([syslog],              [$have_syslog],              [Syslog logging plugin])
+ AC_PLUGIN([table],               [yes],                       [Parsing of tabular data])
+ AC_PLUGIN([tail],                [yes],                       [Parsing of logfiles])
+ AC_PLUGIN([tail_csv],            [yes],                       [Parsing of CSV files])
+ AC_PLUGIN([tape],                [$plugin_tape],              [Tape drive statistics])
+ AC_PLUGIN([target_notification], [yes],                       [The notification target])
+ AC_PLUGIN([target_replace],      [yes],                       [The replace target])
+ AC_PLUGIN([target_scale],        [yes],                       [The scale target])
+ AC_PLUGIN([target_set],          [yes],                       [The set target])
+ AC_PLUGIN([target_v5upgrade],    [yes],                       [The v5upgrade target])
+ AC_PLUGIN([tcpconns],            [$plugin_tcpconns],          [TCP connection statistics])
+ AC_PLUGIN([teamspeak2],          [yes],                       [TeamSpeak2 server statistics])
+ AC_PLUGIN([ted],                 [$plugin_ted],               [Read The Energy Detective values])
+ AC_PLUGIN([thermal],             [$plugin_thermal],           [Linux ACPI thermal zone statistics])
+ AC_PLUGIN([threshold],           [yes],                       [Threshold checking plugin])
+ AC_PLUGIN([tokyotyrant],         [$with_libtokyotyrant],      [TokyoTyrant database statistics])
+ AC_PLUGIN([turbostat],           [$plugin_turbostat],         [Advanced statistic on Intel cpu states])
+ AC_PLUGIN([unixsock],            [yes],                       [Unixsock communication plugin])
+ AC_PLUGIN([uptime],              [$plugin_uptime],            [Uptime statistics])
+ 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])
+ AC_PLUGIN([write_graphite],      [yes],                       [Graphite / Carbon output plugin])
+ AC_PLUGIN([write_http],          [$with_libcurl],             [HTTP output plugin])
+ AC_PLUGIN([write_stackdriver],   [$plugin_write_stackdriver], [Google Stackdriver Monitoring output plugin])
+ 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])
+ AC_PLUGIN([write_tsdb],          [yes],                       [TSDB output plugin])
+ AC_PLUGIN([xencpu],              [$plugin_xencpu],            [Xen Host CPU usage])
+ AC_PLUGIN([xmms],                [$with_libxmms],             [XMMS statistics])
+ AC_PLUGIN([zfs_arc],             [$plugin_zfs_arc],           [ZFS ARC statistics])
+ AC_PLUGIN([zone],                [$plugin_zone],              [Solaris container statistics])
+ AC_PLUGIN([zookeeper],           [yes],                       [Zookeeper statistics])
  
  dnl Default configuration file
  # Load either syslog or logfile
@@@ -7004,6 -7156,7 +7162,7 @@@ AC_MSG_RESULT([    YACC  . . . . . . . 
  AC_MSG_RESULT([    YFLAGS  . . . . . . . $YFLAGS])
  AC_MSG_RESULT()
  AC_MSG_RESULT([  Libraries:])
+ AC_MSG_RESULT([    cuda  . . . . . . . . $with_cuda])
  AC_MSG_RESULT([    intel mic . . . . . . $with_mic])
  AC_MSG_RESULT([    libaquaero5 . . . . . $with_libaquaero5])
  AC_MSG_RESULT([    libatasmart . . . . . $with_libatasmart])
@@@ -7056,6 -7209,7 +7215,7 @@@ AC_MSG_RESULT([    librouteros . . . . 
  AC_MSG_RESULT([    librrd  . . . . . . . $with_librrd])
  AC_MSG_RESULT([    libsensors  . . . . . $with_libsensors])
  AC_MSG_RESULT([    libsigrok   . . . . . $with_libsigrok])
+ AC_MSG_RESULT([    libssl  . . . . . . . $with_libssl])
  AC_MSG_RESULT([    libstatgrab . . . . . $with_libstatgrab])
  AC_MSG_RESULT([    libtokyotyrant  . . . $with_libtokyotyrant])
  AC_MSG_RESULT([    libudev . . . . . . . $with_libudev])
@@@ -7092,7 -7246,6 +7252,7 @@@ AC_MSG_RESULT([    bind  . . . . . . . 
  AC_MSG_RESULT([    ceph  . . . . . . . . $enable_ceph])
  AC_MSG_RESULT([    cgroups . . . . . . . $enable_cgroups])
  AC_MSG_RESULT([    chrony. . . . . . . . $enable_chrony])
 +AC_MSG_RESULT([    connectivity. . . . . $enable_connectivity])
  AC_MSG_RESULT([    conntrack . . . . . . $enable_conntrack])
  AC_MSG_RESULT([    contextswitch . . . . $enable_contextswitch])
  AC_MSG_RESULT([    cpu . . . . . . . . . $enable_cpu])
@@@ -7118,6 -7271,7 +7278,7 @@@ AC_MSG_RESULT([    filecount . . . . . 
  AC_MSG_RESULT([    fscache . . . . . . . $enable_fscache])
  AC_MSG_RESULT([    gmond . . . . . . . . $enable_gmond])
  AC_MSG_RESULT([    gps . . . . . . . . . $enable_gps])
+ AC_MSG_RESULT([    gpu_nvidia  . . . . . $enable_gpu_nvidia])
  AC_MSG_RESULT([    grpc  . . . . . . . . $enable_grpc])
  AC_MSG_RESULT([    hddtemp . . . . . . . $enable_hddtemp])
  AC_MSG_RESULT([    hugepages . . . . . . $enable_hugepages])
@@@ -7171,6 -7325,7 +7332,7 @@@ AC_MSG_RESULT([    openvpn . . . . . . 
  AC_MSG_RESULT([    oracle  . . . . . . . $enable_oracle])
  AC_MSG_RESULT([    ovs_events  . . . . . $enable_ovs_events])
  AC_MSG_RESULT([    ovs_stats . . . . . . $enable_ovs_stats])
+ AC_MSG_RESULT([    pcie_errors . . . . . $enable_pcie_errors])
  AC_MSG_RESULT([    perl  . . . . . . . . $enable_perl])
  AC_MSG_RESULT([    pf  . . . . . . . . . $enable_pf])
  AC_MSG_RESULT([    pinba . . . . . . . . $enable_pinba])
@@@ -7228,6 -7383,7 +7390,7 @@@ AC_MSG_RESULT([    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])
+ AC_MSG_RESULT([    write_stackdriver . . $enable_write_stackdriver])
  AC_MSG_RESULT([    write_tsdb  . . . . . $enable_write_tsdb])
  AC_MSG_RESULT([    xencpu  . . . . . . . $enable_xencpu])
  AC_MSG_RESULT([    xmms  . . . . . . . . $enable_xmms])
@@@ -7245,3 -7401,4 +7408,4 @@@ if test "x$dependency_warning" = "xyes"
  fi
  
  # vim: set fdm=marker sw=2 sts=2 ts=2 et :
diff --combined src/collectd.conf.in
  #@BUILD_PLUGIN_CEPH_TRUE@LoadPlugin ceph
  #@BUILD_PLUGIN_CGROUPS_TRUE@LoadPlugin cgroups
  #@BUILD_PLUGIN_CHRONY_TRUE@LoadPlugin chrony
 +#@BUILD_PLUGIN_CONNECTIVITY_TRUE@LoadPlugin connectivity
  #@BUILD_PLUGIN_CONNTRACK_TRUE@LoadPlugin conntrack
  #@BUILD_PLUGIN_CONTEXTSWITCH_TRUE@LoadPlugin contextswitch
  @BUILD_PLUGIN_CPU_TRUE@@BUILD_PLUGIN_CPU_TRUE@LoadPlugin cpu
  #@BUILD_PLUGIN_ORACLE_TRUE@LoadPlugin oracle
  #@BUILD_PLUGIN_OVS_EVENTS_TRUE@LoadPlugin ovs_events
  #@BUILD_PLUGIN_OVS_STATS_TRUE@LoadPlugin ovs_stats
+ #@BUILD_PLUGIN_PCIE_ERRORS_TRUE@LoadPlugin pcie_errors
  #@BUILD_PLUGIN_PERL_TRUE@LoadPlugin perl
  #@BUILD_PLUGIN_PINBA_TRUE@LoadPlugin pinba
  #@BUILD_PLUGIN_PING_TRUE@LoadPlugin ping
  #@BUILD_PLUGIN_WRITE_REDIS_TRUE@LoadPlugin write_redis
  #@BUILD_PLUGIN_WRITE_RIEMANN_TRUE@LoadPlugin write_riemann
  #@BUILD_PLUGIN_WRITE_SENSU_TRUE@LoadPlugin write_sensu
+ #@BUILD_PLUGIN_WRITE_STACKDRIVER_TRUE@LoadPlugin write_stackdriver
  #@BUILD_PLUGIN_WRITE_TSDB_TRUE@LoadPlugin write_tsdb
  #@BUILD_PLUGIN_XENCPU_TRUE@LoadPlugin xencpu
  #@BUILD_PLUGIN_XMMS_TRUE@LoadPlugin xmms
  #     Timeout "2"
  #</Plugin>
  
 +#<Plugin connectivity>
 +#  Interface eth0
 +#</Plugin>
 +
  #<Plugin cgroups>
  #  CGroup "libvirt"
  #  IgnoreSelected false
  #  PauseConnect 5
  #</Plugin>
  
+ #<Plugin gpu_nvidia>
+ #   GPUIndex 0
+ #   GPUIndex 2
+ #   IgnoreSelected false
+ #</Plugin>
  #<Plugin grpc>
  #     <Server "example.com" "50051">
  #             EnableSSL true
  #  Bridges "br0" "br_ext"
  #</Plugin>
  
+ #<Plugin pcie_errors>
+ #  Source "sysfs"
+ #  ReportMasked false
+ #  PersistentNotifications false
+ #</Plugin>
  #<Plugin perl>
  #     IncludeDir "/my/include/path"
  #     BaseName "Collectd::Plugins"
  #   <Node example>
  #      Host "redis.example.com"
  #      Port "6379"
+ #      #Socket "/var/run/redis/redis.sock"
  #      Timeout 2000
  #      <Query "LLEN myqueue">
  #        #Database 0
  #             CollectMemory true
  #             CollectDF true
  #             CollectDisk true
+ #             CollectHealth true
  #     </Router>
  #</Plugin>
  
  #     Attribute "foo" "bar"
  #</Plugin>
  
+ #<Plugin write_stackdriver>
+ #  Project "stackdriver-account"
+ #  CredentialFile "/path/to/gcp-project-id-12345.json"
+ #  Email "123456789012@developer.gserviceaccount.com"
+ #  <Resource "global">
+ #    Label "project_id" "gcp-project-id"
+ #  </Resource>
+ #  Url "https://monitoring.googleapis.com/v3"
+ #</Plugin>
  #<Plugin write_tsdb>
  #     <Node>
  #             Host "localhost"
diff --combined src/collectd.conf.pod
@@@ -1574,47 -1574,6 +1574,47 @@@ Connection timeout in seconds. Default
  
  =back
  
 +=head2 Plugin Connectivity
 +
 +connectivity - Documentation of collectd's C<connectivity plugin>
 +
 +
 +  LoadPlugin connectivity
 +  # ...
 +  <Plugin connectivity>
 +    Interface eth0
 +  </Plugin>
 +
 +The C<connectivity plugin> queries interface status using netlink (man 7 netlink) which provides information about network interfaces via the NETLINK_ROUTE family (man 7 rtnetlink). The plugin translates the value it receives to collectd's internal format and, depending on the write plugins you have loaded, it may be written to disk or submitted to another instance.
 +The plugin listens to interfaces enumerated within the plugin configuration (see below).  If no interfaces are listed, then the default is for all interfaces to be monitored.
 +
 +This example shows C<connectivity plugin> monitoring all interfaces.
 +LoadPlugin connectivity
 +<Plugin connectivity>
 +</Plugin>
 +
 +This example shows C<connectivity plugin> monitoring 2 interfaces, "eth0" and "eth1".
 +LoadPlugin connectivity
 +<Plugin connectivity>
 +  Interface eth0
 +  Interface eth1
 +</Plugin>
 +
 +This example shows C<connectivity plugin> monitoring all interfaces except "eth1".
 +LoadPlugin connectivity
 +<Plugin connectivity>
 +  Interface eth1
 +  IgnoreSelected true
 +</Plugin>
 +
 +=over 4
 +
 +=item B<Interface> I<interface_name>
 +
 +interface(s) to monitor connect to. 
 +
 +=back
 +
  =head2 Plugin C<conntrack>
  
  This plugin collects IP conntrack statistics.
@@@ -1703,6 -1662,10 +1703,10 @@@ installed) to get the current CPU frequ
  sure B<cpufreqd> (L<http://cpufreqd.sourceforge.net/>) or a similar tool is
  installed and an "cpu governor" (that's a kernel module) is loaded.
  
+ If the system has the I<cpufreq-stats> kernel module loaded, this plugin reports
+ the rate of p-state (cpu frequency) transitions and the percentage of time spent
+ in each p-state.
  =head2 Plugin C<cpusleep>
  
  This plugin doesn't have any options. It reads CLOCK_BOOTTIME and
@@@ -1949,6 -1912,11 +1953,11 @@@ plugin below on how matches are defined
  B<MeasureResponseCode> options are set to B<true>, B<Match> blocks are
  optional.
  
+ =item B<Interval> I<Interval>
+ Sets the interval (in seconds) in which the values will be collected from this
+ URL. By default the global B<Interval> setting will be used.
  =item B<Timeout> I<Milliseconds>
  
  The B<Timeout> option sets the overall timeout for HTTP requests to B<URL>, in
@@@ -2145,6 -2113,11 +2154,11 @@@ Use I<Instance> as the plugin instance 
  May be overridden by B<PluginInstanceFrom> option inside B<XPath> blocks.
  Defaults to an empty string (no plugin instance).
  
+ =item B<Interval> I<Interval>
+ Sets the interval (in seconds) in which the values will be collected from this
+ URL. By default the global B<Interval> setting will be used.
  =item B<Namespace> I<Prefix> I<URL>
  
  If an XPath expression references namespaces, they must be specified
@@@ -3237,6 -3210,30 +3251,30 @@@ Pause to apply between attempts of conn
  
  =back
  
+ =head2 Plugin C<gpu_nvidia>
+ Efficiently collects various statistics from the system's NVIDIA GPUs using the
+ NVML library. Currently collected are fan speed, core temperature, percent
+ load, percent memory used, compute and memory frequencies, and power
+ consumption.
+ =over 4
+ =item B<GPUIndex>
+ If one or more of these options is specified, only GPUs at that index (as
+ determined by nvidia-utils through I<nvidia-smi>) have statistics collected.
+ If no instance of this option is specified, all GPUs are monitored.
+ =item B<IgnoreSelected>
+ If set to true, all detected GPUs B<except> the ones at indices specified by
+ B<GPUIndex> entries are collected. For greater clarity, setting IgnoreSelected
+ without any GPUIndex directives will result in B<no> statistics being
+ collected.
+ =back
  =head2 Plugin C<grpc>
  
  The I<grpc> plugin provides an RPC interface to submit values to or query
@@@ -6312,6 -6309,52 +6350,52 @@@ Default: empty (monitor all bridges
  
  =back
  
+ =head2 Plugin C<pcie_errors>
+ The I<pcie_errors> plugin collects PCI Express errors from Device Status in Capability
+ structure and from Advanced Error Reporting Extended Capability where available.
+ At every read it polls config space of PCI Express devices and dispatches
+ notification for every error that is set. It checks for new errors at every read.
+ The device is indicated in plugin_instance according to format "domain:bus:dev.fn".
+ Errors are divided into categories indicated by type_instance: "correctable", and
+ for uncorrectable errors "non_fatal" or "fatal".
+ Fatal errors are reported as I<NOTIF_FAILURE> and all others as I<NOTIF_WARNING>.
+ B<Synopsis:>
+   <Plugin "pcie_errors">
+     Source "sysfs"
+     AccessDir "/sys/bus/pci"
+     ReportMasked false
+     PersistentNotifications false
+   </Plugin>
+ B<Options:>
+ =over 4
+ =item B<Source> B<sysfs>|B<proc>
+ Use B<sysfs> or B<proc> to read data from /sysfs or /proc.
+ The default value is B<sysfs>.
+ =item B<AccessDir> I<dir>
+ Directory used to access device config space. It is optional and defaults to
+ /sys/bus/pci for B<sysfs> and to /proc/bus/pci for B<proc>.
+ =item B<ReportMasked> B<false>|B<true>
+ If true plugin will notify about errors that are set to masked in Error Mask register.
+ Such errors are not reported to the PCI Express Root Complex. Defaults to B<false>.
+ =item B<PersistentNotifications> B<false>|B<true>
+ If false plugin will dispatch notification only on set/clear of error.
+ The ones already reported will be ignored. Defaults to B<false>.
+ =back
  =head2 Plugin C<perl>
  
  This plugin embeds a Perl-interpreter into collectd and provides an interface
@@@ -7264,6 -7307,7 +7348,7 @@@ multiple routers
        CollectRegistrationTable true
        CollectDF true
        CollectDisk true
+       CollectHealth true
      </Router>
    </Plugin>
  
@@@ -7324,6 -7368,12 +7409,12 @@@ Defaults to B<false>
  When enabled, the number of sectors written and bad blocks will be collected.
  Defaults to B<false>.
  
+ =item B<CollectHealth> B<true>|B<false>
+ When enabled, the health statistics will be collected. This includes the
+ voltage and temperature on supported hardware.
+ Defaults to B<false>.
  =back
  
  =head2 Plugin C<redis>
@@@ -7337,6 -7387,7 +7428,7 @@@ parameters and set of user-defined quer
      <Node "example">
          Host "localhost"
          Port "6379"
+         #Socket "/var/run/redis/redis.sock"
          Timeout 2000
          ReportCommandStats false
          ReportCpuUsage true
@@@ -7370,6 -7421,11 +7462,11 @@@ The B<Port> option is the TCP port on w
  connections. Either a service name of a port number may be given. Please note
  that numerical port numbers must be given as a string, too.
  
+ =item B<Socket> I<Path>
+ Connect to Redis using the UNIX domain socket at I<Path>. If this
+ setting is given, the B<Hostname> and B<Port> settings are ignored.
  =item B<Password> I<Password>
  
  Use I<Password> to authenticate when connecting to I<Redis>.
@@@ -8480,13 -8536,14 +8577,14 @@@ B<Synopsis:
     <Metric "snort-dropped">
         Type "percent"
         Instance "dropped"
-        Index 1
+        ValueFrom 1
     </Metric>
     <File "/var/log/snort/snort.stats">
         Plugin "snortstats"
         Instance "eth0"
         Interval 600
         Collect "snort-dropped"
+        #TimeFrom 0
     </File>
   </Plugin>
  
@@@ -8808,6 -8865,33 +8906,33 @@@ dynamic number assigned by the kernel. 
  if there is only one package and C<pkgE<lt>nE<gt>-coreE<lt>mE<gt>> if there is
  more than one, where I<n> is the n-th core of package I<m>.
  
+ =item B<RestoreAffinityPolicy> I<AllCPUs>|I<Restore>
+ Reading data from CPU has side-effect: collectd process's CPU affinity mask
+ changes. After reading data is completed, affinity mask needs to be restored.
+ This option allows to set restore policy.
+ B<AllCPUs> (the default): Restore the affinity by setting affinity to any/all
+ CPUs.
+ B<Restore>: Save affinity using sched_getaffinity() before reading data and
+ restore it after.
+ On some systems, sched_getaffinity() will fail due to inconsistency of the CPU
+ set size between userspace and kernel. In these cases plugin will detect the
+ unsuccessful call and fail with an error, preventing data collection.
+ Most of configurations does not need to save affinity as Collectd process is
+ allowed to run on any/all available CPUs.
+ If you need to save and restore affinity and get errors like 'Unable to save
+ the CPU affinity', setting 'possible_cpus' kernel boot option may also help.
+ See following links for details:
+ L<https://github.com/collectd/collectd/issues/1593>
+ L<https://sourceware.org/bugzilla/show_bug.cgi?id=15630>
+ L<https://bugzilla.kernel.org/show_bug.cgi?id=151821>
  =back
  
  =head2 Plugin C<unixsock>
@@@ -9077,6 -9161,40 +9202,40 @@@ only on the host system
  
  Only I<Connection> is required.
  
+ Consider the following example config:
+  <Plugin "virt">
+    Connection "qemu:///system"
+    HostnameFormat "hostname"
+    InterfaceFormat "address"
+    PluginInstanceFormat "name"
+  </Plugin>
+ It will generate the following values:
+   node42.example.com/virt-instance-0006f26c/disk_octets-vda
+   node42.example.com/virt-instance-0006f26c/disk_ops-vda
+   node42.example.com/virt-instance-0006f26c/if_dropped-ca:fe:ca:fe:ca:fe
+   node42.example.com/virt-instance-0006f26c/if_errors-ca:fe:ca:fe:ca:fe
+   node42.example.com/virt-instance-0006f26c/if_octets-ca:fe:ca:fe:ca:fe
+   node42.example.com/virt-instance-0006f26c/if_packets-ca:fe:ca:fe:ca:fe
+   node42.example.com/virt-instance-0006f26c/memory-actual_balloon
+   node42.example.com/virt-instance-0006f26c/memory-available
+   node42.example.com/virt-instance-0006f26c/memory-last_update
+   node42.example.com/virt-instance-0006f26c/memory-major_fault
+   node42.example.com/virt-instance-0006f26c/memory-minor_fault
+   node42.example.com/virt-instance-0006f26c/memory-rss
+   node42.example.com/virt-instance-0006f26c/memory-swap_in
+   node42.example.com/virt-instance-0006f26c/memory-swap_out
+   node42.example.com/virt-instance-0006f26c/memory-total
+   node42.example.com/virt-instance-0006f26c/memory-unused
+   node42.example.com/virt-instance-0006f26c/memory-usable
+   node42.example.com/virt-instance-0006f26c/virt_cpu_total
+   node42.example.com/virt-instance-0006f26c/virt_vcpu-0
+ You can get information on the metric's units from the online libvirt documentation.
+ For instance, I<virt_cpu_total> is in nanoseconds.
  =over 4
  
  =item B<Connection> I<uri>
@@@ -9179,7 -9297,8 +9338,8 @@@ B<uuid> means use the guest's UUID. Thi
  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.
+ useful on its own because all guests will appear to have the same name. This is
+ useful in conjunction with B<PluginInstanceFormat> though.
  
  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
@@@ -9325,6 -9444,7 +9485,7 @@@ Synopsis
       Protocol "tcp"
       LogSendErrors true
       Prefix "collectd"
+      UseTags false
     </Node>
   </Plugin>
  
@@@ -9362,13 -9482,20 +9523,20 @@@ approach and logging errors fills syslo
  
  =item B<Prefix> I<String>
  
- When set, I<String> is added in front of the host name. Dots and whitespace are
- I<not> escaped in this string (see B<EscapeCharacter> below).
+ When B<UseTags> is I<false>, B<Prefix> value is added in front of the host name.
+ When B<UseTags> is I<true>, B<Prefix> value is added in front of series name.
+ Dots and whitespace are I<not> escaped in this string (see B<EscapeCharacter>
+ below).
  
  =item B<Postfix> I<String>
  
- When set, I<String> is appended to the host name. Dots and whitespace are
- I<not> escaped in this string (see B<EscapeCharacter> below).
+ When B<UseTags> is I<false>, B<Postfix> value appended to the host name.
+ When B<UseTags> is I<true>, B<Postgix> value appended to the end of series name
+ (before the first ; that separates the name from the tags).
+ Dots and whitespace are I<not> escaped in this string (see B<EscapeCharacter>
+ below).
  
  =item B<EscapeCharacter> I<Char>
  
@@@ -9390,6 -9517,8 +9558,8 @@@ path component, for example C<host.cpu.
  default), the plugin and plugin instance (and likewise the type and type
  instance) are put into one component, for example C<host.cpu-0.cpu-idle>.
  
+ Option value is not used when B<UseTags> is I<true>.
  =item B<AlwaysAppendDS> B<false>|B<true>
  
  If set to B<true>, append the name of the I<Data Source> (DS) to the "metric"
@@@ -9402,12 -9531,31 +9572,31 @@@ If set to B<false> (the default) the C<
  I<EscapeCharacter>. Otherwise, if set to B<true>, the C<.> (dot) character
  is preserved, i.e. passed through.
  
+ Option value is not used when B<UseTags> is I<true>.
  =item B<DropDuplicateFields> B<false>|B<true>
  
  If set to B<true>, detect and remove duplicate components in Graphite metric
  names. For example, the metric name  C<host.load.load.shortterm> will
  be shortened to C<host.load.shortterm>.
  
+ =item B<UseTags> B<false>|B<true>
+ If set to B<true>, Graphite metric names will be generated as tagged series.
+ This allows for much more flexibility than the traditional hierarchical layout.
+ Example:
+ C<test.single;host=example.com;plugin=test;plugin_instance=foo;type=single;type_instance=bar>
+ You can use B<Postfix> option to add more tags by specifying it like
+ C<;tag1=value1;tag2=value2>. Note what tagging support was added since Graphite
+ version 1.1.x.
+ If set to B<true>, the B<SeparateInstances> and B<PreserveSeparator> settings
+ are not used.
+ Default value: B<false>.
  =back
  
  =head2 Plugin C<write_log>
@@@ -9576,6 -9724,13 +9765,13 @@@ B<Options:
  
  =over 4
  
+ =item B<Host> I<Host>
+ Bind to the hostname / address I<Host>. By default, the plugin will bind to the
+ "any" address, i.e. accept packets sent to any of the hosts addresses.
+ This option is supported only for libmicrohttpd newer than 0.9.0.
  =item B<Port> I<Port>
  
  Port the embedded webserver should listen on. Defaults to B<9103>.
@@@ -9833,17 -9988,26 +10029,26 @@@ been set to B<JSON>
  =item B<GraphitePrefix> (B<Format>=I<Graphite> only)
  
  A prefix can be added in the metric name when outputting in the I<Graphite>
- format. It's added before the I<Host> name.
+ format.
+ When B<GraphiteUseTags> is I<false>, prefix is added before the I<Host> name.
  Metric name will be
  C<E<lt>prefixE<gt>E<lt>hostE<gt>E<lt>postfixE<gt>E<lt>pluginE<gt>E<lt>typeE<gt>E<lt>nameE<gt>>
  
+ When B<GraphiteUseTags> is I<true>, prefix is added in front of series name.
  =item B<GraphitePostfix> (B<Format>=I<Graphite> only)
  
  A postfix can be added in the metric name when outputting in the I<Graphite>
- format. It's added after the I<Host> name.
+ format.
+ When B<GraphiteUseTags> is I<false>, postfix is added after the I<Host> name.
  Metric name will be
  C<E<lt>prefixE<gt>E<lt>hostE<gt>E<lt>postfixE<gt>E<lt>pluginE<gt>E<lt>typeE<gt>E<lt>nameE<gt>>
  
+ When B<GraphiteUseTags> is I<true>, prefix value appended to the end of series
+ name (before the first ; that separates the name from the tags).
  =item B<GraphiteEscapeChar> (B<Format>=I<Graphite> only)
  
  Specify a character to replace dots (.) in the host part of the metric name.
@@@ -9858,6 -10022,8 +10063,8 @@@ path component, for example C<host.cpu.
  default), the plugin and plugin instance (and likewise the type and type
  instance) are put into one component, for example C<host.cpu-0.cpu-idle>.
  
+ Option value is not used when B<GraphiteUseTags> is I<true>.
  =item B<GraphiteAlwaysAppendDS> B<true>|B<false>
  
  If set to B<true>, append the name of the I<Data Source> (DS) to the "metric"
@@@ -9870,6 -10036,14 +10077,14 @@@ If set to B<false> (the default) the C<
  I<GraphiteEscapeChar>. Otherwise, if set to B<true>, the C<.> (dot) character
  is preserved, i.e. passed through.
  
+ Option value is not used when B<GraphiteUseTags> is I<true>.
+ =item B<GraphiteUseTags> B<false>|B<true>
+ If set to B<true> Graphite metric names will be generated as tagged series.
+ Default value: B<false>.
  =item B<StoreRates> B<true>|B<false>
  
  If set to B<true> (the default), convert counter values to rates. If set to
@@@ -10230,6 -10404,133 +10445,133 @@@ attribute for each metric being sent ou
  
  =back
  
+ =head2 Plugin C<write_stackdriver>
+ The C<write_stackdriver> plugin writes metrics to the
+ I<Google Stackdriver Monitoring> service.
+ This plugin supports two authentication methods: When configured, credentials
+ are read from the JSON credentials file specified with B<CredentialFile>.
+ Alternatively, when running on
+ I<Google Compute Engine> (GCE), an I<OAuth> token is retrieved from the
+ I<metadata server> and used to authenticate to GCM.
+ B<Synopsis:>
+  <Plugin write_stackdriver>
+    CredentialFile "/path/to/service_account.json"
+    <Resource "global">
+      Label "project_id" "monitored_project"
+    </Resource>
+  </Plugin>
+ =over 4
+ =item B<CredentialFile> I<file>
+ Path to a JSON credentials file holding the credentials for a GCP service
+ account.
+ If B<CredentialFile> is not specified, the plugin uses I<Application Default
+ Credentials>. That means which credentials are used depends on the environment:
+ =over 4
+ =item
+ The environment variable C<GOOGLE_APPLICATION_CREDENTIALS> is checked. If this
+ variable is specified it should point to a JSON file that defines the
+ credentials.
+ =item
+ The path C<${HOME}/.config/gcloud/application_default_credentials.json> is
+ checked. This where credentials used by the I<gcloud> command line utility are
+ stored. You can use C<gcloud auth application-default login> to create these
+ credentials.
+ Please note that these credentials are often of your personal account, not a
+ service account, and are therefore unfit to be used in a production
+ environment.
+ =item
+ When running on GCE, the built-in service account associated with the virtual
+ machine instance is used.
+ See also the B<Email> option below.
+ =back
+ =item B<Project> I<Project>
+ The I<Project ID> or the I<Project Number> of the I<Stackdriver Account>. The
+ I<Project ID> is a string identifying the GCP project, which you can chose
+ freely when creating a new project. The I<Project Number> is a 12-digit decimal
+ number. You can look up both on the I<Developer Console>.
+ This setting is optional. If not set, the project ID is read from the
+ credentials file or determined from the GCE's metadata service.
+ =item B<Email> I<Email> (GCE only)
+ Choses the GCE I<Service Account> used for authentication.
+ Each GCE instance has a C<default> I<Service Account> but may also be
+ associated with additional I<Service Accounts>. This is often used to restrict
+ the permissions of services running on the GCE instance to the required
+ minimum. The I<write_stackdriver plugin> requires the
+ C<https://www.googleapis.com/auth/monitoring> scope. When multiple I<Service
+ Accounts> are available, this option selects which one is used by
+ I<write_stackdriver plugin>.
+ =item B<Resource> I<ResourceType>
+ Configures the I<Monitored Resource> to use when storing metrics.
+ More information on I<Monitored Resources> and I<Monitored Resource Types> are
+ available at L<https://cloud.google.com/monitoring/api/resources>.
+ This block takes one string argument, the I<ResourceType>. Inside the block are
+ one or more B<Label> options which configure the resource labels.
+ This block is optional. The default value depends on the runtime environment:
+ on GCE, the C<gce_instance> resource type is used, otherwise the C<global>
+ resource type ist used:
+ =over 4
+ =item
+ B<On GCE>, defaults to the equivalent of this config:
+   <Resource "gce_instance">
+     Label "project_id" "<project_id>"
+     Label "instance_id" "<instance_id>"
+     Label "zone" "<zone>"
+   </Resource>
+ The values for I<project_id>, I<instance_id> and I<zone> are read from the GCE
+ metadata service.
+ =item
+ B<Elsewhere>, i.e. not on GCE, defaults to the equivalent of this config:
+   <Resource "global">
+     Label "project_id" "<Project>"
+   </Resource>
+ Where I<Project> refers to the value of the B<Project> option or the project ID
+ inferred from the B<CredentialFile>.
+ =back
+ =item B<Url> I<Url>
+ URL of the I<Stackdriver Monitoring> API. Defaults to
+ C<https://monitoring.googleapis.com/v3>.
+ =back
  =head2 Plugin C<xencpu>
  
  This plugin collects metrics of hardware CPU load for machine running Xen