Merge branch 'master' into procevent
authorAndrew Bays <andrew.bays@gmail.com>
Mon, 22 Oct 2018 18:34:43 +0000 (14:34 -0400)
committerGitHub <noreply@github.com>
Mon, 22 Oct 2018 18:34:43 +0000 (14:34 -0400)
1  2 
AUTHORS
Makefile.am
README
configure.ac
contrib/redhat/collectd.spec
src/collectd.conf.in
src/collectd.conf.pod

diff --combined AUTHORS
+++ b/AUTHORS
@@@ -56,12 -56,12 +56,15 @@@ Amit Gupta <amit.gupta221 at gmail.com
  Andreas Henriksson <andreas at fatal.se>
   - libmnl support in the netlink plugin.
  
 +Andrew Bays <abays at redhat.com>
 + - procevent plugin.
 +
  Andy Parkins <andyp at fussylogic.co.uk>
   - battery plugin: sysfs code.
  
+ Andy Smith <ansmith at redhat.com>
+  - AMQP 1.0 plugin.
  Anthony Dewhurst <dewhurst at gmail.com>
   - zfs_arc plugin.
  
@@@ -289,7 -289,7 +292,7 @@@ Scott Sanders <scott at jssjr.com
   - Write-Graphite plugin.
  
  Sebastien Pahl <sebastien.pahl at dotcloud.com>
-  - AMQP plugin.
+  - AMQP 0.9 plugin.
  
  Serhiy Pshyk <serhiyx.pshyk at intel.com>
   - intel_pmu plugin
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 \
@@@ -61,6 -70,7 +70,7 @@@ EXTRA_DIST = 
        src/types.db \
        src/types.db.pod \
        src/valgrind.FreeBSD.suppress \
+       src/valgrind.suppress \
        testwrapper.sh \
        version-gen.sh
  
@@@ -98,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
@@@ -108,6 -124,7 +124,7 @@@ bin_PROGRAMS = 
        collectd-nagios \
        collectd-tg \
        collectdctl
+ endif # BUILD_WIN32
  
  
  noinst_LTLIBRARIES = \
@@@ -141,7 -158,8 +158,8 @@@ check_PROGRAMS = 
        test_utils_subst \
        test_utils_time \
        test_utils_vl_lookup \
-       test_libcollectd_network_parse
+       test_libcollectd_network_parse \
+       test_utils_config_cores
  
  
  TESTS = $(check_PROGRAMS)
  LOG_COMPILER = env VALGRIND="@VALGRIND@" $(abs_srcdir)/testwrapper.sh
  
  
- jardir = $(pkgdatadir)/java
+ jardir = $(cpkgdatadir)/java
  
  pkglib_LTLIBRARIES =
  
@@@ -158,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
@@@ -193,6 -227,7 +227,7 @@@ endi
  
  
  collectd_SOURCES = \
+       src/daemon/cmd.h \
        src/daemon/collectd.c \
        src/daemon/collectd.h \
        src/daemon/configfile.c \
@@@ -235,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
@@@ -246,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
  
@@@ -326,6 -371,11 +371,11 @@@ test_utils_subst_SOURCES = 
        src/daemon/utils_subst.h
  test_utils_subst_LDADD = libplugin_mock.la
  
+ test_utils_config_cores_SOURCES = \
+       src/utils_config_cores_test.c \
+       src/testing.h
+ test_utils_config_cores_LDADD = libplugin_mock.la
  libavltree_la_SOURCES = \
        src/daemon/utils_avltree.c \
        src/daemon/utils_avltree.h
@@@ -483,7 -533,8 +533,8 @@@ libcollectdclient_la_SOURCES = 
        src/libcollectdclient/network.c \
        src/libcollectdclient/network_buffer.c \
        src/libcollectdclient/network_parse.c \
-       src/libcollectdclient/server.c
+       src/libcollectdclient/server.c \
+       src/libcollectdclient/collectd/stdendian.h
  libcollectdclient_la_CPPFLAGS = \
        $(AM_CPPFLAGS) \
        -I$(srcdir)/src/libcollectdclient \
        -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)
@@@ -519,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
@@@ -542,6 -659,20 +659,20 @@@ amqp_la_LIBADD = 
        libformat_json.la
  endif
  
+ if BUILD_PLUGIN_AMQP1
+ pkglib_LTLIBRARIES += amqp1.la
+ amqp1_la_SOURCES = \
+       src/amqp1.c \
+       src/utils_deq.h
+ amqp1_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBQPIDPROTON_CPPFLAGS)
+ amqp1_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBQPIDPROTON_LDFLAGS)
+ amqp1_la_LIBADD = \
+       $(BUILD_WITH_LIBQPIDPROTON_LIBS) \
+       libcmds.la \
+       libformat_graphite.la \
+       libformat_json.la
+ endif
  if BUILD_PLUGIN_APACHE
  pkglib_LTLIBRARIES += apache.la
  apache_la_SOURCES = src/apache.c
@@@ -592,7 -723,7 +723,7 @@@ if BUILD_PLUGIN_BAROMETE
  pkglib_LTLIBRARIES += barometer.la
  barometer_la_SOURCES = src/barometer.c
  barometer_la_LDFLAGS = $(PLUGIN_LDFLAGS)
- barometer_la_LIBADD = -lm
+ barometer_la_LIBADD = -lm $(BUILD_WITH_LIBI2C_LIBS)
  endif
  
  if BUILD_PLUGIN_BATTERY
@@@ -913,7 -1044,10 +1044,10 @@@ endi
  
  if BUILD_PLUGIN_INTEL_PMU
  pkglib_LTLIBRARIES += intel_pmu.la
- intel_pmu_la_SOURCES = src/intel_pmu.c
+ intel_pmu_la_SOURCES = \
+       src/intel_pmu.c \
+       src/utils_config_cores.h \
+       src/utils_config_cores.c
  intel_pmu_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBJEVENTS_CPPFLAGS)
  intel_pmu_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBJEVENTS_LDFLAGS)
  intel_pmu_la_LIBADD = $(BUILD_WITH_LIBJEVENTS_LIBS)
@@@ -921,7 -1055,10 +1055,10 @@@ endi
  
  if BUILD_PLUGIN_INTEL_RDT
  pkglib_LTLIBRARIES += intel_rdt.la
- intel_rdt_la_SOURCES = src/intel_rdt.c
+ intel_rdt_la_SOURCES = \
+       src/intel_rdt.c \
+       src/utils_config_cores.h \
+       src/utils_config_cores.c
  intel_rdt_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBPQOS_CPPFLAGS)
  intel_rdt_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBPQOS_LDFLAGS)
  intel_rdt_la_LIBADD = $(BUILD_WITH_LIBPQOS_LIBS)
@@@ -1012,6 -1149,7 +1149,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
@@@ -1351,6 -1489,24 +1489,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
@@@ -1446,14 -1602,6 +1602,14 @@@ processes_la_LIBADD += libtaskstats.l
  endif
  endif
  
 +if BUILD_PLUGIN_PROCEVENT
 +pkglib_LTLIBRARIES += procevent.la
 +procevent_la_SOURCES = src/procevent.c
 +procevent_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
 +procevent_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
 +procevent_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS) libignorelist.la
 +endif
 +
  if BUILD_PLUGIN_PROTOCOLS
  pkglib_LTLIBRARIES += protocols.la
  protocols_la_SOURCES = src/protocols.c
@@@ -1536,7 -1684,7 +1692,7 @@@ pkglib_LTLIBRARIES += snmp.l
  snmp_la_SOURCES = src/snmp.c
  snmp_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBNETSNMP_CPPFLAGS)
  snmp_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBNETSNMP_LDFLAGS)
- snmp_la_LIBADD = $(BUILD_WITH_LIBNETSNMP_LIBS)
+ snmp_la_LIBADD = libignorelist.la $(BUILD_WITH_LIBNETSNMP_LIBS)
  endif
  
  if BUILD_PLUGIN_SNMP_AGENT
