Merge branch 'collectd-5.5'
authorMarc Fournier <marc.fournier@camptocamp.com>
Tue, 9 Feb 2016 22:27:29 +0000 (23:27 +0100)
committerMarc Fournier <marc.fournier@camptocamp.com>
Tue, 9 Feb 2016 22:27:29 +0000 (23:27 +0100)
16 files changed:
ChangeLog
contrib/redhat/collectd.spec
contrib/systemd.collectd.service
contrib/wiki2changelog.pl
src/collectd.conf.pod
src/daemon/plugin.c
src/daemon/utils_ignorelist.c
src/daemon/utils_ignorelist.h
src/df.c
src/drbd.c
src/processes.c
src/turbostat.c
src/utils_mount.c
src/utils_mount.h
src/write_sensu.c
version-gen.sh

index b0a997c..48dc6ca 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,76 @@
+2016-01-22, Version 5.5.1
+       * Build system: Compilation errors have been avoided by correctly
+         defining package name and version used by autoconf. Thanks to Nathan
+         Berkley. #1063
+       * Build system: Dependency ordering was fixed to ensure parallel builds
+         work reliably. Thanks to Gustavo Zacarias. #1125
+       * Build system: Error messages have been improved and building the unit
+         tests has been fixed on Solaris. Thanks to Florian Forster and
+         Dagobert Michelsen. #1077
+       * Build system: The move of the "utils_ignorelist" functions has been
+         reverted. This fixes build issues of numerous plugins. Thanks to
+         Benjamin Drung;. #1323
+       * Build system: The fhcount plugin has been restricted to Linux. Thanks
+         to Ruben Kerkhof. #1195
+       * Build system: Detection of header files for the turbostat plugin has
+         been fixed. Thanks to Marc Fournier. #1075
+       * collectd: The "LC_NUMERIC" locale is now forced, to prevent issues
+         with some plugins on environments using a comma as decimal separator.
+         Thanks to Florian Forster. #1237
+       * Documentation: Some precisions related to the virt plugin have beed
+         added. Thanks to Wojtek Bocer and Ruben Kerkhof.
+       * Documentation: The CollectdInternalStats documentation has been
+         improved. Thanks to Yves Mettier and Florian Forster.
+       * Battery plugin: A missing Type has been added. Thanks to Marc
+         Fournier. #1338
+       * Bind plugin: An off-by-one error has been fixed: an index was checked
+         against a wrong variable, which may lead to an out-of-bounds read.
+         Thanks to Michal Humpula. #1123
+       * Ceph plugin: JSON parsing has been refactored to support ceph 10.0.0
+         and fixes several buffer overflows. Thanks to Florian Forster. #1350
+       * CPU plugin: A Mac OS X specific bug has been fixed: the plugin
+         expected an incorrect number of CPU states, resulting in failing read
+         callbacks. This regression was introduced in 5.5.0. Thanks to Robert
+         Viduya.
+       * Disk plugin: Support for Mac OS X 10.10 has been added. Thanks to
+         Robert Viduya. #1065
+       * IPC plugin: Support for building with musl-libc has been added. Thanks
+         to Natanael Copa. #1147
+       * Log Logstash plugin: A segfault when using libyajl, version 1 was
+         fixed. Thanks to Vincent Bernat. #1190
+       * Log Logstash plugin: The timestamp is now ISO 8601 compliant. Thanks
+         to Marc Fournier. #1132
+       * memcached plugin: The Type of the listen-disabled metric was fixed.
+         Thanks to Florian Forster. #1356
+       * MySQL plugin: The Type used by Innodb_buffer_pool_pages_flushed was
+         fixed. Thanks to Marek Becka. #1085
+       * OpenLDAP plugin: A crash when using LDAPI (LDAP-over-IPC) got fixed.
+         Thanks to Marek Becka. #1080
+       * OpenLDAP plugin: Support for Mac OS X has been added. Thanks to Ruben
+         Kerkhof. #1489
+       * SMART plugin: A memory leak has been fixed. Thanks to Florian
+         Schüller and Pierre-Yves Ritschard. #1076
+       * Swap plugin: A regression that would lead to swap usage being reported
+         in kilobytes (instead of bytes) has been fixed. Thanks to Marek Becka.
+         #1071
+       * Varnish plugin: Support for FreeBSD has been added. Thanks to Ruben
+         Kerkhof. #1182
+       * Varnish plugin: Support for versions 3 and 4 has been made more
+         tolerant to minor changes in Varnish point releases. Thanks to Marc
+         Fournier. #1302
+       * virt plugin: A copy-and-paste mistake in an error message has been
+         fixed. Thanks to Ruben Kerkhof. #1101
+       * Write Kafka plugin: Support for Solaris has been added. Thanks to
+         Shahul Hameed. #1171
+       * Write Redis plugin: Dead code has been removed. Thanks to Brian Kelly.
+         #1143
+       * 27 patches have been applied to numerous plugins and core components,
+         fixing various programming errors which were reported by scan-build,
+         libasan, FBInfer, coverity-scan and clang: Thanks to Ruben Kerkhof,
+         Florian Forster and Marek Becka.
+       * Collectd::Unixsock: A Perl error got corrected. Thanks to Ciaran Mac
+         An Iomaire. #1295
+
 2015-05-27, Version 5.5.0
        * Build system: Ability to make out-of-tree builds has been fixed.
          Thanks to Vincent Bernat. #792
