Merge branch 'collectd-5.0'
authorFlorian Forster <octo@collectd.org>
Sun, 19 Feb 2012 10:21:31 +0000 (11:21 +0100)
committerFlorian Forster <octo@collectd.org>
Sun, 19 Feb 2012 10:21:31 +0000 (11:21 +0100)
Conflicts:
configure.in

Change-Id: Ifffa7df6b6c758650af7d942c26c8bd89568d8ea

1  2 
ChangeLog
configure.in
src/collectd.conf.pod

diff --combined ChangeLog
+++ b/ChangeLog
@@@ -1,3 -1,24 +1,24 @@@
+ 2012-02-19, Version 5.0.3
+       * Build system: Fix problems when building the ipvs and iptables
+         plugins. Thanks to Sebastian Harl for his patch. A bashism in the
+         version-gen.sh script has been fixed. Thanks to Jo-Philipp Wich for
+         his patch.
+       * csv and rrdtool plugins: Print a more helpful error message when the
+         DataDir is a symlink pointing to a non-existing location. Thanks to
+         Jonathan Nieder for his patch.
+       * exec plugin: Fix a problem when using select(2) to read from file
+         handles. Thanks to Gerrie Roos for his patch.
+       * network plugin: An incorrect error message in the handling of the
+         "Interface" configuration option has been fixed. Thanks to Gerrie
+         Roos for his patch.
+       * oracle plugin: A potential endless loop in the error handling has
+         been fixed.
+       * python plugin: A crash bug in the configuration handling has been
+         fixed. Thanks to Sven Trenkel for his patch.
+       * interfaces plugin: The change which was supposed to ignore "bogus"
+         interfaces has been reverted, since it ignored legit interfaces, such
+         as bonding pseudo-devices as well.
  2012-01-21, Version 5.0.2
        * curl_xml plugin: Fix handling of file:// and other URLs (which don't
          follow HTTP status codes). Thanks to Fabien Wernli for his patch!
          technique of POWER CPUs. Thanks to AurĂ©lien Reynaud for his code and
          patience.
        * modbus plugin: Support for libmodbus 2.9.2 has been added and the
 -        license has been changes to LGPLv2.1.
 +        license has been changed to LGPLv2.1.
        * mysql plugin: Backwards compatibility code has been removed. The
          data sets used have been improved.
        * network plugin: The default buffer size has been increased to
        * v5upgrade target: Target for converting v4 data sets to the v5
          schema.
  
+ 2012-02-19, Version 4.10.6
+       * Build system: Fix problems when building the ipvs and iptables
+         plugins. Thanks to Sebastian Harl for his patch. A bashism in the
+         version-gen.sh script has been fixed. Thanks to Jo-Philipp Wich for
+         his patch.
+       * csv and rrdtool plugins: Print a more helpful error message when the
+         DataDir is a symlink pointing to a non-existing location. Thanks to
+         Jonathan Nieder for his patch.
+       * exec plugin: Fix a problem when using select(2) to read from file
+         handles. Thanks to Gerrie Roos for his patch.
+       * network plugin: An incorrect error message in the handling of the
+         "Interface" configuration option has been fixed. Thanks to Gerrie
+         Roos for his patch.
+       * oracle plugin: A potential endless loop in the error handling has
+         been fixed.
+       * python plugin: A crash bug in the configuration handling has been
+         fixed. Thanks to Sven Trenkel for his patch.
+       * interfaces plugin: The change which was supposed to ignore "bogus"
+         interfaces has been reverted, since it ignored legit interfaces, such
+         as bonding pseudo-devices as well.
  2012-01-21, Version 4.10.5
        * curl_xml plugin: Fix handling of file:// and other URLs (which don't
          follow HTTP status codes). Thanks to Fabien Wernli for his patch!
