Merge branch 'collectd-4.10'
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Sat, 6 Nov 2010 11:11:23 +0000 (12:11 +0100)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Sat, 6 Nov 2010 11:11:23 +0000 (12:11 +0100)
1  2 
README
configure.in
src/collectd.h
src/curl_json.c
src/network.c
src/types.db

diff --combined README
--- 1/README
--- 2/README
+++ b/README
@@@ -125,10 -125,6 +125,10 @@@ Feature
      - load
        System load average over the last 1, 5 and 15 minutes.
  
 +    - lpar
 +      Detailed CPU statistics of the “Logical Partitions” virtualization
 +      technique built into IBM's POWER processors.
 +
      - libvirt
        CPU, disk and network I/O statistics from virtual machines.
  
        collectd without the need to start a heavy interpreter every interval.
        See collectd-python(5) for details.
  
 +    - redis
 +      The redis plugin gathers information from a redis server, including:
 +      uptime, used memory, total connections etc.
 +
      - routeros
        Query interface and wireless registration statistics from RouterOS.
  
      - users
        Users currently logged in.
  
 +    - varnish
 +      Various statistics from Varnish, an HTTP accelerator.
 +
      - vmem
        Virtual memory statistics, e. g. the number of page-ins/-outs or the
        number of pagefaults.
    * Output can be written or sent to various destinations by the following
      plugins:
  
 +    - amqp
 +      Sends JSON-encoded data to an Advanced Message Queuing Protocol (AMQP)
 +      server, such as RabbitMQ.
 +
      - csv
        Write to comma separated values (CSV) files. This needs lots of
        diskspace but is extremely portable and can be analysed with almost