index 4dfcc9a..f0feb90 100644 (file)
@@ -62,7 +62,6 @@
 %{?el7:%global _has_lvm2app_h 1}
 %{?el7:%global _has_libudev 1}
 %{?el7:%global _has_recent_librrd 1}
-%{?el7:%global _has_varnish4 1}
 %{?el7:%global _has_broken_libmemcached 1}
 %{?el7:%global _has_iproute 1}
 %{?el7:%global _has_atasmart 1}
 %define with_uptime 0%{!?_without_uptime:1}
 %define with_users 0%{!?_without_users:1}
 %define with_uuid 0%{!?_without_uuid:1}
-%define with_varnish 0%{!?_without_varnish:0%{!?_has_varnish4:1}}
+%define with_varnish 0%{!?_without_varnish:1}
 %define with_vmem 0%{!?_without_vmem:1}
 %define with_vserver 0%{!?_without_vserver:1}
 %define with_wireless 0%{!?_without_wireless:1}
index 0e758e4..c7806fe 100644 (file)
@@ -10,12 +10,22 @@ EnvironmentFile=-/etc/default/collectd
 ProtectSystem=full
 ProtectHome=true
 
-# drop all capabilities:
-CapabilityBoundingSet=
-# use this instead if you use the dns or ping plugin
-#CapabilityBoundingSet=CAP_NET_RAW
-# turn this on if you use the iptables next to the dns or ping plugin
+# A few plugins won't work without some privileges, which you'll have to
+# specify using the CapabilityBoundingSet directive below.
+#
+# Here's a (incomplete) list of the plugins known capability requirements:
+#   ceph            CAP_DAC_OVERRIDE
+#   dns             CAP_NET_RAW
+#   exec            CAP_SETUID CAP_SETGID
+#   iptables        CAP_NET_ADMIN
+#   ping            CAP_NET_RAW
+#   turbostat       CAP_SYS_RAWIO
+#
+# Example, if you use the iptables plugin alongside the dns or ping plugin:
 #CapabilityBoundingSet=CAP_NET_RAW CAP_NET_ADMIN
+#
+# By default, drop all capabilities:
+CapabilityBoundingSet=
 
 NoNewPrivileges=true
 
index b8fc965..e6affa5 100755 (executable)
@@ -64,8 +64,8 @@ while (<>)
 
        $line =~ s#\{\{Plugin\|([^}]+)\}\}#$1 plugin#g;
        $line =~ s@\{\{Issue\|([^}]+)\}\}@#$1@g;
