+2013-01-27, Version 5.1.2
+ * Build system: "make distcheck" has been fixed. Build fixes Solaris
+ and systems without gcrypt. Thanks to Yves Mettier for his patches.
+ * collectd: The complaint mechanism was fixed. It reported messages
+ more frequently than intended.
+ * collectd-tg: A manual page has been added.
+ * dns plugin: Build issues on FreeBSD have been fixed. Thanks to
+ Ed Schouten for his patch.
+ * ethstat plugin: Fix the "Map" config option. An incorrectly used
+ character pointer may lead to a segmentation fault.
+ * network plugin: Build issues on FreeBSD have been fixed. Thanks to
+ Ed Schouten for his patch.
+ * postgresql plugin: A memory leak in the writing code has been fixed.
+ Thanks to Sebastian Harl for fixing this problem.
+ * redis plugin: A build failure has been fixed. Thanks to Pierre-Yves
+ Ritschard for his patch.
+ * varnish plugin: Fix a problem with instances without name.
+ * write_graphite: A regression which rendered the "SeparateInstances"
+ and "AlwaysAppendDS" options unusable has been fixed. A failed
+ assertion when using types with many data sources has been fixed.
+ Improve reporting of connection errors to not spam log files too
+ much. Thanks to Pierre-Yves Ritschard for reporting the logging
+ problem.
+ * zfs_arc plugin: Fix the type used for mutex misses. Thanks to Yves
+ Mettier for reporting this bug.
+
2012-11-17, Version 5.2.0
* collectd: The performance of the LISTVAL command has been improved.
Thanks to Yves Mettier for the patch.
* tcpconns plugin: Use a netlink socket rather than reading from /proc
for improved performance. Thanks to Michael Stapelberg for the patch.
+2013-01-25, Version 5.1.2
+ * Build system: "make distcheck" has been fixed. Thanks to Yves
+ Mettier for his patches.
+ * collectd: The complaint mechanism was fixed. It reported messages
+ more frequently than intended.
+ * dns plugin: Build issues on FreeBSD have been fixed. Thanks to
+ Ed Schouten for his patch.
+ * ethstat plugin: Fix the "Map" config option. An incorrectly used
+ character pointer may lead to a segmentation fault.
+ * network plugin: Build issues on FreeBSD have been fixed. Thanks to
+ Ed Schouten for his patch.
+ * varnish plugin: Fix a problem with instances without name.
+ * write_graphite: Improve reporting of connection errors to not spam
+ log files too much. Thanks to Pierre-Yves Ritschard for reporting
+ this problem.
+ * zfs_arc plugin: Fix the type used for mutex misses. Thanks to Yves
+ Mettier for reporting this bug.
+
2012-11-11, Version 5.1.1
* collectd: Create new directories with mode 0777 and let umask remove
unwanted permission bits.
endif
EXTRA_DIST = perl/Makefile.PL \
+ perl/uninstall_mod.pl \
perl/lib/Collectd.pm \
perl/lib/Collectd/Unixsock.pm \
perl/lib/Collectd/Plugins/Monitorus.pm \
# Perl 'make uninstall' does not work as well as wanted.
# So we do the work here.
uninstall-local:
- rm -f $(DESTDIR)$(mandir)/man3/Collectd::Unixsock.3pm
- rm -f $(DESTDIR)$(datarootdir)/perl5/Collectd.pm
- rm -f $(DESTDIR)$(datarootdir)/perl5/Collectd/Plugins/OpenVZ.pm
- rm -f $(DESTDIR)$(datarootdir)/perl5/Collectd/Unixsock.pm
- rm -f $(DESTDIR)$(prefix)/lib64/perl5/perllocal.pod
- rm -f $(DESTDIR)$(prefix)/lib64/perl5/auto/Collectd/.packlist
+ @PERL@ -I$(DESTDIR)$(prefix) $(srcdir)/perl/uninstall_mod.pl Collectd
+ find $(DESTDIR)$(prefix) -name "perllocal.pod" -exec rm {} \;
clean-local:
rm -rf buildperl
buildperl/Makefile: .perl-directory-stamp buildperl/Makefile.PL \
$(top_builddir)/config.status
- cd buildperl && @PERL@ Makefile.PL INSTALL_BASE=$(prefix) @PERL_BINDINGS_OPTIONS@
+ cd buildperl && @PERL@ Makefile.PL INSTALL_BASE=$(DESTDIR)$(prefix) @PERL_BINDINGS_OPTIONS@
buildperl/Makefile.PL: .perl-directory-stamp $(top_builddir)/config.status
--- /dev/null
+#! /usr/bin/perl
+
+use strict;
+use ExtUtils::Installed;
+
+my $mod = $ARGV[0] || die "Usage : $0 Module\n";
+my $inst = ExtUtils::Installed->new();
+unlink $inst->files($mod), $inst->packlist($mod)->packlist_file();
&& rm -f -r src/libcollectdclient/.libs \
&& rm -f src/libcollectdclient/*.o \
&& rm -f src/libcollectdclient/*.la \
-&& rm -f src/libcollectdclient/*.lo
+&& rm -f src/libcollectdclient/*.lo \
+&& rm -f bindings/.perl-directory-stamp \
+&& rm -f -r bindings/buildperl
]
)
-AM_INIT_AUTOMAKE(dist-bzip2)
+AM_INIT_AUTOMAKE([tar-pax dist-bzip2])
AC_LANG(C)
AC_PREFIX_DEFAULT("/opt/collectd")
fi
pinba.pb-c.c pinba.pb-c.h: pinba.proto
- protoc-c --c_out . pinba.proto
+ protoc-c -I$(srcdir) --c_out . $(srcdir)/pinba.proto
install-exec-hook:
$(mkinstalldirs) $(DESTDIR)$(sysconfdir)
BUILT_SOURCES = collectd/lcc_features.h
libcollectdclient_la_SOURCES = client.c network.c network_buffer.c
-libcollectdclient_la_CPPFLAGS = $(AM_CPPFLAGS)
+libcollectdclient_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src
libcollectdclient_la_LDFLAGS = -version-info 1:0:0
libcollectdclient_la_LIBADD =
if BUILD_WITH_LIBGCRYPT
/**
* collectd - src/utils_complain.c
- * Copyright (C) 2006-2007 Florian octo Forster
+ * Copyright (C) 2006-2013 Florian octo Forster
* Copyright (C) 2008 Sebastian tokkee Harl
*
* This program is free software; you can redistribute it and/or modify it
static int vcomplain (int level, c_complain_t *c,
const char *format, va_list ap)
{
- time_t now;
+ cdtime_t now;
char message[512];
- now = time (NULL);
+ now = cdtime ();
if (c->last + c->interval > now)
return 0;
else
c->interval *= 2;
- if (c->interval > 86400)
- c->interval = 86400;
+ if (c->interval > TIME_T_TO_CDTIME_T (86400))
+ c->interval = TIME_T_TO_CDTIME_T (86400);
vsnprintf (message, sizeof (message), format, ap);
message[sizeof (message) - 1] = '\0';
{
va_list ap;
- /* reset the old interval */
- if (c->interval < 0)
- c->interval *= -1;
-
va_start (ap, format);
- vcomplain (level, c, format, ap);
+ if (vcomplain (level, c, format, ap))
+ c->complained_once = 1;
va_end (ap);
} /* c_complain */
{
va_list ap;
- if (c->interval < 0)
+ if (c->complained_once)
return;
va_start (ap, format);
if (vcomplain (level, c, format, ap))
- c->interval *= -1;
+ c->complained_once = 1;
va_end (ap);
} /* c_complain_once */
return;
c->interval = 0;
+ c->complained_once = 0;
va_start (ap, format);
vsnprintf (message, sizeof (message), format, ap);
/**
* collectd - src/utils_complain.h
- * Copyright (C) 2006-2007 Florian octo Forster
+ * Copyright (C) 2006-2013 Florian octo Forster
* Copyright (C) 2008 Sebastian tokkee Harl
*
* This program is free software; you can redistribute it and/or modify it
#ifndef UTILS_COMPLAIN_H
#define UTILS_COMPLAIN_H 1
-#include <time.h>
+#include "utils_time.h"
typedef struct
{
/* time of the last report */
- time_t last;
+ cdtime_t last;
- /* how long to wait until reporting again
- * 0 indicates that the complaint is no longer valid
- * < 0 indicates that the complaint has been reported once
- * => c_complain_once will not report again
- * => c_complain uses the absolute value to reset the old value */
- int interval;
+ /* How long to wait until reporting again.
+ * 0 indicates that the complaint is no longer valid. */
+ cdtime_t interval;
+
+ _Bool complained_once;
} c_complain_t;
-#define C_COMPLAIN_INIT_STATIC { 0, 0 }
-#define C_COMPLAIN_INIT(c) do { (c)->last = 0; (c)->interval = 0; } while (0)
+#define C_COMPLAIN_INIT_STATIC { 0, 0, 0 }
+#define C_COMPLAIN_INIT(c) do { \
+ (c)->last = 0; \
+ (c)->interval = 0; \
+ (c)->complained_once = 0; \
+} while (0)
/*
* NAME
#include "plugin.h"
#include "common.h"
-#if HAVE_NETINET_IN_SYSTM_H
-# include <netinet/in_systm.h>
-#endif
-#if HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-#if HAVE_NETINET_IP6_H
-# include <netinet/ip6.h>
-#endif
-#if HAVE_NETINET_IP_COMPAT_H
-# include <netinet/ip_compat.h>
-#endif
-#if HAVE_ARPA_INET_H
-# include <arpa/inet.h>
-#endif
#if HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
-#if HAVE_ARPA_NAMESER_H
-# include <arpa/nameser.h>
-#endif
-#if HAVE_ARPA_NAMESER_COMPAT_H
-# include <arpa/nameser_compat.h>
-#endif
-
#if HAVE_NET_IF_ARP_H
# include <net/if_arp.h>
#endif
#if HAVE_NET_IF_H
# include <net/if.h>
#endif
-#if HAVE_NETINET_IF_ETHER_H
-# include <netinet/if_ether.h>
-#endif
#if HAVE_NET_PPP_DEFS_H
# include <net/ppp_defs.h>
#endif
# include <net/if_ppp.h>
#endif
-#if HAVE_NETDB_H
-# include <netdb.h>
+#if HAVE_NETINET_IN_SYSTM_H
+# include <netinet/in_systm.h>
+#endif
+#if HAVE_NETINET_IN_H
+# include <netinet/in.h>
+#endif
+#if HAVE_NETINET_IP6_H
+# include <netinet/ip6.h>
+#endif
+#if HAVE_NETINET_IP_COMPAT_H
+# include <netinet/ip_compat.h>
+#endif
+#if HAVE_NETINET_IF_ETHER_H
+# include <netinet/if_ether.h>
#endif
-
#if HAVE_NETINET_IP_H
# include <netinet/ip.h>
#endif
#ifdef HAVE_NETINET_IP_VAR_H
# include <netinet/ip_var.h>
#endif
-#if HAVE_NETINET_IP6_H
-# include <netinet/ip6.h>
-#endif
#if HAVE_NETINET_UDP_H
# include <netinet/udp.h>
#endif
+#if HAVE_ARPA_INET_H
+# include <arpa/inet.h>
+#endif
+#if HAVE_ARPA_NAMESER_H
+# include <arpa/nameser.h>
+#endif
+#if HAVE_ARPA_NAMESER_COMPAT_H
+# include <arpa/nameser_compat.h>
+#endif
+
+#if HAVE_NETDB_H
+# include <netdb.h>
+#endif
+
#if HAVE_PCAP_H
# include <pcap.h>
#endif
* Copyright (C) 2011 Scott Sanders
* Copyright (C) 2009 Paul Sadauskas
* Copyright (C) 2009 Doug MacEachern
- * Copyright (C) 2007-2012 Florian octo Forster
+ * Copyright (C) 2007-2013 Florian octo Forster
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
#include "configfile.h"
#include "utils_cache.h"
+#include "utils_complain.h"
#include "utils_parse_option.h"
#include "utils_format_graphite.h"
cdtime_t send_buf_init_time;
pthread_mutex_t send_lock;
+ c_complain_t init_complaint;
};
if (cb->sock_fd < 0)
{
char errbuf[1024];
- ERROR ("write_graphite plugin: Connecting to %s:%s failed. "
+ c_complain (LOG_ERR, &cb->init_complaint,
+ "write_graphite plugin: Connecting to %s:%s failed. "
"The last error was: %s", node, service,
sstrerror (errno, errbuf, sizeof (errbuf)));
close (cb->sock_fd);
return (-1);
}
+ else
+ {
+ c_release (LOG_INFO, &cb->init_complaint,
+ "write_graphite plugin: Successfully connected to %s:%s.",
+ node, service);
+ }
wg_reset_buffer (cb);
status = wg_callback_init (cb);
if (status != 0)
{
- ERROR ("write_graphite plugin: wg_callback_init failed.");
+ /* An error message has already been printed. */
pthread_mutex_unlock (&cb->send_lock);
return (-1);
}
status = wg_callback_init (cb);
if (status != 0)
{
- ERROR ("write_graphite plugin: wg_callback_init failed.");
+ /* An error message has already been printed. */
pthread_mutex_unlock (&cb->send_lock);
return (-1);
}
if (status != 0) /* error message has been printed already. */
return (status);
+ /* Send the message to graphite */
wg_send_message (buffer, cb);
if (status != 0)
{
- ERROR ("write_graphite plugin: wg_send_message failed "
- "with status %i.", status);
+ /* An error message has already been printed. */
return (status);
}
cb->format_flags = GRAPHITE_STORE_RATES;
pthread_mutex_init (&cb->send_lock, /* attr = */ NULL);
+ C_COMPLAIN_INIT (&cb->init_complaint);
for (i = 0; i < ci->children_num; i++)
{
#!/usr/bin/env bash
-DEFAULT_VERSION="5.2.0.git"
+DEFAULT_VERSION="5.2.1.git"
VERSION="`git describe 2> /dev/null | sed -e 's/^collectd-//'`"