@@@ -519,10 -504,6 +519,10 @@@ Prerequisite
    * libclntsh (optional)
      Used by the `oracle' plugin.
  
 +  * libcredis (optional)
 +    Used by the redis plugin. Please note that you require a 0.2.2 version
 +    or higher. <http://code.google.com/p/credis/>
 +
    * libcurl (optional)
      If you want to use the `apache', `ascent', `curl', `nginx', or `write_http'
      plugin.
      Used to capture packets by the `dns' plugin.
      <http://www.tcpdump.org/>
  
+   * libperfstat (optional)
+     Used by various plugins to gather statistics under AIX.
    * libperl (optional)
      Obviously used by the `perl' plugin. The library has to be compiled with
      ithread support (introduced in Perl 5.6.0).
      Used by the `python' plugin. Currently, only 2.3 ≦ Python < 3 is supported.
      <http://www.python.org/>
  
 +  * librabbitmq (optional; also called “rabbitmq-c”)
 +    Used by the AMQP plugin for AMQP connections, for example to RabbitMQ.
 +    <http://hg.rabbitmq.com/rabbitmq-c/>
 +
    * librouteros (optional)
      Used by the `routeros' plugin to connect to a device running `RouterOS'.
      <http://verplant.org/librouteros/>
      Parse JSON data. This is needed for the `curl_json' plugin.
      <http://github.com/lloyd/yajl>
  
 +  * libvarnish (optional)
 +     Fetches statistics from a Varnish instance. This is needed for the Varnish plugin
 +     <http://varnish-cache.org>
 +
  Configuring / Compiling / Installing
  ------------------------------------
  
diff --combined configure.in
@@@ -91,6 -91,10 +91,10 @@@ if test "x$ac_system" = "xSolaris
  then
        AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1, [Define to enforce POSIX thread semantics under Solaris.])
  fi
+ if test "x$ac_system" = "xAIX"
+ then
+       AC_DEFINE(_THREAD_SAFE_ERRNO, 1, [Define to use the thread-safe version of errno under AIX.])
+ fi
  
  # Where to install .pc files.
  pkgconfigdir="${libdir}/pkgconfig"
@@@ -104,13 -108,9 +108,13 @@@ AC_ARG_ENABLE(standards
  if test "x$enable_standards" = "xyes"
  then
        AC_DEFINE(_ISOC99_SOURCE,        1, [Define to enforce ISO C99 compliance.])
 -      AC_DEFINE(_POSIX_C_SOURCE, 200112L, [Define to enforce POSIX.1-2001 compliance.])
 -      AC_DEFINE(_XOPEN_SOURCE,       600, [Define to enforce X/Open 6 (XSI) compliance.])
 +      AC_DEFINE(_POSIX_C_SOURCE, 200809L, [Define to enforce POSIX.1-2008 compliance.])
 +      AC_DEFINE(_XOPEN_SOURCE,       700, [Define to enforce X/Open 7 (XSI) compliance.])
        AC_DEFINE(_REENTRANT,            1, [Define to enable reentrancy interfaces.])
 +      if test "x$GCC" = "xyes"
 +      then
 +              CFLAGS="$CFLAGS -std=c99"
 +      fi
  fi
  AM_CONDITIONAL(BUILD_FEATURE_STANDARDS, test "x$enable_standards" = "xyes")
  
@@@ -592,55 -592,6 +596,55 @@@ AC_CHECK_FUNCS(syslog, [have_syslog="ye
  AC_CHECK_FUNCS(getutent, [have_getutent="yes"], [have_getutent="no"])
  AC_CHECK_FUNCS(getutxent, [have_getutxent="yes"], [have_getutxent="no"])
  AC_CHECK_FUNCS(swapctl, [have_swapctl="yes"], [have_swapctl="no"])
 +if test "x$have_swapctl" = "xyes"; then
 +        AC_CACHE_CHECK([whether swapctl takes two arguments],
 +                [c_cv_have_swapctl_two_args],
 +                AC_COMPILE_IFELSE(
 +                        AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
 +#if HAVE_SYS_SWAP_H && !defined(_LP64) && _FILE_OFFSET_BITS == 64
 +#  undef _FILE_OFFSET_BITS
 +#  undef _LARGEFILE64_SOURCE
 +#endif
 +#include <sys/stat.h>
 +#include <sys/swap.h>]],
 +                                [[
 +                                int num = swapctl(0, NULL);
 +                                ]]
 +                        ),
 +                        [c_cv_have_swapctl_two_args="yes"],
 +                        [c_cv_have_swapctl_two_args="no"]
 +                )
 +        )
 +        AC_CACHE_CHECK([whether swapctl takes three arguments],
 +                [c_cv_have_swapctl_three_args],
 +                AC_COMPILE_IFELSE(
 +                        AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
 +#if HAVE_SYS_SWAP_H && !defined(_LP64) && _FILE_OFFSET_BITS == 64
 +#  undef _FILE_OFFSET_BITS
 +#  undef _LARGEFILE64_SOURCE
 +#endif
 +#include <sys/stat.h>
 +#include <sys/swap.h>]],
 +                                [[
 +                                int num = swapctl(0, NULL,0);
 +                                ]]
 +                        ),
 +                        [c_cv_have_swapctl_three_args="yes"],
 +                        [c_cv_have_swapctl_three_args="no"]
 +                )
 +        )
 +fi
 +# Check for different versions of `swapctl' here..
 +if test "x$have_swapctl" = "xyes"; then
 +        if test "x$c_cv_have_swapctl_two_args" = "xyes"; then
 +                AC_DEFINE(HAVE_SWAPCTL_TWO_ARGS, 1,
 +                          [Define if the function swapctl exists and takes two arguments.])
 +        fi
 +        if test "x$c_cv_have_swapctl_three_args" = "xyes"; then
 +                AC_DEFINE(HAVE_SWAPCTL_THREE_ARGS, 1,
 +                          [Define if the function swapctl exists and takes three arguments.])
 +        fi
 +fi
  
  # For load module
  AC_CHECK_FUNCS(getloadavg, [have_getloadavg="yes"], [have_getloadavg="no"])
  if test "x$with_perfstat" = "xyes"
  then
         AC_DEFINE(HAVE_PERFSTAT, 1, [Define to 1 if you have the 'perfstat' library (-lperfstat)])
 +       # struct members pertaining to donation have been added to libperfstat somewhere between AIX5.3ML5 and AIX5.3ML9
 +       AC_CHECK_MEMBER([perfstat_partition_type_t.b.donate_enabled], [], [], [[#include <libperfstat.h]])
 +       if test "x$av_cv_member_perfstat_partition_type_t_b_donate_enabled" = "xyes"
 +       then
 +              AC_DEFINE(PERFSTAT_SUPPORTS_DONATION, 1, [Define to 1 if your version of the 'perfstat' library supports donation])
 +       fi
  fi
  AM_CONDITIONAL(BUILD_WITH_PERFSTAT, test "x$with_perfstat" = "xyes")
  
  fi
  AM_CONDITIONAL(BUILD_WITH_LIBKVM_OPENFILES, test "x$with_kvm_openfiles" = "xyes")
  
 +# --with-libcredis {{{
 +AC_ARG_WITH(libcredis, [AS_HELP_STRING([--with-libcredis@<:@=PREFIX@:>@], [Path to libcredis.])],
 +[
 + if test "x$withval" = "xyes"
 + then
 +       with_libcredis="yes"
 + else if test "x$withval" = "xno"
 + then
 +       with_libcredis="no"
 + else
 +       with_libcredis="yes"
 +       LIBCREDIS_CPPFLAGS="$LIBCREDIS_CPPFLAGS -I$withval/include"
 +       LIBCREDIS_LDFLAGS="$LIBCREDIS_LDFLAGS -L$withval/lib"
 + fi; fi
 +],
 +[with_libcredis="yes"])
 +
 +SAVE_CPPFLAGS="$CPPFLAGS"
 +SAVE_LDFLAGS="$LDFLAGS"
 +
 +CPPFLAGS="$CPPFLAGS $LIBCREDIS_CPPFLAGS"
 +LDFLAGS="$LDFLAGS $LIBCREDIS_LDFLAGS"
 +
 +if test "x$with_libcredis" = "xyes"
 +then
 +      if test "x$LIBCREDIS_CPPFLAGS" != "x"
 +      then
 +              AC_MSG_NOTICE([libcredis CPPFLAGS: $LIBCREDIS_CPPFLAGS])
 +      fi
 +      AC_CHECK_HEADERS(credis.h,
 +      [with_libcredis="yes"],
 +      [with_libcredis="no ('credis.h' not found)"])
 +fi
 +if test "x$with_libcredis" = "xyes"
 +then
 +      if test "x$LIBCREDIS_LDFLAGS" != "x"
 +      then
 +              AC_MSG_NOTICE([libcredis LDFLAGS: $LIBCREDIS_LDFLAGS])
 +      fi
 +      AC_CHECK_LIB(credis, credis_info,
 +      [with_libcredis="yes"],
 +      [with_libcredis="no (symbol 'credis_info' not found)"])
 +
 +fi
 +
 +CPPFLAGS="$SAVE_CPPFLAGS"
 +LDFLAGS="$SAVE_LDFLAGS"
 +
 +if test "x$with_libcredis" = "xyes"
 +then
 +      BUILD_WITH_LIBCREDIS_CPPFLAGS="$LIBCREDIS_CPPFLAGS"
 +      BUILD_WITH_LIBCREDIS_LDFLAGS="$LIBCREDIS_LDFLAGS"
 +      AC_SUBST(BUILD_WITH_LIBCREDIS_CPPFLAGS)
 +      AC_SUBST(BUILD_WITH_LIBCREDIS_LDFLAGS)
 +fi
 +AM_CONDITIONAL(BUILD_WITH_LIBCREDIS, test "x$with_libcredis" = "xyes")
 +# }}}
 +
  # --with-libcurl {{{
  with_curl_config="curl-config"
  with_curl_cflags=""
  fi
  # }}} --with-python
  
 +# --with-librabbitmq {{{
 +with_librabbitmq_cppflags=""
 +with_librabbitmq_ldflags=""
 +AC_ARG_WITH(librabbitmq, [AS_HELP_STRING([--with-librabbitmq@<:@=PREFIX@:>@], [Path to librabbitmq.])],
 +[
 +      if test "x$withval" != "xno" && test "x$withval" != "xyes"
 +      then
 +              with_librabbitmq_cppflags="-I$withval/include"
 +              with_librabbitmq_ldflags="-L$withval/lib"
 +              with_librabbitmq="yes"
 +      else
 +              with_librabbitmq="$withval"
 +      fi
 +],
 +[
 +      with_librabbitmq="yes"
 +])
 +if test "x$with_librabbitmq" = "xyes"
 +then
 +      SAVE_CPPFLAGS="$CPPFLAGS"
 +      CPPFLAGS="$CPPFLAGS $with_librabbitmq_cppflags"
 +
 +      AC_CHECK_HEADERS(amqp.h, [with_librabbitmq="yes"], [with_librabbitmq="no (amqp.h not found)"])
 +
 +      CPPFLAGS="$SAVE_CPPFLAGS"
 +fi
 +if test "x$with_librabbitmq" = "xyes"
 +then
 +      SAVE_CPPFLAGS="$CPPFLAGS"
 +      SAVE_LDFLAGS="$LDFLAGS"
 +      CPPFLAGS="$CPPFLAGS $with_librabbitmq_cppflags"
 +      LDFLAGS="$LDFLAGS $with_librabbitmq_ldflags"
 +
 +      AC_CHECK_LIB(rabbitmq, amqp_basic_publish, [with_librabbitmq="yes"], [with_librabbitmq="no (Symbol 'amqp_basic_publish' not found)"])
 +
 +      CPPFLAGS="$SAVE_CPPFLAGS"
 +      LDFLAGS="$SAVE_LDFLAGS"
 +fi
 +if test "x$with_librabbitmq" = "xyes"
 +then
 +      BUILD_WITH_LIBRABBITMQ_CPPFLAGS="$with_librabbitmq_cppflags"
 +      BUILD_WITH_LIBRABBITMQ_LDFLAGS="$with_librabbitmq_ldflags"
 +      BUILD_WITH_LIBRABBITMQ_LIBS="-lrabbitmq"
 +      AC_SUBST(BUILD_WITH_LIBRABBITMQ_CPPFLAGS)
 +      AC_SUBST(BUILD_WITH_LIBRABBITMQ_LDFLAGS)
 +      AC_SUBST(BUILD_WITH_LIBRABBITMQ_LIBS)
 +      AC_DEFINE(HAVE_LIBRABBITMQ, 1, [Define if librabbitmq is present and usable.])
 +fi
 +AM_CONDITIONAL(BUILD_WITH_LIBRABBITMQ, test "x$with_librabbitmq" = "xyes")
 +# }}}
 +
  # --with-librouteros {{{
  AC_ARG_WITH(librouteros, [AS_HELP_STRING([--with-librouteros@<:@=PREFIX@:>@], [Path to librouteros.])],
  [
  AM_CONDITIONAL(BUILD_WITH_LIBYAJL, test "x$with_libyajl" = "xyes")
  # }}}
  
 +# --with-libvarnish {{{
 +with_libvarnish_cppflags=""
 +with_libvarnish_cflags=""
 +with_libvarnish_libs=""
 +AC_ARG_WITH(libvarnish, [AS_HELP_STRING([--with-libvarnish@<:@=PREFIX@:>@], [Path to libvarnish.])],
 +[
 +      if test "x$withval" = "xno"
 +      then
 +              with_libvarnish="no"
 +      else if test "x$withval" = "xyes"
 +      then
 +              with_libvarnish="use_pkgconfig"
 +      else if test -d "$with_libvarnish/lib"
 +      then
 +              AC_MSG_NOTICE([Not checking for libvarnish: Manually configured])
 +              with_libvarnish_cflags="-I$withval/include"
 +              with_libvarnish_libs="-L$withval/lib -lvarnish -lvarnishcompat -lvarnishapi"
 +              with_libvarnish="yes"
 +      fi; fi; fi
 +],
 +[with_libvarnish="use_pkgconfig"])
 +
 +# configure using pkg-config
 +if test "x$with_libvarnish" = "xuse_pkgconfig"
 +then
 +      if test "x$PKG_CONFIG" = "x"
 +      then
 +              with_libvarnish="no (Don't have pkg-config)"
 +      fi
 +fi
 +if test "x$with_libvarnish" = "xuse_pkgconfig"
 +then
 +      AC_MSG_NOTICE([Checking for varnishapi using $PKG_CONFIG])
 +      $PKG_CONFIG --exists 'varnishapi' 2>/dev/null
 +      if test $? -ne 0
 +      then
 +              with_libvarnish="no (pkg-config doesn't know library)"
 +      fi
 +fi
 +if test "x$with_libvarnish" = "xuse_pkgconfig"
 +then
 +      with_libvarnish_cflags="`$PKG_CONFIG --cflags 'varnishapi'`"
 +      if test $? -ne 0
 +      then
 +              with_libvarnish="no ($PKG_CONFIG failed)"
 +      fi
 +      with_libvarnish_libs="`$PKG_CONFIG --libs 'varnishapi'`"
 +      if test $? -ne 0
 +      then
 +              with_libvarnish="no ($PKG_CONFIG failed)"
 +      fi
 +fi
 +if test "x$with_libvarnish" = "xuse_pkgconfig"
 +then
 +      with_libvarnish="yes"
 +fi
 +
 +# with_libvarnish_cflags and with_libvarnish_libs are set up now, let's do
 +# the actual checks.
 +if test "x$with_libvarnish" = "xyes"
 +then
 +      SAVE_CPPFLAGS="$CPPFLAGS"
 +      CPPFLAGS="$CPPFLAGS $with_libvarnish_cflags"
 +      AC_CHECK_HEADERS(varnish/varnishapi.h, [], [with_libvarnish="no (varnish/varnishapi.h not found)"])
 +
 +      CPPFLAGS="$SAVE_CPPFLAGS"
 +fi
 +if test "x$with_libvarnish" = "xyes"
 +then
 +      SAVE_CPPFLAGS="$CPPFLAGS"
 +      #SAVE_LDFLAGS="$LDFLAGS"
 +
 +      CPPFLAGS="$CPPFLAGS $with_libvarnish_cflags"
 +      #LDFLAGS="$LDFLAGS $with_libvarnish_libs"
 +
 +      AC_CHECK_LIB(varnishapi, VSL_OpenStats,
 +                   [with_libvarnish="yes"],
 +                   [with_libvarnish="no (symbol VSL_OpenStats not found)"],
 +                   [$with_libvarnish_libs])
 +
 +      CPPFLAGS="$SAVE_CPPFLAGS"
 +      #LDFLAGS="$SAVE_LDFLAGS"
 +fi
 +if test "x$with_libvarnish" = "xyes"
 +then
 +      BUILD_WITH_LIBVARNISH_CFLAGS="$with_libvarnish_cflags"
 +      BUILD_WITH_LIBVARNISH_LIBS="$with_libvarnish_libs"
 +      AC_SUBST(BUILD_WITH_LIBVARNISH_CFLAGS)
 +      AC_SUBST(BUILD_WITH_LIBVARNISH_LIBS)
 +fi
 +# }}}
 +
  # pkg-config --exists 'libxml-2.0'; pkg-config --exists libvirt {{{
  with_libxml2="no (pkg-config isn't available)"
  with_libxml2_cflags=""
@@@ -4391,7 -4135,6 +4395,7 @@@ the
  fi
  if test "x$have_sysctlbyname" = "xyes"
  then
 +      plugin_contextswitch="yes"
        plugin_cpu="yes"
        plugin_memory="yes"
        plugin_tcpconns="yes"
@@@ -4519,7 -4262,6 +4523,7 @@@ AC_ARG_ENABLE([all-plugins]
  
  m4_divert_once([HELP_ENABLE], [])
  
 +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's hardware sensors])
@@@ -4554,7 -4296,6 +4558,7 @@@ AC_PLUGIN([java],        [$with_java]
  AC_PLUGIN([libvirt],     [$plugin_libvirt],    [Virtual machine statistics])
  AC_PLUGIN([load],        [$plugin_load],       [System load])
  AC_PLUGIN([logfile],     [yes],                [File logging plugin])
 +AC_PLUGIN([lpar],        [$with_perfstat],     [AIX logical partitions 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])
@@@ -4590,7 -4331,6 +4594,7 @@@ AC_PLUGIN([powerdns],    [yes]
  AC_PLUGIN([processes],   [$plugin_processes],  [Process statistics])
  AC_PLUGIN([protocols],   [$plugin_protocols],  [Protocol (IP, TCP, ...) statistics])
  AC_PLUGIN([python],      [$with_python],       [Embed a Python interpreter])
 +AC_PLUGIN([redis],       [$with_libcredis],    [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])
@@@ -4606,7 -4346,6 +4610,7 @@@ AC_PLUGIN([target_notification], [yes]
  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])
@@@ -4616,12 -4355,10 +4620,12 @@@ AC_PLUGIN([unixsock],    [yes]
  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([vmem],        [$plugin_vmem],       [Virtual memory statistics])
  AC_PLUGIN([vserver],     [$plugin_vserver],    [Linux VServer statistics])
  AC_PLUGIN([wireless],    [$plugin_wireless],   [Wireless statistics])
  AC_PLUGIN([write_http],  [$with_libcurl],      [HTTP output plugin])
 +AC_PLUGIN([write_redis], [$with_libcredis],    [Redis output plugin])
  AC_PLUGIN([xmms],        [$with_libxmms],      [XMMS statistics])
  AC_PLUGIN([zfs_arc],     [$plugin_zfs_arc],    [ZFS ARC statistics])
  
@@@ -4796,7 -4533,6 +4800,7 @@@ Configuration
    Libraries:
      libcurl . . . . . . . $with_libcurl
      libdbi  . . . . . . . $with_libdbi
 +    libcredis . . . . . . $with_libcredis
      libesmtp  . . . . . . $with_libesmtp
      libganglia  . . . . . $with_libganglia
      libgcrypt . . . . . . $with_libgcrypt
      libperl . . . . . . . $with_libperl
      libpq . . . . . . . . $with_libpq
      libpthread  . . . . . $with_libpthread
 +    librabbitmq . . . . . $with_librabbitmq
      librouteros . . . . . $with_librouteros
      librrd  . . . . . . . $with_librrd
      libsensors  . . . . . $with_libsensors
      libstatgrab . . . . . $with_libstatgrab
      libtokyotyrant  . . . $with_libtokyotyrant
      libupsclient  . . . . $with_libupsclient
 +    libvarnish  . . . . . $with_libvarnish
      libvirt . . . . . . . $with_libvirt
      libxml2 . . . . . . . $with_libxml2
      libxmms . . . . . . . $with_libxmms
      perl  . . . . . . . . $with_perl_bindings
  
    Modules:
 +    amqp    . . . . . . . $enable_amqp
      apache  . . . . . . . $enable_apache
      apcups  . . . . . . . $enable_apcups
      apple_sensors . . . . $enable_apple_sensors
      libvirt . . . . . . . $enable_libvirt
      load  . . . . . . . . $enable_load
      logfile . . . . . . . $enable_logfile
 +    lpar... . . . . . . . $enable_lpar
      madwifi . . . . . . . $enable_madwifi
      match_empty_counter . $enable_match_empty_counter
      match_hashed  . . . . $enable_match_hashed
      processes . . . . . . $enable_processes
      protocols . . . . . . $enable_protocols
      python  . . . . . . . $enable_python
 +    redis . . . . . . . . $enable_redis
      routeros  . . . . . . $enable_routeros
      rrdcached . . . . . . $enable_rrdcached
      rrdtool . . . . . . . $enable_rrdtool
      target_replace  . . . $enable_target_replace
      target_scale  . . . . $enable_target_scale
      target_set  . . . . . $enable_target_set
 +    target_v5upgrade  . . $enable_target_v5upgrade
      tcpconns  . . . . . . $enable_tcpconns
      teamspeak2  . . . . . $enable_teamspeak2
      ted . . . . . . . . . $enable_ted
      uptime  . . . . . . . $enable_uptime
      users . . . . . . . . $enable_users
      uuid  . . . . . . . . $enable_uuid
 +    varnish . . . . . . . $enable_varnish
      vmem  . . . . . . . . $enable_vmem
      vserver . . . . . . . $enable_vserver
      wireless  . . . . . . $enable_wireless
      write_http  . . . . . $enable_write_http
 +    write_redis . . . . . $enable_write_redis
      xmms  . . . . . . . . $enable_xmms
      zfs_arc . . . . . . . $enable_zfs_arc
  
diff --combined src/collectd.h
  #if HAVE_STDINT_H
  # include <stdint.h>
  #endif
 -#if HAVE_STDBOOL_H
 -# include <stdbool.h>
 -#else
 -# ifndef HAVE__BOOL
 -#  ifdef __cplusplus
 -typedef bool _Bool;
 -#  else
 -#   define _Bool signed char
 -#  endif
 -# endif
 -# define bool _Bool
 -# define false 0
 -# define true 1
 -# define __bool_true_false_are_defined 1
 -#endif
  #if HAVE_UNISTD_H
  # include <unistd.h>
  #endif
  # include <kstat.h>
  #endif
  
- #if HAVE_SENSORS_SENSORS_H
- # include <sensors/sensors.h>
- #endif
  #ifndef PACKAGE_NAME
  #define PACKAGE_NAME "collectd"
  #endif
diff --combined src/curl_json.c
@@@ -98,12 -98,18 +98,12 @@@ static size_t cj_curl_callback (void *b
      return (0);
  
    status = yajl_parse(db->yajl, (unsigned char *)buf, len);
 -  if (status == yajl_status_ok)
 -  {
 -    status = yajl_parse_complete(db->yajl);
 -    return (len);
 -  }
 -  else if (status == yajl_status_insufficient_data)
 -    return (len);
 -
 -  if (status != yajl_status_ok)
 +  if ((status != yajl_status_ok)
 +      && (status != yajl_status_insufficient_data))
    {
      unsigned char *msg =
 -      yajl_get_error(db->yajl, 1, (unsigned char *)buf, len);
 +      yajl_get_error(db->yajl, /* verbose = */ 1,
 +          /* jsonText = */ (unsigned char *) buf, (unsigned int) len);
      ERROR ("curl_json plugin: yajl_parse failed: %s", msg);
      yajl_free_error(db->yajl, msg);
      return (0); /* abort write callback */
@@@ -758,18 -764,14 +758,19 @@@ static int cj_curl_perform (cj_t *db, C
    if (db->yajl == NULL)
    {
      ERROR ("curl_json plugin: yajl_alloc failed.");
+     db->yajl = yprev;
      return (-1);
    }
  
    status = curl_easy_perform (curl);
 -
 -  yajl_free (db->yajl);
 -  db->yajl = yprev;
 +  if (status != 0)
 +  {
 +    ERROR ("curl_json plugin: curl_easy_perform failed with status %i: %s (%s)",
 +           status, db->curl_errbuf, url);
 +    yajl_free (db->yajl);
 +    db->yajl = yprev;
 +    return (-1);
 +  }
  
    curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &url);
    curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &rc);
    /* The response code is zero if a non-HTTP transport was used. */
    if ((rc != 0) && (rc != 200))
    {
 -    ERROR ("curl_json plugin: curl_easy_perform failed with response code %ld (%s)",
 -           rc, url);
 +    ERROR ("curl_json plugin: curl_easy_perform failed with "
 +        "response code %ld (%s)", rc, url);
 +    yajl_free (db->yajl);
 +    db->yajl = yprev;
      return (-1);
    }
  
 -  if (status != 0)
 +  status = yajl_parse_complete (db->yajl);
 +  if (status != yajl_status_ok)
    {
 -    ERROR ("curl_json plugin: curl_easy_perform failed with status %i: %s (%s)",
 -           status, db->curl_errbuf, url);
 +    unsigned char *errmsg;
 +
 +    errmsg = yajl_get_error (db->yajl, /* verbose = */ 0,
 +        /* jsonText = */ NULL, /* jsonTextLen = */ 0);
 +    ERROR ("curl_json plugin: yajl_parse_complete failed: %s",
 +        (char *) errmsg);
 +    yajl_free_error (db->yajl, errmsg);
 +    yajl_free (db->yajl);
 +    db->yajl = yprev;
      return (-1);
    }
  
 +  yajl_free (db->yajl);
 +  db->yajl = yprev;
    return (0);
  } /* }}} int cj_curl_perform */
  
diff --combined src/network.c
@@@ -31,6 -31,7 +31,7 @@@
  #include "utils_fbhash.h"
  #include "utils_avltree.h"
  #include "utils_cache.h"
+ #include "utils_complain.h"
  
  #include "network.h"
  
@@@ -258,7 -259,7 +259,7 @@@ typedef struct receive_list_entry_s rec
   * Private variables
   */
  static int network_config_ttl = 0;
 -static size_t network_config_packet_size = 1024;
 +static size_t network_config_packet_size = 1452;
  static int network_config_forward = 0;
  static int network_config_stats = 0;
  
@@@ -319,30 -320,30 +320,30 @@@ static _Bool check_receive_okay (const 
    /* This is a value we already sent. Don't allow it to be received again in
     * order to avoid looping. */
    if ((status == 0) && (time_sent >= ((uint64_t) vl->time)))
 -    return (false);
 +    return (0);
  
 -  return (true);
 +  return (1);
  } /* }}} _Bool check_receive_okay */
  
  static _Bool check_send_okay (const value_list_t *vl) /* {{{ */
  {
 -  _Bool received = false;
 +  _Bool received = 0;
    int status;
  
    if (network_config_forward != 0)
 -    return (true);
 +    return (1);
  
    if (vl->meta == NULL)
 -    return (true);
 +    return (1);
  
    status = meta_data_get_boolean (vl->meta, "network:received", &received);
    if (status == -ENOENT)
 -    return (true);
 +    return (1);
    else if (status != 0)
    {
      ERROR ("network plugin: check_send_okay: meta_data_get_boolean failed "
        "with status %i.", status);
 -    return (true);
 +    return (1);
    }
  
    /* By default, only *send* value lists that were not *received* by the
@@@ -383,7 -384,7 +384,7 @@@ static int network_dispatch_values (val
      return (-ENOMEM);
    }
  
 -  status = meta_data_add_boolean (vl->meta, "network:received", true);
 +  status = meta_data_add_boolean (vl->meta, "network:received", 1);
    if (status != 0)
    {
      ERROR ("network plugin: meta_data_add_boolean failed.");
@@@ -917,6 -918,8 +918,8 @@@ static int parse_packet (sockent_t *se
  static int parse_part_sign_sha256 (sockent_t *se, /* {{{ */
      void **ret_buffer, size_t *ret_buffer_len, int flags)
  {
+   static c_complain_t complain_no_users = C_COMPLAIN_INIT_STATIC;
    char *buffer;
    size_t buffer_len;
    size_t buffer_offset;
  
    if (se->data.server.userdb == NULL)
    {
-     NOTICE ("network plugin: Received signed network packet but can't verify "
-         "it because no user DB has been configured. Will accept it.");
+     c_complain (LOG_NOTICE, &complain_no_users,
+         "network plugin: Received signed network packet but can't verify it "
+         "because no user DB has been configured. Will accept it.");
      return (0);
    }
  
@@@ -3053,6 -3057,8 +3057,6 @@@ static int network_config (oconfig_item
        network_config_set_boolean (child, &network_config_forward);
      else if (strcasecmp ("ReportStats", child->key) == 0)
        network_config_set_boolean (child, &network_config_stats);
 -    else if (strcasecmp ("CacheFlush", child->key) == 0)
 -      /* no op for backwards compatibility only */;
      else
      {
        WARNING ("network plugin: Option `%s' is not allowed here.",
@@@ -3256,13 -3262,13 +3260,13 @@@ static int network_stats_read (void) /
  
  static int network_init (void)
  {
 -      static _Bool have_init = false;
 +      static _Bool have_init = 0;
  
        /* Check if we were already initialized. If so, just return - there's
         * nothing more to do (for now, that is). */
        if (have_init)
                return (0);
 -      have_init = true;
 +      have_init = 1;
  
  #if HAVE_LIBGCRYPT
        gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread);
diff --combined src/types.db
@@@ -13,9 -13,8 +13,9 @@@ ath_nodes             value:GAUGE:0:6553
  ath_stat              value:COUNTER:0:4294967295
  bitrate                       value:GAUGE:0:4294967295
  bytes                 value:GAUGE:0:U
 +cache_operation               value:DERIVE:0:U
  cache_ratio           value:GAUGE:0:100
 -cache_result          value:COUNTER:0:4294967295
 +cache_result          value:DERIVE:0:U
  cache_size            value:GAUGE:0:4294967295
  charge                        value:GAUGE:0:U
  compression           uncompressed:COUNTER:0:U, compressed:COUNTER:0:U
@@@ -27,8 -26,6 +27,8 @@@ counter                       value:COUNTER:U:
  cpufreq                       value:GAUGE:0:U
  cpu                   value:COUNTER:0:4294967295
  current                       value:GAUGE:U:U
 +current_connections   value:GAUGE:0:U
 +current_sessions      value:GAUGE:0:U
  delay                 seconds:GAUGE:-1000000:1000000
  derive                        value:DERIVE:0:U
  df                    used:GAUGE:0:1125899906842623, free:GAUGE:0:1125899906842623
@@@ -101,6 -98,8 +101,6 @@@ mysql_handler               value:COUNTER:0:
  mysql_locks           value:COUNTER:0:U
  mysql_log_position    value:COUNTER:0:4294967295
  mysql_octets          rx:COUNTER:0:4294967295, tx:COUNTER:0:4294967295
 -mysql_qcache          hits:COUNTER:0:U, inserts:COUNTER:0:U, not_cached:COUNTER:0:U, lowmem_prunes:COUNTER:0:U, queries_in_cache:GAUGE:0:U
 -mysql_threads         running:GAUGE:0:U, connected:GAUGE:0:U, cached:GAUGE:0:U, created:COUNTER:0:U
  nfs_procedure         value:COUNTER:0:4294967295
  nginx_connections     value:GAUGE:0:U
  nginx_requests                value:COUNTER:0:134217728
@@@ -135,9 -134,8 +135,9 @@@ ps_stacksize               value:GAUGE:0:92233720368
  ps_state              value:GAUGE:0:65535
  ps_vm                 value:GAUGE:0:9223372036854775807
  queue_length          value:GAUGE:0:U
 -response_time         value:GAUGE:0:U
  records                       count:GAUGE:0:U
 +requests              value:GAUGE:0:U
 +response_time         value:GAUGE:0:U
  route_etx             value:GAUGE:0:U
  route_metric          value:GAUGE:0:U
  routes                        value:GAUGE:0:U
@@@ -157,26 -155,19 +157,25 @@@ time_dispersion         seconds:GAUGE:-1000000
  timeleft              timeleft:GAUGE:0:3600
  time_offset           seconds:GAUGE:-1000000:1000000
  total_bytes           value:DERIVE:0:U
 +total_connections     value:DERIVE:0:U
 +total_operations      value:DERIVE:0:U
  total_requests                value:DERIVE:0:U
 +total_sessions                value:DERIVE:0:U
 +total_threads         value:DERIVE:0:U
  total_time_in_ms      value:DERIVE:0:U
  total_values          value:DERIVE:0:U
  uptime                        value:GAUGE:0:4294967295
  users                 users:GAUGE:0:65535
 +vcpu                  value:GAUGE:0:U
  virt_cpu_total                ns:COUNTER:0:256000000000
  virt_vcpu             ns:COUNTER:0:1000000000
  vmpage_action         value:COUNTER:0:4294967295
  vmpage_faults         minflt:COUNTER:0:9223372036854775807, majflt:COUNTER:0:9223372036854775807
  vmpage_io             in:COUNTER:0:4294967295, out:COUNTER:0:4294967295
  vmpage_number         value:GAUGE:0:4294967295
 +volatile_changes      value:GAUGE:0:U
  voltage_threshold     value:GAUGE:U:U, threshold:GAUGE:U:U
  voltage                       value:GAUGE:U:U
  vs_memory             value:GAUGE:0:9223372036854775807
  vs_processes          value:GAUGE:0:65535
  vs_threads            value:GAUGE:0:65535
- pinba_view              req_per_sec:GAUGE:0:U, req_time:GAUGE:0:U, ru_utime:GAUGE:0:U, ru_stime:GAUGE:0:U, doc_size:GAUGE:0:U, mem_peak:GAUGE:0:U