-       $line =~ s#\[\[[^|]+\|([^\]]+)\]\]#$1#g;
-       $line =~ s#\[\[([^|]+)\]\]#$1#g;
+       $line =~ s#\[\[[^|\]]+\|([^\]]+)\]\]#$1#g;
+       $line =~ s#\[\[([^|\]]+)\]\]#$1#g;
 
        $line =~ s#'''(.*?)'''#*$1*#g;
        $line =~ s#''(.*?)''#$1#g;
index fde3493..6a94edc 100644 (file)
@@ -4500,6 +4500,18 @@ Sets the I<command file> to write to. Defaults to F</usr/local/nagios/var/rw/nag
 
 =head2 Plugin C<ntpd>
 
+The C<ntpd> plugin collects per-peer ntpd data such as time offset and time
+dispersion.
+
+For talking to B<ntpd>, it mimics what the B<ntpdc> control program does on
+wire - using B<mode 7> specific requests. This mode is deprecated with
+newer B<ntpd> releases (4.2.7p230 and later). For the C<ntpd> plugin to work
+correctly with them, the ntp daemon must be explicitly configured to
+enable B<mode 7> (which is disabled by default). Refer to the I<ntp.conf(5)>
+manual page for details.
+
+Available configuration options for the C<ntpd> plugin:
+
 =over 4
 
 =item B<Host> I<Hostname>
