author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Thu, 16 Oct 2008 20:14:28 +0000 (22:14 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Thu, 16 Oct 2008 20:14:28 +0000 (22:14 +0200) |
ChangeLog | patch | blob | history | |
contrib/collection.cgi | patch | blob | history | |
contrib/exec-munin.px | patch | blob | history | |
src/Makefile.am | patch | blob | history | |
src/collectd.conf.in | patch | blob | history | |
src/collectd.h | patch | blob | history | |
src/perl.c | patch | blob | history | |
src/postgresql.c | patch | blob | history | |
src/types.db | patch | blob | history | |
src/utils_tail.c | patch | blob | history |
diff --git a/ChangeLog b/ChangeLog
index 00a04add0303557e4a5f328c8494703236d39bca..474f56fd7354047f2d88658f824299c53be93b84 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
* thermal plugin: The new thermal plugin collects system temperatures
using Linux ACPI thermal zone data.
+2008-10-16, Version 4.4.4
+ * build system: Change `--enable-<plugin>' to abort with an error if
+ dependencies are not met. Thanks to Bruno Prémont for the patch.
+ Also, the poisoning of various string functions has been restricted
+ to debug builds.
+ * collectd: Fix a memory leak in the global value cache. With every
+ *missing* value a couple of bytes would be leaked. Another memory
+ leak in the configuration handling code has been fixed. Thanks to
+ Niraj Tolia for reporting these issues.
+ * collectd: Fix an off-by-one error in the ignorelist functionality.
+ When using regular expressions, the last character would be missing,
+ possibly matching differently from what one would expect.
+ * collectdmon: Don't block SIGCHLD. This fixes a potential portability
+ problem.
+ * collectd-nagios: Fix handling of the `-d' option. Thanks to Fabian
+ Linzberger for reporting the but.
+ * network plugin: Fix a memory leak in the configuration handling
+ code. Thanks to Niraj Tolia for reporting this issue.
+ * perl plugin: Log an error message if bootstrapping `Collectd' fails.
+ * tail plugin: Call `clearerr' after reading an EOF. This fixes
+ problems with some `libc's. Thanks to Matthias Lay for reporting the
+ bug.
+
2008-09-01, Version 4.4.3
* collectd: Fix a memory leak in the threshold checking code.
* memcached plugin: Fix a too short timeout and a related file
diff --git a/contrib/collection.cgi b/contrib/collection.cgi
index fb4947dcc529f7cba32701b05a7f5f1857617c16..7de8bcc839b49341d7d03aedceada67a96abf1f4 100755 (executable)
--- a/contrib/collection.cgi
+++ b/contrib/collection.cgi
'GPRINT:max:MAX:%5.1lf%sAh Max,',
'GPRINT:avg:LAST:%5.1lf%sAh Last\l'
],
+ connections => ['-v', 'Connections',
+ 'DEF:avg={file}:value:AVERAGE',
+ 'DEF:min={file}:value:MIN',
+ 'DEF:max={file}:value:MAX',
+ "AREA:max#$HalfBlue",
+ "AREA:min#$Canvas",
+ "LINE1:avg#$FullBlue:Connections",
+ 'GPRINT:min:MIN:%4.1lf Min,',
+ 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
+ 'GPRINT:max:MAX:%4.1lf Max,',
+ 'GPRINT:avg:LAST:%4.1lf Last\l'
+ ],
cpu => ['-v', 'CPU load',
'DEF:avg={file}:value:AVERAGE',
'DEF:min={file}:value:MIN',
diff --git a/contrib/exec-munin.px b/contrib/exec-munin.px
index 246095649657ac66f050c2f5de2e14a8d398875b..223a8a5ecf9c84e811a427751abe69ed4ca89b06 100755 (executable)
--- a/contrib/exec-munin.px
+++ b/contrib/exec-munin.px
main ();
exit (0);
-# Configuration
-# {{{
+# Configuration {{{
=head1 CONFIGURATION
diff --git a/src/Makefile.am b/src/Makefile.am
index b9b7ab89b3dbf1dc6e732ef6059ce9b008eb01bc..b20d7009391aa26ae178f109f08062f8b8e266b1 100644 (file)
--- a/src/Makefile.am
+++ b/src/Makefile.am
ascent_la_CFLAGS = $(AM_CFLAGS) \
$(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
ascent_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
-collectd_LDADD += "-dlopen" apache.la
+collectd_LDADD += "-dlopen" ascent.la
collectd_DEPENDENCIES += ascent.la
endif
$(INSTALL) -m 0640 collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf; \
fi; \
cp -f $(srcdir)/types.db $(DESTDIR)$(pkglibdir)/;
- $(INSTALL) -D -m 0644 $(srcdir)/postgresql_default.conf \
+ $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
+ $(INSTALL) -m 0644 $(srcdir)/postgresql_default.conf \
$(DESTDIR)$(pkgdatadir)/postgresql_default.conf;
diff --git a/src/collectd.conf.in b/src/collectd.conf.in
index 53abd3fabdcab0f5ad92f7792da55af3ce12ed55..0597273f43e83936891ba91b4035ca26df405f95 100644 (file)
--- a/src/collectd.conf.in
+++ b/src/collectd.conf.in
# BaseName "Collectd::Plugin"
# EnableDebugger ""
# LoadPlugin foo
+#
+# <Plugin foo>
+# Foo "Bar"
+# Qux "Baz"
+# </Plugin>
#</Plugin>
#<Plugin ping>
diff --git a/src/collectd.h b/src/collectd.h
index 196530fbc3dfdedec57048ff6da2e602b0554d1f..6fed9002e02713d6ce59e13ea5840d207cd2acc0 100644 (file)
--- a/src/collectd.h
+++ b/src/collectd.h
# define __attribute__(x) /**/
#endif
-#if __GNUC__
+#if defined(COLLECT_DEBUG) && COLLECT_DEBUG && defined(__GNUC__) && __GNUC__
# pragma GCC poison strcpy strcat strtok
#endif
* included.
*/
#ifndef DONT_POISON_SPRINTF_YET
-# if __GNUC__
+# if defined(COLLECT_DEBUG) && COLLECT_DEBUG && defined(__GNUC__) && __GNUC__
# pragma GCC poison sprintf
# endif
#endif
diff --git a/src/perl.c b/src/perl.c
index d3e8c29ec9de071ff5d42988020a2eee40d30c80..d9e1e00fb75f927341401058f85e3b53a68c0718 100644 (file)
--- a/src/perl.c
+++ b/src/perl.c
#include <EXTERN.h>
#include <perl.h>
-#if __GNUC__
+#if defined(COLLECT_DEBUG) && COLLECT_DEBUG && defined(__GNUC__) && __GNUC__
# pragma GCC poison sprintf
#endif
diff --git a/src/postgresql.c b/src/postgresql.c
index 43f5af563af18e04d7a5478030565aa26055e93d..a5bacf49b2a4fc8df8aeaabbbdb2c8b4e3e63e4b 100644 (file)
--- a/src/postgresql.c
+++ b/src/postgresql.c
static void c_psql_database_delete (c_psql_database_t *db)
{
PQfinish (db->conn);
+ db->conn = NULL;
sfree (db->queries);
db->queries_num = 0;
}
rows = PQntuples (res);
- if (1 > rows)
+ if (1 > rows) {
+ PQclear (res);
return 0;
+ }
cols = PQnfields (res);
if (query->cols_num != cols) {
log_err ("SQL query returned wrong number of fields "
"(expected: %i, got: %i)", query->cols_num, cols);
log_info ("SQL query was: %s", query->query);
+ PQclear (res);
return -1;
}
submit_gauge (db, col.type, col.type_instance, value);
}
}
+ PQclear (res);
return 0;
} /* c_psql_exec_query */
int j;
+ /* this will happen during reinitialization */
+ if (NULL != db->conn) {
+ c_psql_check_connection (db);
+ continue;
+ }
+
status = ssnprintf (buf, buf_len, "dbname = '%s'", db->database);
if (0 < status) {
buf += status;
diff --git a/src/types.db b/src/types.db
index 21d15d64580c58246fe36324717734cc1c9df04c..67d8f0d3979d6f6ea5711c50fa661f2c6b7ddf43 100644 (file)
--- a/src/types.db
+++ b/src/types.db
signal_noise value:GAUGE:U:0
signal_power value:GAUGE:U:0
signal_quality value:GAUGE:0:U
+spam_check value:GAUGE:0:U
spam_score value:GAUGE:U:U
swap value:GAUGE:0:1099511627776
tcp_connections value:GAUGE:0:4294967295
diff --git a/src/utils_tail.c b/src/utils_tail.c
index eaf8f738d71e163d628fdfca13f0f32c3678c3a1..904a52122e7e40d4d6ebcc47788d218fe99888fa 100644 (file)
--- a/src/utils_tail.c
+++ b/src/utils_tail.c
/* Try to read from the filehandle. If that succeeds, everything appears to
* be fine and we can return. */
+ clearerr (obj->fh);
if (fgets (buf, buflen, obj->fh) != NULL)
{
buf[buflen - 1] = 0;