@@@ -1545,6 -1693,23 +1701,23 @@@ snmp_agent_la_SOURCES = src/snmp_agent.
  snmp_agent_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBNETSNMPAGENT_CPPFLAGS)
  snmp_agent_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBNETSNMPAGENT_LDFLAGS)
  snmp_agent_la_LIBADD = $(BUILD_WITH_LIBNETSNMPAGENT_LIBS)
+ test_plugin_snmp_agent_SOURCES = src/snmp_agent_test.c \
+                                  src/daemon/utils_avltree.c \
+                                  src/daemon/utils_llist.c \
+                                  src/daemon/configfile.c \
+                                  src/daemon/types_list.c
+ test_plugin_snmp_agent_CPPFLAGS = $(AM_CPPFLAGS) \
+       $(BUILD_WITH_LIBNETSNMPAGENT_CPPFLAGS)
+ test_plugin_snmp_agent_LDFLAGS = $(PLUGIN_LDFLAGS) \
+       $(BUILD_WITH_LIBNETSNMPAGENT_LDFLAGS)
+ test_plugin_snmp_agent_LDADD = liboconfig.la libplugin_mock.la \
+       $(BUILD_WITH_LIBNETSNMPAGENT_LIBS) $(BUILD_WITH_LIBNETSNMP_LIBS)
+ check_PROGRAMS += test_plugin_snmp_agent
+ TESTS += test_plugin_snmp_agent
  endif
  
  if BUILD_PLUGIN_STATSD