index 0919bdf..e5e0a45 100644 (file)
@@ -2402,7 +2402,7 @@ int plugin_dispatch_multivalue (value_list_t const *template, /* {{{ */
                case DS_TYPE_GAUGE:
                        vl->values[0].gauge = va_arg (ap, gauge_t);
                        if (store_percentage)
-                               vl->values[0].gauge *= 100.0 / sum;
+                               vl->values[0].gauge *= sum ? (100.0 / sum) : 0;
                        break;
                case DS_TYPE_ABSOLUTE:
                        vl->values[0].absolute = va_arg (ap, absolute_t);
index 60a8c27..1268838 100644 (file)
  * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  * See the GNU General Public Licence for more details.
  *
- * You should have received a copy of the GNU General Public
- * Licence along with this program; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
- * USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
  *
  * Authors:
  *   Lubos Stanek <lubek at users.sourceforge.net>
index b47b55a..db7535f 100644 (file)
  * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  * See the GNU General Public Licence for more details.
  *
- * You should have received a copy of the GNU General Public
- * Licence along with this program; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
- * USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
  *
  * Authors:
  *   Lubos Stanek <lubek at users.sourceforge.net>
index 53bc4a8..ff70172 100644 (file)
--- a/src/df.c
+++ b/src/df.c
@@ -270,11 +270,7 @@ static int df_read (void)
                else
                {
                        if (strcmp (mnt_ptr->dir, "/") == 0)
-                       {
-                               if (strcmp (mnt_ptr->type, "rootfs") == 0)
-                                       continue;
                                sstrncpy (disk_name, "root", sizeof (disk_name));
-                       }
                        else
                        {
                                int i, len;
index cc306dc..d46bb02 100644 (file)
@@ -142,8 +142,12 @@ static int drbd_read (void)
                                fields, STATIC_ARRAY_SIZE (fields));
 
                /* ignore headers (first two iterations) */
-               if (fields_num < 4)
+               if ((strcmp(fields[0], "version:") == 0) ||
+                               (strcmp(fields[0], "srcversion:") == 0) ||
+                               (strcmp(fields[0], "GIT-hash:") == 0))
+               {
                        continue;
+               }
 
                if (isdigit(fields[0][0]))
                {
index 924f6ce..a53d276 100644 (file)
@@ -314,7 +314,9 @@ static void ps_list_register (const char *name, const char *regexp)
                                        "`ProcessMatch' with the same name. "
                                        "All but the first setting will be "
                                        "ignored.");
+#if HAVE_REGEX_H
                        sfree (new->re);
+#endif
                        sfree (new);
                        return;
                }
@@ -1301,8 +1303,8 @@ static int read_fork_rate ()
 #endif /*KERNEL_LINUX */
 
 #if KERNEL_SOLARIS
-static const char *ps_get_cmdline (long pid, /* {{{ */
-               char *buffer, size_t buffer_size)
+static char *ps_get_cmdline (pid_t pid, char *name __attribute__((unused)), /* {{{ */
+    char *buffer, size_t buffer_size)
 {
        char path[PATH_MAX];
        psinfo_t info;
@@ -2415,7 +2417,7 @@ static int ps_read (void)
 
 
                ps_list_add (ps.name,
-                               ps_get_cmdline (pid, cmdline, sizeof (cmdline)),
+                               ps_get_cmdline (pid, ps.name, cmdline, sizeof (cmdline)),
                                &pse);
        } /* while(readdir) */
        closedir (proc);
index 5ab073d..14ce29f 100644 (file)
@@ -1516,7 +1516,7 @@ check_permissions(void)
        }
 
        if (euidaccess("/dev/cpu/0/msr", R_OK)) {
-               WARNING("turbostat plugin: Collectd cannot open"
+               WARNING("turbostat plugin: Collectd cannot open "
                        "/dev/cpu/0/msr. If you don't want to run collectd as "
                        "root, you need to change the ownership (chown) and "
                        "permissions on /dev/cpu/*/msr to allow such access");
@@ -1539,8 +1539,8 @@ turbostat_init(void)
        int ret;
 
        if (stat("/dev/cpu/0/msr", &sb)) {
-               ERROR("turbostat plugin: Initialization failed: /dev/cpu/0/msr"
-                     " does not exist while the CPU supports MSR. You may be "
+               ERROR("turbostat plugin: Initialization failed: /dev/cpu/0/msr "
+                     "does not exist while the CPU supports MSR. You may be "
                      "missing the corresponding kernel module, please try '# "
                      "modprobe msr'");
                return -1;
index f2b7943..36d8d64 100644 (file)
  * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  * See the GNU General Public Licence for more details.
  *
- * You should have received a copy of the GNU General Public
- * Licence along with this program; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
- * USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
  *
  * Author:
  *   Niki W. Waibel <niki.waibel@gmx.net>
index bc0077f..7518188 100644 (file)
  * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  * See the GNU General Public Licence for more details.
  *
- * You should have received a copy of the GNU General Public
- * Licence along with this program; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
- * USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
  *
  * Author:
  *   Niki W. Waibel <niki.waibel@gmx.net>
index 2336541..b09dcc8 100644 (file)
@@ -455,7 +455,7 @@ static char *sensu_value_to_json(struct sensu_host const *host, /* {{{ */
        }
 
        // incorporate sensu tags from config if any
-       if (strlen(sensu_tags) != 0) {
+       if ((sensu_tags != NULL) && (strlen(sensu_tags) != 0)) {
                res = asprintf(&temp_str, "%s, %s", ret_str, sensu_tags);
                free(ret_str);
                if (res == -1) {
@@ -752,7 +752,7 @@ static char *sensu_notification_to_json(struct sensu_host *host, /* {{{ */
        }
 
        // incorporate sensu tags from config if any
-       if (strlen(sensu_tags) != 0) {
+       if ((sensu_tags != NULL) && (strlen(sensu_tags) != 0)) {
                res = asprintf(&temp_str, "%s, %s", ret_str, sensu_tags);
                free(ret_str);
                if (res == -1) {
index 493a6eb..d7c6a76 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-DEFAULT_VERSION="5.5.0.git"
+DEFAULT_VERSION="5.5.1.git"
 
 if [ -d .git ]; then
        VERSION="`git describe --dirty=+ --abbrev=7 2> /dev/null | grep collectd | sed -e 's/^collectd-//' -e 's/-/./g'`"