diff --combined configure.in
@@@ -1259,7 -1259,6 +1259,7 @@@ AC_CHECK_MEMBERS([kstat_io_t.nwritten, 
  #
  # Checks for libraries begin here
  #
 +
  with_libresolv="yes"
  AC_CHECK_LIB(resolv, res_search,
  [
@@@ -1786,68 -1785,118 +1786,118 @@@ AM_CONDITIONAL(BUILD_WITH_LIBGCRYPT, te
  # --with-libiptc {{{
  AC_ARG_WITH(libiptc, [AS_HELP_STRING([--with-libiptc@<:@=PREFIX@:>@], [Path to libiptc.])],
  [
-       if test "x$withval" != "xno" && test "x$withval" != "xyes"
+       if test "x$withval" = "xshipped"
        then
-               LIBIPTC_CPPFLAGS="$LIBIPTC_CPPFLAGS -I$withval/include"
-               LIBIPTC_LDFLAGS="$LIBIPTC_LDFLAGS -L$withval/lib"
-               with_libiptc="yes"
+               with_libiptc="own"
+       else if test "x$withval" = "xyes"
+       then
+               with_libiptc="pkgconfig"
+       else if test "x$withval" = "xno"
+       then
+               with_libiptc="no"
        else
-               with_libiptc="$withval"
-       fi
+               with_libiptc="yes"
+               with_libiptc_cflags="-I$withval/include"
+               with_libiptc_libs="-L$withval/lib"
+       fi; fi; fi
  ],
  [
        if test "x$ac_system" = "xLinux"
        then
-               with_libiptc="yes"
+               with_libiptc="pkgconfig"
        else
                with_libiptc="no (Linux only)"
        fi
  ])
- SAVE_CPPFLAGS="$CPPFLAGS"
- SAVE_LDFLAGS="$LDFLAGS"
- CPPFLAGS="$CPPFLAGS $LIBIPTC_CPPFLAGS"
- LDFLAGS="$LDFLAGS $LIBIPTC_LDFLAGS"
- # check whether the header file for libiptc is available.
- if test "x$with_libiptc" = "xyes"
+ if test "x$with_libiptc" = "xpkgconfig" && test "x$PKG_CONFIG" = "x"
  then
-       AC_CHECK_HEADERS(libiptc/libiptc.h,
-                        [with_libiptc="yes"],
-                        [with_libiptc="no (libiptc/libiptc.h not found)"])
+       with_libiptc="no (Don't have pkg-config)"
  fi
- if test "x$with_libiptc" = "xyes"
+ if test "x$with_libiptc" = "xpkgconfig"
+ then
+       $PKG_CONFIG --exists 'libiptc' 2>/dev/null
+       if test $? -ne 0
+       then
+               with_libiptc="no (pkg-config doesn't know libiptc)"
+       fi
+ fi
+ if test "x$with_libiptc" = "xpkgconfig"
  then
-       AC_CHECK_HEADERS(libiptc/libip6tc.h,
-                        [with_libiptc="yes"],
-                        [with_libiptc="no (libiptc/libip6tc.h not found)"])
+       with_libiptc_cflags="`$PKG_CONFIG --cflags 'libiptc'`"
+       if test $? -ne 0
+       then
+               with_libiptc="no ($PKG_CONFIG failed)"
+       fi
+       with_libiptc_libs="`$PKG_CONFIG --libs 'libiptc'`"
+       if test $? -ne 0
+       then
+               with_libiptc="no ($PKG_CONFIG failed)"
+       fi
+ fi
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $with_libiptc_cflags"
+ # check whether the header file for libiptc is available.
+ if test "x$with_libiptc" = "xpkgconfig"
+ then
+       AC_CHECK_HEADERS(libiptc/libiptc.h libiptc/libip6tc.h, ,
+                       [with_libiptc="no (header file missing)"])
  fi
  # If the header file is available, check for the required type declaractions.
  # They may be missing in old versions of libiptc. In that case, they will be
  # declared in the iptables plugin.
- if test "x$with_libiptc" = "xyes"
+ if test "x$with_libiptc" = "xpkgconfig"
  then
-       AC_CHECK_TYPES([iptc_handle_t, ip6tc_handle_t], [], [],
-       [
- #include <libiptc/libiptc.h>
- #include <libiptc/libip6tc.h>
-       ])
+       AC_CHECK_TYPES([iptc_handle_t, ip6tc_handle_t], [], [])
  fi
  # Check for the iptc_init symbol in the library.
- if test "x$with_libiptc" = "xyes"
+ if test "x$with_libiptc" = "xpkgconfig"
  then
        AC_CHECK_LIB(iptc, iptc_init,
-                    [with_libiptc="yes"],
-                    [with_libiptc="no (symbol 'iptc_init' not found)"])
+                       [with_libiptc="pkgconfig"],
+                       [with_libiptc="no"],
+                       [$with_libiptc_libs])
+ fi
+ if test "x$with_libiptc" = "xpkgconfig"
+ then
+       with_libiptc="yes"
  fi
+ CPPFLAGS="$SAVE_CPPFLAGS"
+ if test "x$with_libiptc" = "xown"
+ then
+       with_libiptc_cflags=""
+       with_libiptc_libs=""
+ fi
+ if test "x$with_libiptc" = "xown"
+ then
+       AC_CHECK_HEADERS(linux/netfilter_ipv4/ip_tables.h linux/netfilter_ipv6/ip6_tables.h linux/netfilter/x_tables.h, [],
+       [
+               with_libiptc="no (Linux iptables headers not found)"
+       ],
+       [
+ #include "$srcdir/src/owniptc/ipt_kernel_headers.h"
+       ])
+ fi
+ AM_CONDITIONAL(BUILD_WITH_OWN_LIBIPTC, test "x$with_libiptc" = "xown")
+ if test "x$with_libiptc" = "xown"
+ then
+       AC_DEFINE(OWN_LIBIPTC, 1, [Define to 1 if we use the shipped iptc library.])
+       with_libiptc="yes"
+ fi
  AM_CONDITIONAL(BUILD_WITH_LIBIPTC, test "x$with_libiptc" = "xyes")
  if test "x$with_libiptc" = "xyes"
  then
-       BUILD_WITH_LIBIPTC_CPPFLAGS="$LIBIPTC_CPPFLAGS"
-       BUILD_WITH_LIBIPTC_LDFLAGS="$LIBIPTC_LDFLAGS"
+       BUILD_WITH_LIBIPTC_CPPFLAGS="$with_libiptc_cflags"
+       BUILD_WITH_LIBIPTC_LDFLAGS="$with_libiptc_libs"
        AC_SUBST(BUILD_WITH_LIBIPTC_CPPFLAGS)
        AC_SUBST(BUILD_WITH_LIBIPTC_LDFLAGS)
  fi
- CPPFLAGS="$SAVE_CPPFLAGS"
- LDFLAGS="$SAVE_LDFLAGS"
  # }}}
  
  # --with-java {{{
  fi
  if test "x$with_libmodbus" = "xuse_pkgconfig"
  then
 -      AC_MSG_NOTICE([Checking for modbus using $PKG_CONFIG])
 -      $PKG_CONFIG --exists 'modbus' 2>/dev/null
 +      AC_MSG_NOTICE([Checking for libmodbus using $PKG_CONFIG])
 +      $PKG_CONFIG --exists 'libmodbus' 2>/dev/null
        if test $? -ne 0
        then
 -              with_libmodbus="no (pkg-config doesn't know modbus)"
 +              with_libmodbus="no (pkg-config doesn't know libmodbus)"
        fi
  fi
  if test "x$with_libmodbus" = "xuse_pkgconfig"
  then
 -      with_libmodbus_cflags="`$PKG_CONFIG --cflags 'modbus'`"
 +      with_libmodbus_cflags="`$PKG_CONFIG --cflags 'libmodbus'`"
        if test $? -ne 0
        then
                with_libmodbus="no ($PKG_CONFIG failed)"
        fi
 -      with_libmodbus_libs="`$PKG_CONFIG --libs 'modbus'`"
 +      with_libmodbus_libs="`$PKG_CONFIG --libs 'libmodbus'`"
        if test $? -ne 0
        then
                with_libmodbus="no ($PKG_CONFIG failed)"
  fi
  # }}}
  
 +# --with-libmongoc {{{
 +AC_ARG_WITH(libmongoc, [AS_HELP_STRING([--with-libmongoc@<:@=PREFIX@:>@], [Path to libmongoc.])],
 +[
 + if test "x$withval" = "xyes"
 + then
 +       with_libmongoc="yes"
 + else if test "x$withval" = "xno"
 + then
 +       with_libmongoc="no"
 + else
 +       with_libmongoc="yes"
 +       LIBMONGOC_CPPFLAGS="$LIBMONGOC_CPPFLAGS -I$withval/include"
 +       LIBMONGOC_LDFLAGS="$LIBMONGOC_LDFLAGS -L$withval/lib"
 + fi; fi
 +],
 +[with_libmongoc="yes"])
 +
 +SAVE_CPPFLAGS="$CPPFLAGS"
 +SAVE_LDFLAGS="$LDFLAGS"
 +
 +CPPFLAGS="$CPPFLAGS $LIBMONGOC_CPPFLAGS"
 +LDFLAGS="$LDFLAGS $LIBMONGOC_LDFLAGS"
 +
 +if test "x$with_libmongoc" = "xyes"
 +then
 +      if test "x$LIBMONGOC_CPPFLAGS" != "x"
 +      then
 +              AC_MSG_NOTICE([libmongoc CPPFLAGS: $LIBMONGOC_CPPFLAGS])
 +      fi
 +      AC_CHECK_HEADERS(mongo.h,
 +      [with_libmongoc="yes"],
 +      [with_libmongoc="no ('mongo.h' not found)"],
 +[#if HAVE_STDINT_H
 +# define MONGO_HAVE_STDINT 1
 +#else
 +# define MONGO_USE_LONG_LONG_INT 1
 +#endif
 +])
 +fi
 +if test "x$with_libmongoc" = "xyes"
 +then
 +      if test "x$LIBMONGOC_LDFLAGS" != "x"
 +      then
 +              AC_MSG_NOTICE([libmongoc LDFLAGS: $LIBMONGOC_LDFLAGS])
 +      fi
 +      AC_CHECK_LIB(mongoc, mongo_run_command,
 +      [with_libmongoc="yes"],
 +      [with_libmongoc="no (symbol 'mongo_run_command' not found)"])
 +fi
 +
 +CPPFLAGS="$SAVE_CPPFLAGS"
 +LDFLAGS="$SAVE_LDFLAGS"
 +
 +if test "x$with_libmongoc" = "xyes"
 +then
 +      BUILD_WITH_LIBMONGOC_CPPFLAGS="$LIBMONGOC_CPPFLAGS"
 +      BUILD_WITH_LIBMONGOC_LDFLAGS="$LIBMONGOC_LDFLAGS"
 +      AC_SUBST(BUILD_WITH_LIBMONGOC_CPPFLAGS)
 +      AC_SUBST(BUILD_WITH_LIBMONGOC_LDFLAGS)
 +fi
 +AM_CONDITIONAL(BUILD_WITH_LIBMONGOC, test "x$with_libmongoc" = "xyes")
 +# }}}
 +
  # --with-libmysql {{{
  with_mysql_config="mysql_config"
  with_mysql_cflags=""
@@@ -2282,7 -2268,7 +2332,7 @@@ the
  fi
  if test "x$with_libmysql" = "xyes"
  then
-       with_mysql_libs=`$with_mysql_config --libs 2>/dev/null`
+       with_mysql_libs=`$with_mysql_config --libs_r 2>/dev/null`
        mysql_config_status=$?
  
        if test $mysql_config_status -ne 0
  fi
  
  # AIX
 +
 +if test "x$ac_system" = "xAIX"
 +then
 +        plugin_tcpconns="yes"
 +fi
 +
  if test "x$with_perfstat" = "xyes"
  then
        plugin_cpu="yes"
@@@ -4759,10 -4739,8 +4809,10 @@@ AC_PLUGIN([varnish],     [$with_libvarn
  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_redis], [$with_libcredis],    [Redis output plugin])
 +AC_PLUGIN([write_mongodb], [$with_libmongoc],  [MongoDB output plugin])
  AC_PLUGIN([xmms],        [$with_libxmms],      [XMMS statistics])
  AC_PLUGIN([zfs_arc],     [$plugin_zfs_arc],    [ZFS ARC statistics])
  
@@@ -4905,7 -4883,7 +4955,7 @@@ AC_SUBST(LCC_VERSION_STRING
  
  AC_CONFIG_FILES(src/libcollectdclient/lcc_features.h)
  
 -AC_OUTPUT(Makefile src/Makefile src/collectd.conf src/owniptc/Makefile src/libcollectdclient/Makefile src/libcollectdclient/libcollectdclient.pc src/liboconfig/Makefile bindings/Makefile bindings/java/Makefile)
 +AC_OUTPUT(Makefile src/Makefile src/collectd.conf src/libcollectdclient/Makefile src/libcollectdclient/libcollectdclient.pc src/liboconfig/Makefile bindings/Makefile bindings/java/Makefile)
  
  if test "x$with_librrd" = "xyes" \
        && test "x$librrd_threadsafe" != "xyes"
@@@ -5087,10 -5065,8 +5137,10 @@@ Configuration
      vmem  . . . . . . . . $enable_vmem
      vserver . . . . . . . $enable_vserver
      wireless  . . . . . . $enable_wireless
 +    write_graphite  . . . $enable_write_graphite
      write_http  . . . . . $enable_write_http
      write_redis . . . . . $enable_write_redis
 +    write_mongodb . . . . $enable_write_mongodb
      xmms  . . . . . . . . $enable_xmms
      zfs_arc . . . . . . . $enable_zfs_arc
  
diff --combined src/collectd.conf.pod
@@@ -1933,11 -1933,11 +1933,11 @@@ 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<Uint16>|B<Uint32>|B<Float>
 +=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<Uint32>
 -or B<Float>, two 16E<nbsp>bit registers will be read and the data is combined
 -into one value. Defaults to B<Uint16>.
 +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<Type> I<Type>
  
@@@ -2786,7 -2786,18 +2786,18 @@@ operating systems
  =item B<MaxPacketSize> I<1024-65535>
  
  Set the maximum size for datagrams received over the network. Packets larger
- than this will be truncated. Defaults to 1452E<nbsp>bytes.
+ than this will be truncated. Defaults to 1452E<nbsp>bytes, which is the maximum
+ payload size that can be transmitted in one Ethernet frame using IPv6E<nbsp>/
+ UDP.
+ On the server side, this limit should be set to the largest value used on
+ I<any> client. Likewise, the value on the client must not be larger than the
+ value on the server, or data will be lost.
+ B<Compatibility:> Versions prior to I<versionE<nbsp>4.8> used a fixed sized
+ buffer of 1024E<nbsp>bytes. Versions I<4.8>, I<4.9> and I<4.10> used a default
+ value of 1024E<nbsp>bytes to avoid problems when sending data to an older
+ server.
  
  =item B<Forward> I<true|false>
  
@@@ -4177,19 -4188,19 +4188,19 @@@ L<collectd-snmp(5)>. Please see there f
  =head2 Plugin C<swap>
  
  The I<Swap plugin> collects information about used and available swap space. On
 -I<Solaris>, the following options are available:
 +I<Linux> and I<Solaris>, the following options are available:
  
  =over 4
  
  =item B<ReportByDevice> B<false>|B<true>
  
 -Configures how to report physical swap devices. If set to B<false> is used (the
 +Configures how to report physical swap devices. If set to B<false> (the
  default), the summary over all swap devices is reported only, i.e. the globally
  used and available space over all devices. If B<true> is configured, the used
  and available space of each device will be reported separately.
  
 -This option is only available if the I<Swap plugin> can use the L<swapctl(2)>
 -mechanism under I<Solaris>.
 +This option is only available if the I<Swap plugin> can read C</proc/swaps>
 +(under Linux) or use the L<swapctl(2)> mechanism (under I<Solaris>).
  
  =back
  
@@@ -4756,65 -4767,6 +4767,65 @@@ traffic (e.E<nbsp>g. due to headers an
  collect on-wire traffic you could, for example, use the logging facilities of
  iptables to feed data for the guest IPs into the iptables plugin.
  
 +=head2 Plugin C<write_graphite>
 +
 +The C<write_graphite> plugin writes data to I<Graphite>, an open-source metrics
 +storage and graphing project. The plugin connects to I<Carbon>, the data layer
 +of I<Graphite>, and sends data via the "line based" protocol (per default using
 +portE<nbsp>2003). The data will be sent in blocks of at most 1428 bytes to
 +minimize the number of network packets.
 +
 +Synopsis:
 +
 + <Plugin write_graphite>
 +   <Carbon>
 +     Host "localhost"
 +     Port "2003"
 +     Prefix "collectd"
 +   </Carbon>
 + </Plugin>
 +
 +=over 4
 +
 +=item B<Host> I<Address>
 +
 +Hostname or address to connect to. Defaults to C<localhost>.
 +
 +=item B<Port> I<Service>
 +
 +Service name or port number to connect to. Defaults to C<2003>.
 +
 +=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).
 +
 +=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).
 +
 +=item B<EscapeCharacter> I<Char>
 +
 +I<Carbon> uses the dot (C<.>) as escape character and doesn't allow whitespace
 +in the identifier. The B<EscapeCharacter> option determines which character
 +dots, whitespace and control characters are replaced with. Defaults to
 +underscore (C<_>).
 +
 +=item B<StoreRates> B<false>|B<true>
 +
 +If set to B<true>, convert counter values to rates. If set to B<false> (the
 +default) counter values are stored as is, i.E<nbsp>e. as an increasing integer
 +number.
 +
 +=item B<AlwaysAppendDS> B<false>|B<true>
 +
 +If set the 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.
 +
 +=back
 +
  =head2 Plugin C<write_http>
  
  This output plugin submits values to an http server by POST them using the