@@@ -1766,18 -1931,15 +1939,15 @@@ virt_la_CFLAGS = $(AM_CFLAGS) 
  virt_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  virt_la_LIBADD = libignorelist.la $(BUILD_WITH_LIBVIRT_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
  
- # TODO: enable once we support only modern libvirts which depends on libnl-3
- # the libvirt on wheezy is linked in libnl v1, and there is a small leak here,
- # triggered by the library initialization. There are no means to avoid it,
- # and libvirt switched to libnl3 anyway
- #test_plugin_virt_SOURCES = src/virt_test.c
- #test_plugin_virt_CPPFLAGS = $(AM_CPPFLAGS) \
- #     $(BUILD_WITH_LIBVIRT_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
- #test_plugin_virt_LDFLAGS = $(PLUGIN_LDFLAGS)
- #test_plugin_virt_LDADD = libplugin_mock.la \
- #     $(BUILD_WITH_LIBVIRT_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
- #check_PROGRAMS += test_plugin_virt
- #TESTS += test_plugin_virt
+ test_plugin_virt_SOURCES = src/virt_test.c
+ test_plugin_virt_CPPFLAGS = $(AM_CPPFLAGS) \
+       $(BUILD_WITH_LIBVIRT_CPPFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
+ test_plugin_virt_LDFLAGS = $(PLUGIN_LDFLAGS) \
+       $(BUILD_WITH_LIBVIRT_LDFLAGS) $(BUILD_WITH_LIBXML2_LDFLAGS)
+ test_plugin_virt_LDADD = libplugin_mock.la \
+       $(BUILD_WITH_LIBVIRT_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
+ check_PROGRAMS += test_plugin_virt
+ TESTS += test_plugin_virt
  endif
  
  if BUILD_PLUGIN_VMEM
@@@ -1877,6 -2039,15 +2047,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
@@@ -1992,19 -2163,19 +2171,19 @@@ install-exec-hook
        $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
        if test -e $(DESTDIR)$(sysconfdir)/collectd.conf; \
        then \
-               $(INSTALL) -m 0640 $(srcdir)/src/collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf.pkg-orig; \
+               $(INSTALL) -m 0640 $(builddir)/src/collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf.pkg-orig; \
        else \
-               $(INSTALL) -m 0640 $(srcdir)/src/collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf; \
+               $(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@
  
@@@ -2084,3 -2255,4 +2263,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
@@@ -100,6 -100,9 +100,9 @@@ Feature
        Collect DPDK interface statistics.
        See docs/BUILD.dpdkstat.md for detailed build instructions.
  
+       This plugin should be compiled with compiler defenses enabled, for
+       example -fstack-protector.
      - drbd
        Collect individual drbd resource statistics.
  
        hugepages can be found here:
        https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt.
  
+       This plugin should be compiled with compiler defenses enabled, for
+       example -fstack-protector.
      - intel_pmu
        The intel_pmu plugin reads performance counters provided by the Linux
        kernel perf interface. The plugin uses jevents library to resolve named
        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
      - processes
        Process counts: Number of running, sleeping, zombie, ... processes.
  
 +    - procevent
 +      Listens for process starts and exits via netlink.
 +
      - protocols
        Counts various aspects of network protocols such as IP, TCP, UDP, etc.
  
  
      - amqp
        Sends JSON-encoded data to an Advanced Message Queuing Protocol (AMQP)
-       server, such as RabbitMQ.
+       0.9.1 server, such as RabbitMQ.
+     - amqp1
+       Sends JSON-encoded data to an Advanced Message Queuing Protocol (AMQP)
+       1.0 server, such as Qpid Dispatch Router or Apache Artemis Broker.
  
      - csv
        Write to comma separated values (CSV) files. This needs lots of
@@@ -905,8 -916,14 +919,14 @@@ Prerequisite
      are supported.
      <http://www.python.org/>
  
+   * libqpid-proton (optional)
+     Used by the `amqp1' plugin for AMQP 1.0 connections, for example to
+     Qdrouterd.
+     <http://qpid.apache.org/>
    * librabbitmq (optional; also called “rabbitmq-c”)
-     Used by the `amqp' plugin for AMQP connections, for example to RabbitMQ.
+     Used by the `amqp' plugin for AMQP 0.9.1 connections, for example to
+     RabbitMQ.
      <http://hg.rabbitmq.com/rabbitmq-c/>
  
    * librdkafka (optional; also called “rdkafka”)
@@@ -984,9 -1001,8 +1004,8 @@@ Configuring / Compiling / Installin
  ------------------------------------
  
    To configure, build and install collectd with the default settings, run
-   `./configure && make && make install'.  For detailed, generic instructions
-   see INSTALL. For a complete list of configure options and their description,
-   run `./configure --help'.
+   `./configure && make && make install'.  For a complete list of configure
+   options and their description, run `./configure --help'.
  
    By default, the configure script will check for all build dependencies and
    disable all plugins whose requirements cannot be fulfilled (any other plugin
@@@ -1028,6 -1044,37 +1047,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 \
  AC_FUNC_STRERROR_R
  
  SAVE_CFLAGS="$CFLAGS"
- # Emulate behavior of src/Makefile.am
- if test "x$GCC" = "xyes"; then
-   CFLAGS="$CFLAGS -Wall -Werror"
+ CFLAGS="-Wall -Werror"
+ 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],
@@@ -842,6 -857,7 +857,7 @@@ if test "x$c_cv_have_strtok_r_default" 
  fi
  
  CFLAGS="$SAVE_CFLAGS"
+ LDFLAGS="$SAVE_LDFLAGS"
  if test "x$c_cv_have_strtok_r_reentrant" = "xyes"; then
    CFLAGS="$CFLAGS -D_REENTRANT=1"
  fi
@@@ -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],
@@@ -1567,7 -1589,7 +1589,7 @@@ if test "x$have_getmntent" = "xlibc"; t
                struct mntent *me;
                fh = setmntent ("/etc/mtab", "r");
                me = getmntent (fh);
-               return(me->mnt_passno);
+               return me->mnt_passno;
              ]]
            )
          ],
                int status;
                fh = fopen ("/etc/mnttab", "r");
                status = getmntent (fh, &mt);
-               return(status);
+               return status;
              ]]
            )
          ],
  
  # libi2c-dev
  if test "x$ac_system" = "xLinux"; then
+   with_libi2c_libs=""
+   AC_CHECK_HEADERS([i2c/smbus.h],
+     [with_libi2c_libs="-li2c"]
+   )
    AC_CHECK_DECL([i2c_smbus_read_i2c_block_data],
      [with_libi2c="yes"],
      [with_libi2c="no (symbol i2c_smbus_read_i2c_block_data not found - have you installed libi2c-dev ?)"],
      [[
        #include <stdlib.h>
        #include <linux/i2c-dev.h>
+       #if HAVE_I2C_SMBUS_H
+       # include <i2c/smbus.h>
+       #endif
      ]]
    )
+   BUILD_WITH_LIBI2C_LIBS="$with_libi2c_libs"
+   AC_SUBST([BUILD_WITH_LIBI2C_LIBS])
  else
    with_libi2c="no (Linux only)"
  fi
  
  AC_SUBST(BUILD_WITH_LIBCURL_CFLAGS)
  AC_SUBST(BUILD_WITH_LIBCURL_LIBS)
+ AM_CONDITIONAL([BUILD_WITH_LIBCURL], [test "x$with_libcurl" = "xyes"])
  # }}}
  
  # --with-libdbi {{{
            PKG_CHECK_MODULES([LUA], [lua5.3],
              [with_liblua="yes"],
              [
-               PKG_CHECK_MODULES([LUA], [lua-5.2],
+               PKG_CHECK_MODULES([LUA], [lua53],
                  [with_liblua="yes"],
                  [
-                   PKG_CHECK_MODULES([LUA], [lua5.2],
+                   PKG_CHECK_MODULES([LUA], [lua-5.2],
                      [with_liblua="yes"],
                      [
-                       PKG_CHECK_MODULES([LUA], [lua-5.1],
+                       PKG_CHECK_MODULES([LUA], [lua5.2],
                          [with_liblua="yes"],
                          [
-                           PKG_CHECK_MODULES([LUA], [lua5.1],
+                           PKG_CHECK_MODULES([LUA], [lua52],
                              [with_liblua="yes"],
-                             [with_liblua="no (pkg-config cannot find liblua)"]
+                             [
+                               PKG_CHECK_MODULES([LUA], [lua-5.1],
+                                 [with_liblua="yes"],
+                                 [
+                                   PKG_CHECK_MODULES([LUA], [lua5.1],
+                                     [with_liblua="yes"],
+                                     [
+                                       PKG_CHECK_MODULES([LUA], [lua51],
+                                         [with_liblua="yes"],
+                                         [with_liblua="no (pkg-config cannot find liblua)"]
+                                       )
+                                     ]
+                                   )
+                                 ]
+                               )
+                             ]
                            )
                          ]
                        )
@@@ -3660,6 -3708,18 +3708,18 @@@ if test "x$with_libmnl" = "xyes"; the
      [[#include <linux/if_link.h>]]
    )
  
+   AC_CHECK_MEMBERS([struct rtnl_link_stats.rx_nohandler],
+     [],
+     [],
+     [[#include <linux/if_link.h>]]
+   )
+   AC_CHECK_MEMBERS([struct rtnl_link_stats64.rx_nohandler],
+     [],
+     [],
+     [[#include <linux/if_link.h>]]
+   )
    AC_CHECK_LIB([mnl], [mnl_nlmsg_get_payload],
      [with_libmnl="yes"],
      [with_libmnl="no (symbol 'mnl_nlmsg_get_payload' not found)"],
@@@ -3781,7 -3841,7 +3841,7 @@@ if test "x$with_libnetsnmp" = "xyes"; t
    LDFLAGS="$LDFLAGS $with_libnetsnmp_ldflags"
  
    AC_CHECK_LIB([netsnmp], [init_snmp],
-     [with_libnetsmp="yes"],
+     [with_libnetsnmp="yes"],
      [with_libnetsnmp="no (libnetsnmp not found)"]
    )
  
  fi
  
  if test "x$with_libnetsnmp" = "xyes"; then
+   SAVE_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $with_libnetsnmp_ldflags"
+   AC_CHECK_LIB([netsnmp], [netsnmp_get_version],
+     [with_libnetsnmp="yes"],
+     [with_libnetsnmp="no (couldn't get libnetsnmp version)"]
+   )
+   LDFLAGS="$SAVE_LDFLAGS"
+ fi
+ if test "x$with_libnetsnmp" = "xyes"; then
+   SAVE_CPPFLAGS="$CPPFLAGS"
+   SAVE_LDFLAGS="$LDFLAGS"
+   SAVE_LIBS="$LIBS"
+   CPPFLAGS="$CPPFLAGS $with_libnetsnmp_cppflags -Wall -Werror"
+   LDFLAGS="$LDFLAGS $with_libnetsnmp_ldflags"
+   LIBS="$LIBS -lnetsnmp"
+   AC_CACHE_CHECK([whether netsnmp library has old API],
+     [c_cv_have_netsnmp_old_api],
+     [
+       AC_LINK_IFELSE(
+         [
+           AC_LANG_PROGRAM(
+             [[
+               #include <net-snmp/net-snmp-config.h>
+               #include <net-snmp/net-snmp-includes.h>
+             ]],
+             [[
+               netsnmp_variable_list *key = SNMP_MALLOC_TYPEDEF(netsnmp_variable_list);;
+               int val;
+               u_char type = ASN_INTEGER;
+               snmp_set_var_value(key, &val, sizeof(val));
+               snmp_set_var_typed_value(key, type, &val, sizeof(val));
+               return 0;
+             ]]
+           )
+         ],
+         [c_cv_have_netsnmp_old_api="no"],
+         [c_cv_have_netsnmp_old_api="yes"]
+       )
+     ]
+   )
+   if test "x$c_cv_have_netsnmp_old_api" = "xyes"; then
+     AC_DEFINE([HAVE_NETSNMP_OLD_API], [1],
+               ["Define 1 if you have old netsnmp API]")
+   fi
+   CPPFLAGS="$SAVE_CPPFLAGS"
+   LDFLAGS="$SAVE_LDFLAGS"
+   LIBS="$SAVE_LIBS"
+ fi
+ if test "x$with_libnetsnmp" = "xyes"; then
    BUILD_WITH_LIBNETSNMP_CPPFLAGS="$with_libnetsnmp_cppflags"
    BUILD_WITH_LIBNETSNMP_LDFLAGS="$with_libnetsnmp_ldflags"
    BUILD_WITH_LIBNETSNMP_LIBS="-lnetsnmp"
@@@ -3799,7 -3915,7 +3915,7 @@@ AC_SUBST([BUILD_WITH_LIBNETSNMP_LDFLAGS
  AC_SUBST([BUILD_WITH_LIBNETSNMP_LIBS])
  # }}}
  
- # --with-libnetsmpagent {{{
+ # --with-libnetsnmpagent {{{
  AC_ARG_WITH([libnetsnmpagent],
    [AS_HELP_STRING([--with-libnetsnmpagent@<:@=PREFIX@:>@], [Path to libnetsnmpagent.])],
    [
@@@ -4081,7 -4197,7 +4197,7 @@@ if test "x$with_libpcap" = "xyes"; the
              [[#include <pcap.h>]],
              [[
                int val = PCAP_ERROR_IFACE_NOT_UP;
-               return(val);
+               return val;
              ]]
            )
          ],
@@@ -4686,6 -4802,56 +4802,56 @@@ if test "$with_libpython" != "xno"; the
  fi
  # }}} --with-libpython
  
+ # --with-libqpid_proton {{{
+ AC_ARG_WITH([libqpid_proton],
+   [AS_HELP_STRING([--with-libqpid_proton@<:@=PREFIX@:>@], [Path to libqpid_proton.])],
+   [
+     if test "x$withval" != "xno" && test "x$withval" != "xyes"; then
+       with_libqpid_proton_cppflags="-I$withval/include"
+       with_libqpid_proton_ldflags="-L$withval/lib"
+       with_libqpid_proton="yes"
+     else
+       with_libqpid_proton="$withval"
+     fi
+   ],
+   [with_libqpid_proton="yes"]
+ )
+ if test "x$with_libqpid_proton" = "xyes"; then
+   SAVE_CPPFLAGS="$CPPFLAGS"
+   CPPFLAGS="$CPPFLAGS $with_libqpid_proton_cppflags"
+   AC_CHECK_HEADERS([proton/proactor.h],
+     [with_libqpid_proton="yes"],
+     [with_libqpid_proton="no (proton/proactor.h not found)"]
+   )
+   CPPFLAGS="$SAVE_CPPFLAGS"
+ fi
+ if test "x$with_libqpid_proton" = "xyes"; then
+   SAVE_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $with_libqpid_proton_ldflags"
+   AC_CHECK_LIB([qpid-proton], [pn_connection],
+     [with_libqpid_proton="yes"],
+     [with_libqpid_proton="no (Symbol 'pn_connection' not found)"])
+   LDFLAGS="$SAVE_LDFLAGS"
+ fi
+ if test "x$with_libqpid_proton" = "xyes"; then
+   BUILD_WITH_LIBQPIDPROTON_CPPFLAGS="$with_libqpid_proton_cppflags"
+   BUILD_WITH_LIBQPIDPROTON_LDFLAGS="$with_libqpid_proton_ldflags"
+   BUILD_WITH_LIBQPIDPROTON_LIBS="-lqpid-proton"
+ fi
+ AC_SUBST(BUILD_WITH_LIBQPIDPROTON_CPPFLAGS)
+ AC_SUBST(BUILD_WITH_LIBQPIDPROTON_LDFLAGS)
+ AC_SUBST(BUILD_WITH_LIBQPIDPROTON_LIBS)
+ # }}}
  # --with-librabbitmq {{{
  AC_ARG_WITH([librabbitmq],
    [AS_HELP_STRING([--with-librabbitmq@<:@=PREFIX@:>@], [Path to librabbitmq.])],
@@@ -5070,6 -5236,55 +5236,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.])],
@@@ -5625,6 -5840,7 +5840,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 {{{
@@@ -5756,32 -5972,41 +5972,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`"
@@@ -6146,10 -6380,10 +6380,11 @@@ 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"
 +plugin_procevent="no"
  plugin_protocols="no"
  plugin_python="no"
  plugin_serial="no"
@@@ -6168,6 -6402,7 +6403,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"
@@@ -6224,8 -6459,11 +6460,12 @@@ 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"
 +    plugin_procevent="yes"
    fi
+   if test "x$have_pci_regs_h" = "xyes"; then
+     plugin_pcie_errors="yes"
+   fi
  fi
  
  if test "x$ac_system" = "xOpenBSD"; then
@@@ -6323,6 -6561,10 +6563,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
@@@ -6511,162 -6753,164 +6755,165 @@@ 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([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([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([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([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([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([procevent],           [$plugin_procevent],       [Process event (start, stop) events])
- 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([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
@@@ -6902,6 -7146,7 +7149,7 @@@ AC_MSG_RESULT([    libpqos . . . . . . 
  AC_MSG_RESULT([    libprotobuf . . . . . $with_libprotobuf])
  AC_MSG_RESULT([    libprotobuf-c . . . . $with_libprotobuf_c])
  AC_MSG_RESULT([    libpython . . . . . . $with_libpython])
+ AC_MSG_RESULT([    libqpid-proton .  . . $with_libqpid_proton])
  AC_MSG_RESULT([    librabbitmq . . . . . $with_librabbitmq])
  AC_MSG_RESULT([    libriemann-client . . $with_libriemann_client])
  AC_MSG_RESULT([    librdkafka  . . . . . $with_librdkafka])
@@@ -6909,6 -7154,7 +7157,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])
@@@ -6933,6 -7179,7 +7182,7 @@@ AC_MSG_RESULT(
  AC_MSG_RESULT([  Modules:])
  AC_MSG_RESULT([    aggregation . . . . . $enable_aggregation])
  AC_MSG_RESULT([    amqp    . . . . . . . $enable_amqp])
+ AC_MSG_RESULT([    amqp1   . . . . . . . $enable_amqp1])
  AC_MSG_RESULT([    apache  . . . . . . . $enable_apache])
  AC_MSG_RESULT([    apcups  . . . . . . . $enable_apcups])
  AC_MSG_RESULT([    apple_sensors . . . . $enable_apple_sensors])
@@@ -7022,6 -7269,7 +7272,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])
@@@ -7029,7 -7277,6 +7280,7 @@@ AC_MSG_RESULT([    ping  . . . . . . . 
  AC_MSG_RESULT([    postgresql  . . . . . $enable_postgresql])
  AC_MSG_RESULT([    powerdns  . . . . . . $enable_powerdns])
  AC_MSG_RESULT([    processes . . . . . . $enable_processes])
 +AC_MSG_RESULT([    procevent . . . . . . $enable_procevent])
  AC_MSG_RESULT([    protocols . . . . . . $enable_protocols])
  AC_MSG_RESULT([    python  . . . . . . . $enable_python])
  AC_MSG_RESULT([    redis . . . . . . . . $enable_redis])
@@@ -7080,6 -7327,7 +7331,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])
@@@ -7097,3 -7345,4 +7349,4 @@@ if test "x$dependency_warning" = "xyes"
  fi
  
  # vim: set fdm=marker sw=2 sts=2 ts=2 et :
  %global _hardened_build 1
  %{?perl_default_filter}
  
+ # disable collectd debug by default
+ %bcond_with debug
  # plugins enabled by default
  %define with_aggregation 0%{!?_without_aggregation:1}
  %define with_amqp 0%{!?_without_amqp:1}
+ %define with_amqp1 0%{!?_without_amqp1:1}
  %define with_apache 0%{!?_without_apache:1}
  %define with_apcups 0%{!?_without_apcups:1}
  %define with_ascent 0%{!?_without_ascent:1}
  %define with_postgresql 0%{!?_without_postgresql:1}
  %define with_powerdns 0%{!?_without_powerdns:1}
  %define with_processes 0%{!?_without_processes:1}
 +%define with_procevent 0%{!?_without_procevent:1}
  %define with_protocols 0%{!?_without_protocols:1}
  %define with_python 0%{!?_without_python:1}
  %define with_redis 0%{!?_without_redis:1}
  %define with_mqtt 0
  %define with_ovs_events 0
  %define with_ovs_stats 0
 +%define with_procevent 0
  %define with_redis 0
  %define with_rrdcached 0
  %define with_write_redis 0
  Summary:      Statistics collection and monitoring daemon
  Name:         collectd
  Version:      5.7.1
- Release:      8%{?dist}
+ Release:      9%{?dist}
  URL:          https://collectd.org
  Source:               https://collectd.org/files/%{name}-%{version}.tar.bz2
  License:      GPLv2
@@@ -279,13 -281,24 +283,24 @@@ every 10 seconds by default
  
  %if %{with_amqp}
  %package amqp
- Summary:      AMQP plugin for collectd
+ Summary:      AMQP 0.9 plugin for collectd
  Group:                System Environment/Daemons
  Requires:     %{name}%{?_isa} = %{version}-%{release}
  BuildRequires:        librabbitmq-devel
  %description amqp
- The AMQP plugin transmits or receives values collected by collectd via the
- Advanced Message Queuing Protocol (AMQP).
+ The AMQP 0.9 plugin transmits or receives values collected by collectd via the
+ Advanced Message Queuing Protocol v0.9 (AMQP).
+ %endif
+ %if %{with_amqp1}
+ %package amqp1
+ Summary:      AMQP 1.0 plugin for collectd
+ Group:                System Environment/Daemons
+ Requires:     %{name}%{?_isa} = %{version}-%{release}
+ BuildRequires:        qpid-proton-c-devel
+ %description amqp1
+ The AMQP 1.0 plugin transmits or receives values collected by collectd via the
+ Advanced Message Queuing Protocol v1.0 (AMQP1).
  %endif
  
  %if %{with_apache}
@@@ -760,16 -773,6 +775,16 @@@ The PostgreSQL plugin connects to and e
  database.
  %endif
  
 +%if %{with_procevent}
 +%package procevent
 +Summary:       Processes event plugin for collectd
 +Group:         System Environment/Daemons
 +Requires:      %{name}%{?_isa} = %{version}-%{release}
 +BuildRequires: yajl-devel
 +%description procevent
 +Monitors process starts/stops via netlink library.
 +%endif
 +
  %if %{with_python}
  %package python
  Summary:      Python plugin for collectd
@@@ -1027,6 -1030,12 +1042,12 @@@ Collectd utilitie
  %define _with_amqp --disable-amqp
  %endif
  
+ %if %{with_amqp1}
+ %define _with_amqp1 --enable-amqp1
+ %else
+ %define _with_amqp1 --disable-amqp1
+ %endif
  %if %{with_apache}
  %define _with_apache --enable-apache
  %else
  %if %{with_mcelog}
  %define _with_mcelog --enable-mcelog
  %else
- %define _with_mbmon --disable-mcelog
+ %define _with_mcelog --disable-mcelog
  %endif
  
  %if %{with_md}
  %define _with_processes --disable-processes
  %endif
  
 +%if %{with_procevent}
 +%define _with_procevent --enable-procevent
 +%else
 +%define _with_procevent --disable-procevent
 +%endif
 +
  %if %{with_protocols}
  %define _with_protocols --enable-protocols
  %else
  %define _with_zookeeper --disable-zookeeper
  %endif
  
+ %if %{with debug}
+ %define _feature_debug --enable-debug
+ %else
+ %define _feature_debug --disable-debug
+ %endif
  %configure CFLAGS="%{optflags} -DLT_LAZY_OR_NOW=\"RTLD_LAZY|RTLD_GLOBAL\"" \
        %{?_python_config} \
+       %{?_feature_debug} \
        --disable-static \
        --enable-all-plugins=yes \
        --enable-match_empty_counter \
        --enable-target_v5upgrade \
        %{?_with_aggregation} \
        %{?_with_amqp} \
+       %{?_with_amqp1} \
        %{?_with_apache} \
        %{?_with_apcups} \
        %{?_with_apple_sensors} \
        %{?_with_postgresql} \
        %{?_with_powerdns} \
        %{?_with_processes} \
 +      %{?_with_procevent} \
        %{?_with_protocols} \
        %{?_with_python} \
        %{?_with_redis} \
  %{_libdir}/%{name}/amqp.so
  %endif
  
+ %if %{with_amqp1}
+ %files amqp1
+ %{_libdir}/%{name}/amqp1.so
+ %endif
  %if %{with_apache}
  %files apache
  %{_libdir}/%{name}/apache.so
  %{_libdir}/%{name}/postgresql.so
  %endif
  
 +%if %{with_procevent}
 +%files procevent
 +%{_libdir}/%{name}/procevent.so
 +%endif
 +
  %if %{with_python}
  %files python
  %{_mandir}/man5/collectd-python*
  %doc contrib/
  
  %changelog
+ * Thu Sep 28 2017 Jakub Jankowski <shasta@toxcorp.com> - 5.7.1-9
+ - Fix mbmon/mcelog build options
  * Thu Sep 28 2017 xakru <calvinxakru@gmail.com> - 5.7.1-8
  - Add new libcollectdclient/network_parse
  - Add new libcollectdclient/server
diff --combined src/collectd.conf.in
@@@ -90,6 -90,7 +90,7 @@@
  
  #@BUILD_PLUGIN_AGGREGATION_TRUE@LoadPlugin aggregation
  #@BUILD_PLUGIN_AMQP_TRUE@LoadPlugin amqp
+ #@BUILD_PLUGIN_AMQP1_TRUE@LoadPlugin amqp1
  #@BUILD_PLUGIN_APACHE_TRUE@LoadPlugin apache
  #@BUILD_PLUGIN_APCUPS_TRUE@LoadPlugin apcups
  #@BUILD_PLUGIN_APPLE_SENSORS_TRUE@LoadPlugin apple_sensors
  #@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_POSTGRESQL_TRUE@LoadPlugin postgresql
  #@BUILD_PLUGIN_POWERDNS_TRUE@LoadPlugin powerdns
  #@BUILD_PLUGIN_PROCESSES_TRUE@LoadPlugin processes
 +#@BUILD_PLUGIN_PROCEVENT_TRUE@LoadPlugin procevent
  #@BUILD_PLUGIN_PROTOCOLS_TRUE@LoadPlugin protocols
  #@BUILD_PLUGIN_PYTHON_TRUE@LoadPlugin python
  #@BUILD_PLUGIN_REDIS_TRUE@LoadPlugin redis
  #@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
  #  </Publish>
  #</Plugin>
  
+ #<Plugin amqp1>
+ #  <Transport "name">
+ #    Host "localhost"
+ #    Port "5672"
+ #    User "guest"
+ #    Password "guest"
+ #    Address "collectd"
+ #    RetryDelay 1
+ #    <Instance "log">
+ #        Format JSON
+ #        PreSettle false
+ #    </Instance>
+ #    <Instance "notify">
+ #        Format JSON
+ #        PreSettle true
+ #    </Instance>
+ #    <Instance "telemetry">
+ #        Format JSON
+ #        PreSettle false
+ #    </Instance>
+ #  </Transport>
+ #</Plugin>
  #<Plugin apache>
  #  <Instance "local">
  #    URL "http://localhost/status?auto"
  #    ReportSoftwareEvents true
  #    EventList "/var/cache/pmu/GenuineIntel-6-2D-core.json"
  #    HardwareEvents "L2_RQSTS.CODE_RD_HIT,L2_RQSTS.CODE_RD_MISS" "L2_RQSTS.ALL_CODE_RD"
+ #    Cores "[0-3]"
  #</Plugin>
  
  #<Plugin "intel_rdt">
  #             NotifySensorNotPresent false
  #             NotifyIPMIConnectionState false
  #             SELEnabled false
+ #             SELSensor "some_sensor"
+ #             SELSensor "another_one"
+ #             SELIgnoreSelected false
  #             SELClearEvent false
  #     </Instance>
  #     <Instance "remote">
  #             NotifySensorNotPresent false
  #             NotifyIPMIConnectionState false
  #             SELEnabled false
+ #             SELSensor "some_sensor"
+ #             SELSensor "another_one"
+ #             SELIgnoreSelected false
  #             SELClearEvent false
  #     </Instance>
  #</Plugin>
  #             RegisterType float
  #             Type gauge
  #             Instance "..."
+ #             #Scale 1.0
+ #             #Shift 0.0
  #     </Data>
  #
  #     <Host "name">
  #  Bridges "br0" "br_ext"
  #</Plugin>
  
+ #<Plugin pcie_errors>
+ #  Source "sysfs"
+ #  ReportMasked false
+ #  PersistentNotifications false
+ #</Plugin>
  #<Plugin perl>
  #     IncludeDir "/my/include/path"
  #     BaseName "Collectd::Plugins"
  #     Timeout 0.9
  #     TTL 255
  #     SourceAddress "1.2.3.4"
+ #     AddressFamily "any"
  #     Device "eth0"
  #     MaxMissed -1
  #</Plugin>
  #     </Process>
  #</Plugin>
  
 +#<Plugin "procevent">
 +#  BufferLength 10
 +#  ProcessRegex "/^ovs.*$/" 
 +#  Process tuned
 +#</Plugin>
 +
  #<Plugin protocols>
  #     Value "/^Tcp:/"
  #     IgnoreSelected false
  #   <Node example>
  #      Host "redis.example.com"
  #      Port "6379"
+ #      #Socket "/var/run/redis/redis.sock"
  #      Timeout 2000
+ #      <Query "LLEN myqueue">
+ #        #Database 0
+ #        Type "queue_length"
+ #        Instance "myqueue"
+ #      <Query>
  #   </Node>
  #</Plugin>
  
  #             CollectMemory true
  #             CollectDF true
  #             CollectDisk true
+ #             CollectHealth true
  #     </Router>
  #</Plugin>
  
  
  #<Plugin snmp>
  #   <Data "powerplus_voltge_input">
- #       Type "voltage"
  #       Table false
- #       Instance "input_line1"
+ #       Type "voltage"
+ #       TypeInstance "input_line1"
  #       Values "SNMPv2-SMI::enterprises.6050.5.4.1.1.2.1"
  #   </Data>
  #   <Data "hr_users">
- #       Type "users"
  #       Table false
- #       Instance ""
+ #       Type "users"
+ #       TypeInstance ""
  #       Values "HOST-RESOURCES-MIB::hrSystemNumUsers.0"
  #   </Data>
  #   <Data "std_traffic">
+ #       Table true
  #       Type "if_octets"
+ #       TypeInstanceOID "IF-MIB::ifDescr"
+ #       #TypeInstancePrefix "port"
+ #       Values "IF-MIB::ifInOctets" "IF-MIB::ifOutOctets"
+ #       #FilterOID "IF-MIB::ifOperStatus"
+ #       #FilterValues "1", "2"
+ #   </Data>
+ #   <Data "interface_traffic">
  #       Table true
- #       Instance "IF-MIB::ifDescr"
+ #       Type "if_octets"
+ #       Plugin "interface"
+ #       PluginInstanceOID "IF-MIB::ifDescr"
  #       Values "IF-MIB::ifInOctets" "IF-MIB::ifOutOctets"
  #   </Data>
  #
  #    IndexOID "IF-MIB::ifIndex"
  #    SizeOID "IF-MIB::ifNumber"
  #    <Data "ifDescr">
- #      Instance true
+ #      <IndexKey>
+ #        Source "PluginInstance"
+ #      </IndexKey>
  #      Plugin "interface"
  #      OIDs "IF-MIB::ifDescr"
  #    </Data>
  #     PluginInstanceFormat name
  #     Instances 1
  #     ExtraStats "cpu_util disk disk_err domain_state fs_info job_stats_background pcpu perf vcpupin"
+ #     PersistentNotification false
  #</Plugin>
  
  #<Plugin vmem>
  #     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
@@@ -530,9 -530,9 +530,9 @@@ are disabled by default
  =head2 Plugin C<amqp>
  
  The I<AMQP plugin> can be used to communicate with other instances of
- I<collectd> or third party applications using an AMQP message broker. Values
- are sent to or received from the broker, which handles routing, queueing and
- possibly filtering out messages.
+ I<collectd> or third party applications using an AMQP 0.9.1 message broker.
+ Values are sent to or received from the broker, which handles routing,
queueing and possibly filtering out messages.
  
  B<Synopsis:>
  
@@@ -738,6 -738,171 +738,171 @@@ is preserved, i.e. passed through
  
  =back
  
+ =head2 Plugin C<amqp1>
+ The I<AMQP1 plugin> can be used to communicate with other instances of
+ I<collectd> or third party applications using an AMQP 1.0 message
+ intermediary. Metric values or notifications are sent to the
+ messaging intermediary which may handle direct messaging or
+ queue based transfer.
+ B<Synopsis:>
+  <Plugin "amqp1">
+    # Send values to an AMQP 1.0 intermediary
+   <Transport "name">
+     Host "localhost"
+     Port "5672"
+     User "guest"
+     Password "guest"
+     Address "collectd"
+ #    RetryDelay 1
+     <Instance "some_name">
+         Format "command"
+         PreSettle false
+         Notify false
+  #      StoreRates false
+  #      GraphitePrefix "collectd."
+  #      GraphiteEscapeChar "_"
+  #      GraphiteSeparateInstances false
+  #      GraphiteAlwaysAppendDS false
+  #      GraphitePreserveSeparator false
+     </Instance>
+   </Transport>
+  </Plugin>
+ The plugin's configuration consists of a I<Transport> that configures
+ communications to the AMQP 1.0 messaging bus and one or more I<Instance>
+ corresponding to metric or event publishers to the messaging system.
+ The address in the I<Transport> block concatenated with the name given in the
+ I<Instance> block starting tag will be used as the send-to address for
+ communications over the messaging link.
+ The following options are accepted within each I<Transport> block:
+ =over 4
+ =item B<Host> I<Host>
+ Hostname or IP-address of the AMQP 1.0 intermediary. Defaults to the
+ default behavior of the underlying communications library,
+ I<libqpid-proton>, which is "localhost".
+ =item B<Port> I<Port>
+ Service name or port number on which the AMQP 1.0 intermediary accepts
+ connections. This argument must be a string, even if the numeric form
+ is used. Defaults to "5672".
+ =item B<User> I<User>
+ =item B<Password> I<Password>
+ Credentials used to authenticate to the AMQP 1.0 intermediary. By
+ default "guest"/"guest" is used.
+ =item B<Address> I<Address>
+ This option specifies the prefix for the send-to value in the message.
+ By default, "collectd" will be used.
+ =item B<RetryDelay> I<RetryDelay>
+ When the AMQP1 connection is lost, defines the time in seconds to wait
+ before attempting to reconnect. Defaults to 1, which implies attempt
+ to reconnect at 1 second intervals.
+ =back
+ The following options are accepted within each I<Instance> block:
+ =over 4
+ =item B<Format> B<Command>|B<JSON>|B<Graphite>
+ Selects the format in which messages are sent to the intermediary. If set to
+ B<Command> (the default), values are sent as C<PUTVAL> commands which are
+ identical to the syntax used by the I<Exec> and I<UnixSock plugins>. In this
+ case, the C<Content-Type> header field will be set to C<text/collectd>.
+ If set to B<JSON>, the values are encoded in the I<JavaScript Object Notation>,
+ an easy and straight forward exchange format. The C<Content-Type> header field
+ will be set to C<application/json>.
+ If set to B<Graphite>, values are encoded in the I<Graphite> format, which is
+ "<metric> <value> <timestamp>\n". The C<Content-Type> header field will be set to
+ C<text/graphite>.
+ A subscribing client I<should> use the C<Content-Type> header field to
+ determine how to decode the values.
+ =item B<PreSettle> B<true>|B<false>
+ If set to B<false> (the default), the plugin will wait for a message
+ acknowledgement from the messaging bus before sending the next
+ message. This indicates transfer of ownership to the messaging
+ system. If set to B<true>, the plugin will not wait for a message
+ acknowledgement and the message may be dropped prior to transfer of
+ ownership.
+ =item B<Notify> B<true>|B<false>
+ If set to B<false> (the default), the plugin will service the
+ instance write call back as a value list. If set to B<true> the
+ plugin will service the instance as a write notification callback
+ for alert formatting.
+ =item B<StoreRates> B<true>|B<false>
+ Determines whether or not C<COUNTER>, C<DERIVE> and C<ABSOLUTE> data sources
+ are converted to a I<rate> (i.e. a C<GAUGE> value). If set to B<false> (the
+ default), no conversion is performed. Otherwise the conversion is performed
+ using the internal value cache.
+ Please note that currently this option is only used if the B<Format> option has
+ been set to B<JSON>.
+ =item B<GraphitePrefix>
+ A prefix can be added in the metric name when outputting in the I<Graphite> format.
+ It's added before the I<Host> name.
+ Metric name will be "<prefix><host><postfix><plugin><type><name>"
+ =item B<GraphitePostfix>
+ A postfix can be added in the metric name when outputting in the I<Graphite> format.
+ It's added after the I<Host> name.
+ Metric name will be "<prefix><host><postfix><plugin><type><name>"
+ =item B<GraphiteEscapeChar>
+ Specify a character to replace dots (.) in the host part of the metric name.
+ In I<Graphite> metric name, dots are used as separators between different
+ metric parts (host, plugin, type).
+ Default is "_" (I<Underscore>).
+ =item B<GraphiteSeparateInstances> B<true>|B<false>
+ If set to B<true>, the plugin instance and type instance will be in their own
+ path component, for example C<host.cpu.0.cpu.idle>. If set to B<false> (the
+ 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.
+ =back
  =head2 Plugin C<apache>
  
  To configure the C<apache>-plugin you first need to configure the Apache
@@@ -1497,6 -1662,10 +1662,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
@@@ -1743,6 -1912,11 +1912,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
@@@ -1939,6 -2113,11 +2113,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
@@@ -3182,6 -3361,7 +3361,7 @@@ B<Synopsis:
      ReportSoftwareEvents true
      EventList "/var/cache/pmu/GenuineIntel-6-2D-core.json"
      HardwareEvents "L2_RQSTS.CODE_RD_HIT,L2_RQSTS.CODE_RD_MISS" "L2_RQSTS.ALL_CODE_RD"
+     Cores "0-3" "4,6" "[12-15]"
    </Plugin>
  
  B<Options:>
@@@ -3253,6 -3433,23 +3433,23 @@@ event_download.py script to download ev
  This field is a list of event names or groups of comma separated event names.
  This option requires B<EventList> option to be configured.
  
+ =item B<Cores> I<cores groups>
+ All events are reported on a per core basis. Monitoring of the events can be
+ configured for a 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. If a group is enclosed in square brackets each core is added
+ individually to a separate group (that is statistics are not aggregated).
+ Allowed formats are:
+     0,1,2,3
+     0-10,20-18
+     1,3,5-8,10,0x10-12
+     [4-15,32-63]
+ If an empty string is provided as value for this field default cores
+ configuration is applied - that is separate group is created for each core.
  =back
  
  =head2 Plugin C<intel_rdt>
@@@ -3453,8 -3650,23 +3650,23 @@@ a notification is sent. Defaults to B<f
  
  If system event log (SEL) is enabled, plugin will listen for sensor threshold
  and discrete events. When event is received the notification is sent.
+ SEL event filtering can be configured using B<SELSensor> and B<SELIgnoreSelected>
+ config options.
  Defaults to B<false>.
  
+ =item B<SELSensor> I<SELSensor>
+ Selects sensors to get events from or to ignore, depending on B<SELIgnoreSelected>.
+ See F</"IGNORELISTS"> for details.
+ =item B<SELIgnoreSelected> I<true>|I<false>
+ If no configuration is given, the B<ipmi> plugin will pass events from all
+ sensors. This option enables you to do that: By setting B<SELIgnoreSelected>
+ to I<true> the effect of B<SELSensor> is inverted: All events from selected
+ sensors are ignored and all events from other sensors are passed.
  =item B<SELClearEvent> I<true>|I<false>
  
  If SEL clear event is enabled, plugin will delete event from SEL list after
@@@ -4059,8 -4271,9 +4271,9 @@@ which the sizes of physical memory vary
  
  The B<modbus plugin> connects to a Modbus "slave" via Modbus/TCP or Modbus/RTU and
  reads register values. It supports reading single registers (unsigned 16E<nbsp>bit
- values), large integer values (unsigned 32E<nbsp>bit values) and floating point
- values (two registers interpreted as IEEE floats in big endian notation).
+ values), large integer values (unsigned 32E<nbsp>bit and 64E<nbsp>bit values) and
+ floating point values (two registers interpreted as IEEE floats in big endian
+ notation).
  
  B<Synopsis:>
  
     RegisterCmd ReadHolding
     Type voltage
     Instance "input-1"
+    #Scale 1.0
+    #Shift 0.0
   </Data>
  
   <Data "voltage-input-2">
@@@ -4128,11 -4343,22 +4343,22 @@@ Configures the base register to read fr
  B<RegisterType> has been set to B<Uint32> or B<Float>, this and the next
  register will be read (the register number is increased by one).
  
- =item B<RegisterType> B<Int16>|B<Int32>|B<Uint16>|B<Uint32>|B<Float>
- Specifies what kind of data is returned by the device. If the type is B<Int32>,
- B<Uint32> or B<Float>, two 16E<nbsp>bit registers will be read and the data is
- combined into one value. Defaults to B<Uint16>.
+ =item B<RegisterType> B<Int16>|B<Int32>|B<Int64>|B<Uint16>|B<Uint32>|B<UInt64>|B<Float>|B<Int32LE>|B<Uint32LE>|B<FloatLE>
+ Specifies what kind of data is returned by the device. This defaults to
+ B<Uint16>.  If the type is B<Int32>, B<Int32LE>, B<Uint32>, B<Uint32LE>,
+ B<Float> or B<FloatLE>, two 16E<nbsp>bit registers at B<RegisterBase>
+ and B<RegisterBase+1> will be read and the data is combined into one
+ 32E<nbsp>value. For B<Int32>, B<Uint32> and B<Float> the most significant
+ 16E<nbsp>bits are in the register at B<RegisterBase> and the least
+ significant 16E<nbsp>bits are in the register at B<RegisterBase+1>.
+ For B<Int32LE>, B<Uint32LE>, or B<Float32LE>, the high and low order
+ registers are swapped with the most significant 16E<nbsp>bits in
+ the B<RegisterBase+1> and the least significant 16E<nbsp>bits in
+ B<RegisterBase>. If the type is B<Int64> or B<UInt64>, four 16E<nbsp>bit
+ registers at B<RegisterBase>, B<RegisterBase+1>, B<RegisterBase+2> and
+ B<RegisterBase+3> will be read and the data combined into one
+ 64E<nbsp>value.
  
  =item B<RegisterCmd> B<ReadHolding>|B<ReadInput>
  
@@@ -4147,9 -4373,19 +4373,19 @@@ supported
  
  =item B<Instance> I<Instance>
  
- Sets the type instance to use when dispatching the value to I<collectd>. If
+ Sets the type instance to use when dispatching the value to I<Instance>. If
  unset, an empty string (no type instance) is used.
  
+ =item B<Scale> I<Value>
+ The values taken from device are multiplied by I<Value>. The field is optional
+ and the default is B<1.0>.
+ =item B<Shift> I<Value>
+ I<Value> is added to values from device after they have been multiplied by
+ B<Scale> value. The field is optional and the default value is B<0.0>.
  =back
  
  =item E<lt>B<Host> I<Name>E<gt> blocks
@@@ -5216,6 -5452,12 +5452,12 @@@ behavior is to let the kernel choose th
  that the manual selection of an interface for unicast traffic is only
  necessary in rare cases.
  
+ =item B<BindAddress> I<IP Address>
+ Set the outgoing IP address for IP packets. This option can be used instead of
+ the I<Interface> option to explicitly define the IP address which will be used
+ to send Packets to the remote server. 
  =item B<ResolveInterval> I<Seconds>
  
  Sets the interval at which to re-resolve the DNS for the I<Host>. This is
@@@ -6043,6 -6285,52 +6285,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
@@@ -6177,6 -6465,11 +6465,11 @@@ long string is used so that the packet 
  Sets the source address to use. I<host> may either be a numerical network
  address or a network hostname.
  
+ =item B<AddressFamily> I<af>
+ Sets the address family to use. I<af> may be "any", "ipv4" or "ipv6". This
+ option will be ignored if you set a B<SourceAddress>.
  =item B<Device> I<name>
  
  Sets the outgoing network device to be used. I<name> has to specify an
@@@ -6867,8 -7160,8 +7160,8 @@@ B<Synopsis:
     </Process>
     <ProcessMatch "name" "regex">
       CollectFileDescriptor false
-      CollectContextSwitch  true
-    </Process>
+      CollectContextSwitch true
+    </ProcessMatch>
   </Plugin>
  
  =over 4
@@@ -6925,40 -7218,6 +7218,40 @@@ reporting the corresponding processes o
  B<ProcessMatch> blocks these options set the default value for subsequent
  matches.
  
 +=head2 Plugin C<procevent>
 + 
 +The I<procevent> plugin monitors when processes start (EXEC) and stop (EXIT).
 + 
 +B<Synopsis:>
 + 
 +  <Plugin procevent>
 +    BufferLength 10
 +    Process "name"
 +    ProcessRegex "regex"
 +  </Plugin>
 + 
 +B<Options:>
 + 
 +=over 4
 + 
 +=item B<BufferLength> I<length>
 + 
 +Maximum number of process events that can be stored in plugin's ring buffer.
 +By default, this is set to 10.  Once an event has been read, its location
 +becomes available for storing a new event.
 + 
 +=item B<Process> I<name>
 + 
 +Enumerate a process name to monitor.  All processes that match this exact
 +name will be monitored for EXECs and EXITs.
 +
 +=item B<ProcessRegex> I<regex>
 + 
 +Enumerate a process pattern to monitor.  All processes that match this 
 +regular expression will be monitored for EXECs and EXITs.
 + 
 +=back
 +
  =head2 Plugin C<protocols>
  
  Collects a lot of information about various network protocols, such as I<IP>,
@@@ -7024,6 -7283,7 +7317,7 @@@ multiple routers
        CollectRegistrationTable true
        CollectDF true
        CollectDisk true
+       CollectHealth true
      </Router>
    </Plugin>
  
@@@ -7084,29 -7344,37 +7378,37 @@@ 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>
  
- The I<Redis plugin> connects to one or more Redis servers and gathers
- information about each server's state. For each server there is a I<Node> block
- which configures the connection parameters for this node.
+ The I<Redis plugin> connects to one or more Redis servers, gathers
+ information about each server's state and executes user-defined queries.
+ For each server there is a I<Node> block which configures the connection
+ parameters and set of user-defined queries for this node.
  
    <Plugin redis>
      <Node "example">
          Host "localhost"
          Port "6379"
+         #Socket "/var/run/redis/redis.sock"
          Timeout 2000
+         ReportCommandStats false
+         ReportCpuUsage true
          <Query "LLEN myqueue">
+           #Database 0
            Type "queue_length"
            Instance "myqueue"
-         <Query>
+         </Query>
      </Node>
    </Plugin>
  
- The information shown in the synopsis above is the I<default configuration>
- which is used by the plugin if no configuration is present.
  =over 4
  
  =item B<Node> I<Nodename>
  The B<Node> block identifies a new Redis node, that is a new Redis instance
  running in an specified host and port. The name for node is a canonical
  identifier which is used as I<plugin instance>. It is limited to
- 64E<nbsp>characters in length.
+ 128E<nbsp>characters in length.
+ When no B<Node> is configured explicitly, plugin connects to "localhost:6379".
  
  =item B<Host> I<Hostname>
  
@@@ -7127,6 -7397,11 +7431,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>.
  =item B<Timeout> I<Milliseconds>
  
  The B<Timeout> option set the socket timeout for node response. Since the Redis
- read function is blocking, you should keep this value as low as possible. Keep
- in mind that the sum of all B<Timeout> values for all B<Nodes> should be lower
- than B<Interval> defined globally.
+ read function is blocking, you should keep this value as low as possible.
+ It is expected what B<Timeout> values should be lower than B<Interval> defined
+ globally.
+ Defaults to 2000 (2 seconds).
+ =item B<ReportCommandStats> B<false>|B<true>
+ Enables or disables reporting of statistics based on the command type, including
+ rate of command calls and average CPU time consumed by command processing.
+ Defaults to B<false>.
+ =item B<ReportCpuUsage> B<true>|B<false>
+ Enables or disables reporting of CPU consumption statistics.
+ Defaults to B<true>.
  
  =item B<Query> I<Querystring>
  
  The B<Query> block identifies a query to execute against the redis server.
- There may be an arbitrary number of queries to execute.
+ There may be an arbitrary number of queries to execute. Each query should
+ return single string or integer.
  
  =item B<Type> I<Collectd type>
  
- Within a query definition, a valid collectd type to use as when submitting
+ Within a query definition, a valid I<collectd type> to use as when submitting
  the result of the query. When not supplied, will default to B<gauge>.
  
+ Currently only types with one datasource are supported.
+ See L<types.db(5)> for more details on types and their configuration.
  =item B<Instance> I<Type instance>
  
  Within a query definition, an optional type instance to use when submitting
  the result of the query. When not supplied will default to the escaped
- command, up to 64 chars.
+ command, up to 128 chars.
+ =item B<Database> I<Index>
+ This index selects the Redis logical database to use for query. Defaults
+ to C<0>.
  
  =back
  
@@@ -7592,7 -7889,9 +7923,9 @@@ B<Synopsis:
        IndexOID "IF-MIB::ifIndex"
        SizeOID "IF-MIB::ifNumber"
        <Data "ifDescr">
-         Instance true
+         <IndexKey>
+           Source "PluginInstance"
+         </IndexKey>
          Plugin "interface"
          OIDs "IF-MIB::ifDescr"
        </Data>
          OIDs "IF-MIB::ifInOctets" "IF-MIB::ifOutOctets"
        </Data>
      </Table>
+     <Table "CPUAffinityTable">
+       <Data "DomainName">
+         <IndexKey>
+           Source "PluginInstance"
+         </IndexKey>
+         Plugin "virt"
+         OIDs "LIBVIRT-HYPERVISOR-MIB::lvhAffinityDomainName"
+       </Data>
+       <Data "VCPU">
+         Plugin "virt"
+         <IndexKey>
+           Source "TypeInstance"
+           Regex "^vcpu_([0-9]{1,3})-cpu_[0-9]{1,3}$"
+           Group 1
+         </IndexKey>
+         OIDs "LIBVIRT-HYPERVISOR-MIB::lvhVCPUIndex"
+       </Data>
+       <Data "CPU">
+         Plugin "virt"
+         <IndexKey>
+           Source "TypeInstance"
+           Regex "^vcpu_[0-9]{1,3}-cpu_([0-9]{1,3})$"
+           Group 1
+         </IndexKey>
+         OIDs "LIBVIRT-HYPERVISOR-MIB::lvhCPUIndex"
+       </Data>
+       <Data "CPUAffinity">
+         Plugin "virt"
+         Type "cpu_affinity"
+         OIDs "LIBVIRT-HYPERVISOR-MIB::lvhCPUAffinity"
+       </Data>
+     </Table>
    </Plugin>
  
  There are two types of blocks that can be contained in the
  C<E<lt>PluginE<nbsp> snmp_agentE<gt>> block: B<Data> and B<Table>:
  
- =head3 The B<Data> block
+ =head3 B<Data> block
  
  The B<Data> block defines a list OIDs that are to be handled. This block can
  define scalar or table OIDs. If B<Data> block is defined inside of B<Table>
@@@ -7617,11 -7948,34 +7982,34 @@@ The following options can be set
  
  =over 4
  
- =item B<Instance> I<true|false>
+ =item B<IndexKey> block
  
- When B<Instance> is set to B<true>, the value for requested OID is copied from
- plugin instance field of corresponding collectd value. If B<Data> block defines
- scalar data type B<Instance> has no effect and can be omitted.
+ B<IndexKey> block contains all data needed for proper index build of snmp table.
+ In case more than
+ one table B<Data> block has B<IndexKey> block present then multiple key index is
+ built. If B<Data> block defines scalar data type B<IndexKey> has no effect and can
+ be omitted.
+ =over 8
+ =item B<Source> I<String>
+ B<Source> can be set to one of the following values: "Hostname", "Plugin",
+ "PluginInstance", "Type", "TypeInstance". This value indicates which field of
+ corresponding collectd metric is taken as a SNMP table index.
+ =item B<Regex> I<String>
+ B<Regex> option can also be used to parse strings or numbers out of
+ specific field. For example: type-instance field which is "vcpu1-cpu2" can be
+ parsed into two numeric fields CPU = 2 and VCPU = 1 and can be later used
+ as a table index.
+ =item B<Group> I<Number>
+ B<Group> number can be specified in case groups are used in regex.
+ =back
  
  =item B<Plugin> I<String>
  
@@@ -8158,13 -8512,14 +8546,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>
  
@@@ -8755,6 -9110,40 +9144,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>
@@@ -8857,7 -9246,8 +9280,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
@@@ -8944,6 -9334,12 +9368,12 @@@ B<Note>: I<perf> metrics can't be colle
  
  =back
  
+ =item B<PersistentNotification> B<true>|B<false>
+ Override default configuration to only send notifications when there is a change
+ in the lifecycle state of a domain. When set to true notifications will be sent
+ for every read cycle. Default is false. Does not affect the stats being
+ dispatched.
  =back
  
  =head2 Plugin C<vmem>
@@@ -8997,6 -9393,7 +9427,7 @@@ Synopsis
       Protocol "tcp"
       LogSendErrors true
       Prefix "collectd"
+      UseTags false
     </Node>
   </Plugin>
  
@@@ -9034,13 -9431,20 +9465,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>
  
@@@ -9062,6 -9466,8 +9500,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"
@@@ -9074,12 -9480,31 +9514,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>
@@@ -9505,17 -9930,26 +9964,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.
@@@ -9530,6 -9964,8 +9998,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"
@@@ -9542,6 -9978,14 +10012,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
@@@ -9902,6 -10346,133 +10380,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