From 3835b23a2576a239f463b09edadf0dcde5d26f2d Mon Sep 17 00:00:00 2001 From: Andrew Elwell Date: Sun, 26 Feb 2012 22:32:08 +0100 Subject: [PATCH 01/23] Also check in ip4tc for iptc_init ./configure --enable-iptables was failing on fedora as iptc_init wasn't found. This patches configure.in to also look in ip4tc Signed-off-by: Florian Forster --- configure.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.in b/configure.in index 0acad7064b..02a6361b6d 100644 --- a/configure.in +++ b/configure.in @@ -1649,9 +1649,10 @@ then AC_CHECK_TYPES([iptc_handle_t, ip6tc_handle_t], [], []) fi # Check for the iptc_init symbol in the library. +# This could be in iptc or ip4tc if test "x$with_libiptc" = "xpkgconfig" then - AC_CHECK_LIB(iptc, iptc_init, + AC_SEARCH_LIBS(iptc_init, [iptc ip4tc], [with_libiptc="pkgconfig"], [with_libiptc="no"], [$with_libiptc_libs]) From d01c62d62182d1291760fbdb7ed0244991d52b5e Mon Sep 17 00:00:00 2001 From: Timon Date: Tue, 28 Feb 2012 17:10:35 +0600 Subject: [PATCH 02/23] Fix buffer size for memcached stats answer Typical stats answer has ~1900 bytes length. $ memcached-tool localhost:11211 stats | wc -c 1863 But buffer for this answer was only 1024 bytes length. Signed-off-by: Florian Forster --- src/memcached.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/memcached.c b/src/memcached.c index 348591fd16..4c9e6adcb3 100644 --- a/src/memcached.c +++ b/src/memcached.c @@ -358,7 +358,7 @@ static void submit_gauge2 (const char *type, const char *type_inst, static int memcached_read (void) /* {{{ */ { - char buf[1024]; + char buf[4096]; char *fields[3]; char *ptr; char *line; From a1a7bcd42316459361cce17e4742e2f2eb664c60 Mon Sep 17 00:00:00 2001 From: Louis Opter Date: Tue, 28 Feb 2012 18:23:06 +0100 Subject: [PATCH 03/23] Use parse_value in the conntrack plugin and submit the result even if it's zero Dear collectd, Please find attached a patch for the conntrack plugin. The patch is about two things: 1. submit the value even if it is zero (which is a legitimate value according to types.db); 2. use parse_value and a value_t instead of directly using a double and atof(3). The first point was important because it meant that the metric was not created when the initial value was zero. (It could also lead to holes in your graphs). The parse_value return value is correctly checked, note that the parsed file ends with a \n which mean that parse_value always complain when running in debug/info maybe we should replace it with a \0 before handing the buffer to parse_value() ? Thanks -- Louis Opter Signed-off-by: Florian Forster --- src/conntrack.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/conntrack.c b/src/conntrack.c index e70ff5f183..4d67712447 100644 --- a/src/conntrack.c +++ b/src/conntrack.c @@ -31,14 +31,11 @@ #define CONNTRACK_FILE "/proc/sys/net/netfilter/nf_conntrack_count" -static void conntrack_submit (double conntrack) +static void conntrack_submit (value_t conntrack) { - value_t values[1]; value_list_t vl = VALUE_LIST_INIT; - values[0].gauge = conntrack; - - vl.values = values; + vl.values = &conntrack; vl.values_len = 1; sstrncpy (vl.host, hostname_g, sizeof (vl.host)); sstrncpy (vl.plugin, "conntrack", sizeof (vl.plugin)); @@ -49,7 +46,7 @@ static void conntrack_submit (double conntrack) static int conntrack_read (void) { - double conntrack; + value_t conntrack; FILE *fh; char buffer[64]; @@ -64,10 +61,10 @@ static int conntrack_read (void) } fclose (fh); - conntrack = atof (buffer); + if (parse_value (buffer, &conntrack, DS_TYPE_GAUGE) == -1) + return (-1); - if (conntrack > 0.0) - conntrack_submit (conntrack); + conntrack_submit (conntrack); return (0); } /* static int conntrack_read */ From f24b091a485607de74612a30b875f59453cf162a Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Wed, 29 Feb 2012 20:47:08 +0100 Subject: [PATCH 04/23] conntrack plugin: Strip newlie before calling parse_value(). Change-Id: Ifa4db20a6b937912db77a214d2c0ef3eeebfa164 --- src/conntrack.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/conntrack.c b/src/conntrack.c index 4d67712447..33236c4597 100644 --- a/src/conntrack.c +++ b/src/conntrack.c @@ -49,11 +49,13 @@ static int conntrack_read (void) value_t conntrack; FILE *fh; char buffer[64]; + size_t buffer_len; fh = fopen (CONNTRACK_FILE, "r"); if (fh == NULL) return (-1); + memset (buffer, 0, sizeof (buffer)); if (fgets (buffer, sizeof (buffer), fh) == NULL) { fclose (fh); @@ -61,7 +63,15 @@ static int conntrack_read (void) } fclose (fh); - if (parse_value (buffer, &conntrack, DS_TYPE_GAUGE) == -1) + /* strip trailing newline. */ + buffer_len = strlen (buffer); + while ((buffer_len > 0) && isspace ((int) buffer[buffer_len - 1])) + { + buffer[buffer_len - 1] = 0; + buffer_len--; + } + + if (parse_value (buffer, &conntrack, DS_TYPE_GAUGE) != 0) return (-1); conntrack_submit (conntrack); From 4814a7ce4b264e52c8c028241a4da36553d3ec5a Mon Sep 17 00:00:00 2001 From: Darrell Bishop Date: Sat, 5 Nov 2011 09:29:00 +0100 Subject: [PATCH 05/23] processes plugin: Support processes with spaces in their name. Fixes GitHub issue #11. Change-Id: Ifa9db0e020f19da43bbf49bba0626e70c16dc30f --- src/processes.c | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/src/processes.c b/src/processes.c index d56be25b82..37e84c5a00 100644 --- a/src/processes.c +++ b/src/processes.c @@ -880,10 +880,10 @@ int ps_read_process (int pid, procstat_t *ps, char *state) char *fields[64]; char fields_len; + char *bufp, *namep; int i; - int name_len; long long unsigned cpu_user_counter; long long unsigned cpu_system_counter; @@ -900,6 +900,21 @@ int ps_read_process (int pid, procstat_t *ps, char *state) return (-1); buffer[i] = 0; + /* Parse out ps->name while sanitizing any whitespace ( \t\r\n) in + the process name before calling strsplit + */ + for (bufp = buffer; *bufp != '\0' && *bufp != '('; bufp++); + if (*bufp == '\0' || *(++bufp) == '\0') + return (-1); + namep = ps->name; + while (*bufp != '\0' && *bufp != ')') { + *namep++ = *bufp; + if (*bufp == ' ' || *bufp == '\t' || *bufp == '\r' || *bufp == '\n') + *bufp = '_'; + bufp++; + } + *namep = '\0'; + fields_len = strsplit (buffer, fields, STATIC_ARRAY_SIZE (fields)); if (fields_len < 24) { @@ -909,18 +924,6 @@ int ps_read_process (int pid, procstat_t *ps, char *state) return (-1); } - /* copy the name, strip brackets in the process */ - name_len = strlen (fields[1]) - 2; - if ((fields[1][0] != '(') || (fields[1][name_len + 1] != ')')) - { - DEBUG ("No brackets found in process name: `%s'", fields[1]); - return (-1); - } - fields[1] = fields[1] + 1; - fields[1][name_len] = '\0'; - strncpy (ps->name, fields[1], PROCSTAT_NAME_LEN); - - *state = fields[2][0]; if (*state == 'Z') From b757d5e0576b138adbe6ab98bb11ac7c4dde8644 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Thu, 1 Mar 2012 09:56:56 +0100 Subject: [PATCH 06/23] processes plugin: Support processes with spaces in their names. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … without replacing the space in the process name. This is done by using an equivalent of strchr() and strrchr() to determine the boundaries of the second "field". Change-Id: Id4c1a84c0544554fae05623457d2a7a3e0630db2 --- src/processes.c | 81 +++++++++++++++++++++++++++++++------------------ 1 file changed, 52 insertions(+), 29 deletions(-) diff --git a/src/processes.c b/src/processes.c index 37e84c5a00..5e448cf9b2 100644 --- a/src/processes.c +++ b/src/processes.c @@ -880,10 +880,13 @@ int ps_read_process (int pid, procstat_t *ps, char *state) char *fields[64]; char fields_len; - char *bufp, *namep; - int i; + int buffer_len; + char *buffer_ptr; + size_t name_start_pos; + size_t name_end_pos; + size_t name_len; long long unsigned cpu_user_counter; long long unsigned cpu_system_counter; @@ -895,28 +898,48 @@ int ps_read_process (int pid, procstat_t *ps, char *state) ssnprintf (filename, sizeof (filename), "/proc/%i/stat", pid); - i = read_file_contents (filename, buffer, sizeof(buffer) - 1); - if (i <= 0) + buffer_len = read_file_contents (filename, + buffer, sizeof(buffer) - 1); + if (buffer_len <= 0) return (-1); - buffer[i] = 0; - - /* Parse out ps->name while sanitizing any whitespace ( \t\r\n) in - the process name before calling strsplit - */ - for (bufp = buffer; *bufp != '\0' && *bufp != '('; bufp++); - if (*bufp == '\0' || *(++bufp) == '\0') + buffer[buffer_len] = 0; + + /* The name of the process is enclosed in parens. Since the name can + * contain parens itself, spaces, numbers and pretty much everything + * else, use these to determine the process name. We don't use + * strchr(3) and strrchr(3) to avoid pointer arithmetic which would + * otherwise be required to determine name_len. */ + name_start_pos = 0; + while ((buffer[name_start_pos] != '(') + && (name_start_pos < buffer_len)) + name_start_pos++; + + name_end_pos = buffer_len; + while ((buffer[name_end_pos] != ')') + && (name_end_pos > 0)) + name_end_pos--; + + /* Either '(' or ')' is not found or they are in the wrong order. + * Anyway, something weird that shouldn't happen ever. */ + if (name_start_pos >= name_end_pos) + { + ERROR ("processes plugin: name_start_pos = %zu >= name_end_pos = %zu", + name_start_pos, name_end_pos); return (-1); - namep = ps->name; - while (*bufp != '\0' && *bufp != ')') { - *namep++ = *bufp; - if (*bufp == ' ' || *bufp == '\t' || *bufp == '\r' || *bufp == '\n') - *bufp = '_'; - bufp++; } - *namep = '\0'; - fields_len = strsplit (buffer, fields, STATIC_ARRAY_SIZE (fields)); - if (fields_len < 24) + name_len = (name_end_pos - name_start_pos) - 1; + if (name_len >= sizeof (ps->name)) + name_len = sizeof (ps->name) - 1; + + sstrncpy (ps->name, &buffer[name_start_pos + 1], name_len + 1); + + if ((buffer_len - name_end_pos) < 2) + return (-1); + buffer_ptr = &buffer[name_end_pos + 2]; + + fields_len = strsplit (buffer_ptr, fields, STATIC_ARRAY_SIZE (fields)); + if (fields_len < 22) { DEBUG ("processes plugin: ps_read_process (pid = %i):" " `%s' has only %i fields..", @@ -924,7 +947,7 @@ int ps_read_process (int pid, procstat_t *ps, char *state) return (-1); } - *state = fields[2][0]; + *state = fields[0][0]; if (*state == 'Z') { @@ -949,16 +972,16 @@ int ps_read_process (int pid, procstat_t *ps, char *state) return (0); } - cpu_user_counter = atoll (fields[13]); - cpu_system_counter = atoll (fields[14]); - vmem_size = atoll (fields[22]); - vmem_rss = atoll (fields[23]); - ps->vmem_minflt_counter = atol (fields[9]); - ps->vmem_majflt_counter = atol (fields[11]); + cpu_user_counter = atoll (fields[11]); + cpu_system_counter = atoll (fields[12]); + vmem_size = atoll (fields[20]); + vmem_rss = atoll (fields[21]); + ps->vmem_minflt_counter = atol (fields[7]); + ps->vmem_majflt_counter = atol (fields[9]); { - unsigned long long stack_start = atoll (fields[27]); - unsigned long long stack_ptr = atoll (fields[28]); + unsigned long long stack_start = atoll (fields[25]); + unsigned long long stack_ptr = atoll (fields[26]); stack_size = (stack_start > stack_ptr) ? stack_start - stack_ptr From 2e48eb524ab27e58d402ef2e88b12d84705cd2b3 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sun, 4 Mar 2012 11:10:20 +0100 Subject: [PATCH 07/23] perl plugin: Fix a race condition. This hopefully fixes GitHub issue #9. --- src/perl.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/src/perl.c b/src/perl.c index a2f5da299b..41e763dc09 100644 --- a/src/perl.c +++ b/src/perl.c @@ -1923,6 +1923,11 @@ static int perl_read (void) aTHX = t->interp; } + /* Assert that we're not running as the base thread. Otherwise, we might + * run into concurrency issues with c_ithread_create(). See + * https://github.com/collectd/collectd/issues/9 for details. */ + assert (aTHX != perl_threads->head->interp); + log_debug ("perl_read: c_ithread: interp = %p (active threads: %i)", aTHX, perl_threads->number_of_threads); return pplugin_call_all (aTHX_ PLUGIN_READ); @@ -1931,6 +1936,7 @@ static int perl_read (void) static int perl_write (const data_set_t *ds, const value_list_t *vl, user_data_t __attribute__((unused)) *user_data) { + int status; dTHX; if (NULL == perl_threads) @@ -1946,9 +1952,20 @@ static int perl_write (const data_set_t *ds, const value_list_t *vl, aTHX = t->interp; } + /* Lock the base thread if this is not called from one of the read threads + * to avoid race conditions with c_ithread_create(). See + * https://github.com/collectd/collectd/issues/9 for details. */ + if (aTHX == perl_threads->head->interp) + pthread_mutex_lock (&perl_threads->mutex); + log_debug ("perl_write: c_ithread: interp = %p (active threads: %i)", aTHX, perl_threads->number_of_threads); - return pplugin_call_all (aTHX_ PLUGIN_WRITE, ds, vl); + status = pplugin_call_all (aTHX_ PLUGIN_WRITE, ds, vl); + + if (aTHX == perl_threads->head->interp) + pthread_mutex_unlock (&perl_threads->mutex); + + return status; } /* static int perl_write (const data_set_t *, const value_list_t *) */ static void perl_log (int level, const char *msg, @@ -1969,7 +1986,17 @@ static void perl_log (int level, const char *msg, aTHX = t->interp; } + /* Lock the base thread if this is not called from one of the read threads + * to avoid race conditions with c_ithread_create(). See + * https://github.com/collectd/collectd/issues/9 for details. */ + if (aTHX == perl_threads->head->interp) + pthread_mutex_lock (&perl_threads->mutex); + pplugin_call_all (aTHX_ PLUGIN_LOG, level, msg); + + if (aTHX == perl_threads->head->interp) + pthread_mutex_unlock (&perl_threads->mutex); + return; } /* static void perl_log (int, const char *) */ From f426ea7a267251a63de8d1da78cf9766532a0ac3 Mon Sep 17 00:00:00 2001 From: Jason Schmidlapp Date: Wed, 29 Feb 2012 20:27:50 -0500 Subject: [PATCH 08/23] Fixed memory leak in collectdclient library. Signed-off-by: Florian Forster --- src/libcollectdclient/client.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libcollectdclient/client.c b/src/libcollectdclient/client.c index 0c748ba7fa..2f427a8329 100644 --- a/src/libcollectdclient/client.c +++ b/src/libcollectdclient/client.c @@ -746,6 +746,8 @@ int lcc_getval (lcc_connection_t *c, lcc_identifier_t *ident, /* {{{ */ if (ret_values_names != NULL) *ret_values_names = values_names; + lcc_response_free (&res); + return (0); } /* }}} int lcc_getval */ From b606324377a50ef87d6dd79464ab7902d81dc36d Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sun, 11 Mar 2012 12:13:37 +0100 Subject: [PATCH 09/23] snmp plugin: Keep track of signedness of ASN values. Prior to this, the signed variant was used when casting to gauge_t. This caused problems with values larger than 2^31-1, since they were casted to negative values. Hopefully fixes GitHub issue #50. --- src/snmp.c | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/src/snmp.c b/src/snmp.c index 1c2828c1fb..5c6cce2678 100644 --- a/src/snmp.c +++ b/src/snmp.c @@ -727,7 +727,9 @@ static value_t csnmp_value_list_to_value (struct variable_list *vl, int type, value_t ret; uint64_t tmp_unsigned = 0; int64_t tmp_signed = 0; - int defined = 1; + _Bool defined = 1; + /* Set to true when the original SNMP type appears to have been signed. */ + _Bool prefer_signed = 0; if ((vl->type == ASN_INTEGER) || (vl->type == ASN_UINTEGER) @@ -739,7 +741,12 @@ static value_t csnmp_value_list_to_value (struct variable_list *vl, int type, { tmp_unsigned = (uint32_t) *vl->val.integer; tmp_signed = (int32_t) *vl->val.integer; - DEBUG ("snmp plugin: Parsed int32 value is %"PRIi64".", tmp_signed); + + if ((vl->type == ASN_INTEGER) + || (vl->type == ASN_GAUGE)) + prefer_signed = 1; + + DEBUG ("snmp plugin: Parsed int32 value is %"PRIu64".", tmp_unsigned); } else if (vl->type == ASN_COUNTER64) { @@ -828,14 +835,24 @@ static value_t csnmp_value_list_to_value (struct variable_list *vl, int type, } else if (type == DS_TYPE_GAUGE) { - ret.gauge = NAN; - if (defined != 0) + if (!defined) + ret.gauge = NAN; + else if (prefer_signed) ret.gauge = (scale * tmp_signed) + shift; + else + ret.gauge = (scale * tmp_unsigned) + shift; } else if (type == DS_TYPE_DERIVE) - ret.derive = (derive_t) tmp_signed; + { + if (prefer_signed) + ret.derive = (derive_t) tmp_signed; + else + ret.derive = (derive_t) tmp_unsigned; + } else if (type == DS_TYPE_ABSOLUTE) + { ret.absolute = (absolute_t) tmp_unsigned; + } else { ERROR ("snmp plugin: csnmp_value_list_to_value: Unknown data source " From b21e598ce9b4dc65261119fa1c8551ebc98fda78 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sun, 11 Mar 2012 12:57:10 +0100 Subject: [PATCH 10/23] network plugin: Fix compiler warnings. Resolves GitHub issue #49. --- src/network.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/network.c b/src/network.c index 700b27f09c..06cc2c5012 100644 --- a/src/network.c +++ b/src/network.c @@ -704,7 +704,7 @@ static int parse_part_values (void **ret_buffer, size_t *ret_buffer_len, exp_size = 3 * sizeof (uint16_t) + pkg_numval * (sizeof (uint8_t) + sizeof (value_t)); - if ((buffer_len < 0) || (buffer_len < exp_size)) + if (buffer_len < exp_size) { WARNING ("network plugin: parse_part_values: " "Packet too short: " @@ -789,7 +789,7 @@ static int parse_part_number (void **ret_buffer, size_t *ret_buffer_len, uint16_t pkg_length; - if ((buffer_len < 0) || ((size_t) buffer_len < exp_size)) + if (buffer_len < exp_size) { WARNING ("network plugin: parse_part_number: " "Packet too short: " @@ -828,7 +828,7 @@ static int parse_part_string (void **ret_buffer, size_t *ret_buffer_len, uint16_t pkg_length; - if ((buffer_len < 0) || (buffer_len < header_size)) + if (buffer_len < header_size) { WARNING ("network plugin: parse_part_string: " "Packet too short: " From 7c0343ce60a3c51edb409de96dc08e2cc7a88abf Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sun, 11 Mar 2012 13:04:13 +0100 Subject: [PATCH 11/23] collectd.conf(5): Improve the network plugin's documentation. The example given was confusing since it didn't make it clear enough, that only one "Server" stanza is required. Resolves GitHub issue #19. --- src/collectd.conf.pod | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/collectd.conf.pod b/src/collectd.conf.pod index 62374b625c..74249d7f7f 100644 --- a/src/collectd.conf.pod +++ b/src/collectd.conf.pod @@ -2502,10 +2502,18 @@ The default IPv6 multicast group is C. The default IPv4 multicast group is C<239.192.74.66>. The default I port is B<25826>. Both, B and B can be used as single option or as block. When -used as block, given options are valid for this socket only. For example: +used as block, given options are valid for this socket only. The following +example will export the metrics twice: Once to an "internal" server (without +encryption and signing) and one to an external server (with cryptographic +signature): + # Export to an internal server + # (demonstrates usage without additional options) Server "collectd.internal.tld" + + # Export to an external server + # (demonstrates usage with signature options) SecurityLevel "sign" Username "myhostname" From 8991abf98de418b8464aa0f3251b024c9292da96 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sun, 11 Mar 2012 14:47:24 +0100 Subject: [PATCH 12/23] amqp plugin: Fix compabitility with current librabbitmq. In particular, add compatibility to the 0.9.1 and current development version. Unfortunately, no version macro exists, so we need to do some autoconf trickery :( Fixes GitHub issue #6. --- configure.in | 41 ++++++++++++++++++++++++++------------- src/amqp.c | 54 +++++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 79 insertions(+), 16 deletions(-) diff --git a/configure.in b/configure.in index 265d503d51..e30d0f8855 100644 --- a/configure.in +++ b/configure.in @@ -3244,26 +3244,39 @@ AC_ARG_WITH(librabbitmq, [AS_HELP_STRING([--with-librabbitmq@<:@=PREFIX@:>@], [P [ with_librabbitmq="yes" ]) +SAVE_CPPFLAGS="$CPPFLAGS" +SAVE_LDFLAGS="$LDFLAGS" +CPPFLAGS="$CPPFLAGS $with_librabbitmq_cppflags" +LDFLAGS="$LDFLAGS $with_librabbitmq_ldflags" 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" - + # librabbitmq up to version 0.9.1 provides "library_errno", later + # versions use "library_error". The library does not provide a version + # macro :( Use "AC_CHECK_MEMBERS" (plural) for automatic defines. + AC_CHECK_MEMBERS([amqp_rpc_reply_t.library_errno],,, + [ +#if HAVE_STDLIB_H +# include +#endif +#if HAVE_STDIO_H +# include +#endif +#if HAVE_STDINT_H +# include +#endif +#if HAVE_INTTYPES_H +# include +#endif +#include + ]) +fi +if test "x$with_librabbitmq" = "xyes" +then 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 @@ -3275,6 +3288,8 @@ then AC_SUBST(BUILD_WITH_LIBRABBITMQ_LIBS) AC_DEFINE(HAVE_LIBRABBITMQ, 1, [Define if librabbitmq is present and usable.]) fi +CPPFLAGS="$SAVE_CPPFLAGS" +LDFLAGS="$SAVE_LDFLAGS" AM_CONDITIONAL(BUILD_WITH_LIBRABBITMQ, test "x$with_librabbitmq" = "xyes") # }}} diff --git a/src/amqp.c b/src/amqp.c index be1f709e12..55d2a2ceff 100644 --- a/src/amqp.c +++ b/src/amqp.c @@ -1,7 +1,7 @@ /** * collectd - src/amqp.c - * Copyright (C) 2009 Sebastien Pahl - * Copyright (C) 2010 Florian Forster + * Copyright (C) 2009 Sebastien Pahl + * Copyright (C) 2010-2012 Florian Forster * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -178,8 +178,13 @@ static char *camqp_strerror (camqp_config_t *conf, /* {{{ */ break; case AMQP_RESPONSE_LIBRARY_EXCEPTION: +#if HAVE_AMQP_RPC_REPLY_T_LIBRARY_ERRNO if (r.library_errno) return (sstrerror (r.library_errno, buffer, buffer_size)); +#else + if (r.library_error) + return (sstrerror (r.library_error, buffer, buffer_size)); +#endif else sstrncpy (buffer, "End of stream", sizeof (buffer)); break; @@ -216,6 +221,7 @@ static char *camqp_strerror (camqp_config_t *conf, /* {{{ */ return (buffer); } /* }}} char *camqp_strerror */ +#if HAVE_AMQP_RPC_REPLY_T_LIBRARY_ERRNO static int camqp_create_exchange (camqp_config_t *conf) /* {{{ */ { amqp_exchange_declare_ok_t *ed_ret; @@ -246,6 +252,46 @@ static int camqp_create_exchange (camqp_config_t *conf) /* {{{ */ return (0); } /* }}} int camqp_create_exchange */ +#else +static int camqp_create_exchange (camqp_config_t *conf) /* {{{ */ +{ + amqp_exchange_declare_ok_t *ed_ret; + amqp_table_t argument_table; + struct amqp_table_entry_t_ argument_table_entries[1]; + + if (conf->exchange_type == NULL) + return (0); + + /* Valid arguments: "auto_delete", "internal" */ + argument_table.num_entries = STATIC_ARRAY_SIZE (argument_table_entries); + argument_table.entries = argument_table_entries; + argument_table_entries[0].key = amqp_cstring_bytes ("auto_delete"); + argument_table_entries[0].value.kind = AMQP_FIELD_KIND_BOOLEAN; + argument_table_entries[0].value.value.boolean = 1; + + ed_ret = amqp_exchange_declare (conf->connection, + /* channel = */ CAMQP_CHANNEL, + /* exchange = */ amqp_cstring_bytes (conf->exchange), + /* type = */ amqp_cstring_bytes (conf->exchange_type), + /* passive = */ 0, + /* durable = */ 0, + /* arguments = */ argument_table); + if ((ed_ret == NULL) && camqp_is_error (conf)) + { + char errbuf[1024]; + ERROR ("amqp plugin: amqp_exchange_declare failed: %s", + camqp_strerror (conf, errbuf, sizeof (errbuf))); + camqp_close_connection (conf); + return (-1); + } + + INFO ("amqp plugin: Successfully created exchange \"%s\" " + "with type \"%s\".", + conf->exchange, conf->exchange_type); + + return (0); +} /* }}} int camqp_create_exchange */ +#endif static int camqp_setup_queue (camqp_config_t *conf) /* {{{ */ { @@ -316,7 +362,9 @@ static int camqp_setup_queue (camqp_config_t *conf) /* {{{ */ /* consumer_tag = */ AMQP_EMPTY_BYTES, /* no_local = */ 0, /* no_ack = */ 1, - /* exclusive = */ 0); + /* exclusive = */ 0, + /* arguments = */ AMQP_EMPTY_TABLE + ); if ((cm_ret == NULL) && camqp_is_error (conf)) { char errbuf[1024]; From ffcee9ab7119fb0580d3d4e3938316d3c29d6352 Mon Sep 17 00:00:00 2001 From: Clemens Lang Date: Sat, 10 Mar 2012 02:30:26 +0100 Subject: [PATCH 13/23] Makefile adds dependency on $(LIBLTDL), which is valued "-lltdl" When building on OS X, the collectd build failed, because the collectd target has a dependency on "-lltdl", which is the value the variable $(LIBLTDL) has. Obviously, this should be the file name instead. I am however not sure how to specify the correct filename in this case. Fixes GitHub issue #54. Signed-off-by: Florian Forster --- src/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile.am b/src/Makefile.am index 0c427dc866..fd85107f1d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -85,7 +85,7 @@ endif if BUILD_WITH_OWN_LIBOCONFIG collectd_LDADD += $(LIBLTDL) liboconfig/liboconfig.la -collectd_DEPENDENCIES += $(LIBLTDL) liboconfig/liboconfig.la +collectd_DEPENDENCIES += liboconfig/liboconfig.la else collectd_LDADD += -loconfig endif From 0e1a7a85d9eae9ea4a0d85a065c2b201099d4225 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Fri, 16 Mar 2012 17:44:50 +0100 Subject: [PATCH 14/23] collectd.conf(5): Document the "Hits" and "Hysteresis" threshold options. Fixes GitHub issue #53. --- src/collectd.conf.pod | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/collectd.conf.pod b/src/collectd.conf.pod index 74249d7f7f..274e38879f 100644 --- a/src/collectd.conf.pod +++ b/src/collectd.conf.pod @@ -4704,6 +4704,34 @@ percentage value, relative to the other data sources. This is helpful for example for the "df" type, where you may want to issue a warning when less than 5E% of the total space is available. Defaults to B. +=item B I + +Delay creating the notification until the threshold has been passed I +times. When a notification has been generated, or when a subsequent value is +inside the threshold, the counter is reset. If, for example, a value is +collected once every 10Eseconds and B is set to 3, a notification +will be dispatched at most once every 30Eseconds. + +This is useful when short bursts are not a problem. If, for example, 100% CPU +usage for up to a minute is normal (and data is collected every +10Eseconds), you could set B to B<6> to account for this. + +=item B I + +When set to non-zero, a hysteresis value is applied when checking minimum and +maximum bounds. This is useful for values that increase slowly and fluctuate a +bit while doing so. When these values come close to the threshold, they may +"flap", i.e. switch between failure / warning case and okay case repeatedly. + +If, for example, the threshold is configures as + + WarningMax 100.0 + Hysteresis 1.0 + +then a I notification is created when the value exceeds I<101> and the +corresponding I notification is only created once the value falls below +I<99>, thus avoiding the "flapping". + =back =head1 FILTER CONFIGURATION From 921d36e4b820ee1539f0da22c824e2739f1e546f Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Fri, 16 Mar 2012 18:26:08 +0100 Subject: [PATCH 15/23] src/common.c: parse_value: Strip trailing whitespace before parsing. This hopefully avoids the annoying "trailing garbage" message when the buffer only contains a newline or space at the end. --- src/common.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/src/common.c b/src/common.c index 530f733093..c5bd6470aa 100644 --- a/src/common.c +++ b/src/common.c @@ -849,9 +849,25 @@ int parse_identifier (char *str, char **ret_host, return (0); } /* int parse_identifier */ -int parse_value (const char *value, value_t *ret_value, int ds_type) +int parse_value (const char *value_orig, value_t *ret_value, int ds_type) { + char *value; char *endptr = NULL; + size_t value_len; + + if (value_orig == NULL) + return (EINVAL); + + value = strdup (value_orig); + if (value == NULL) + return (ENOMEM); + value_len = strlen (value); + + while ((value_len > 0) && isspace ((int) value[value_len - 1])) + { + value[value_len - 1] = 0; + value_len--; + } switch (ds_type) { @@ -872,11 +888,13 @@ int parse_value (const char *value, value_t *ret_value, int ds_type) break; default: + sfree (value); ERROR ("parse_value: Invalid data source type: %i.", ds_type); return -1; } if (value == endptr) { + sfree (value); ERROR ("parse_value: Failed to parse string as %s: %s.", DS_TYPE_TO_STRING (ds_type), value); return -1; @@ -884,8 +902,9 @@ int parse_value (const char *value, value_t *ret_value, int ds_type) else if ((NULL != endptr) && ('\0' != *endptr)) INFO ("parse_value: Ignoring trailing garbage \"%s\" after %s value. " "Input string was \"%s\".", - endptr, DS_TYPE_TO_STRING (ds_type), value); + endptr, DS_TYPE_TO_STRING (ds_type), value_orig); + sfree (value); return 0; } /* int parse_value */ From cb2155af369ed84a6badba6d3ebab3e5ae37c245 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sun, 18 Mar 2012 09:14:54 +0100 Subject: [PATCH 16/23] tcpconns plugin: Include rather than . It appears that is being deprecated / moved. This hopefully fixes Debian bug #664429. --- configure.in | 1 + src/tcpconns.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/configure.in b/configure.in index 02a6361b6d..1dc23bf24b 100644 --- a/configure.in +++ b/configure.in @@ -1234,6 +1234,7 @@ AM_CONDITIONAL(BUILD_WITH_LIBKVM_GETSWAPINFO, test "x$with_kvm_getswapinfo" = "x AC_CHECK_LIB(kvm, kvm_nlist, [with_kvm_nlist="yes"], [with_kvm_nlist="no"]) if test "x$with_kvm_nlist" = "xyes" then + AC_CHECK_HEADERS(bsd/nlist.h nlist.h) AC_DEFINE(HAVE_LIBKVM_NLIST, 1, [Define to 1 if you have the 'kvm' library with the 'kvm_nlist' symbol (-lkvm)]) with_libkvm="yes" diff --git a/src/tcpconns.c b/src/tcpconns.c index d68cd0968c..78c337b768 100644 --- a/src/tcpconns.c +++ b/src/tcpconns.c @@ -116,7 +116,11 @@ # include # include # include -# include +# if !defined(HAVE_BSD_NLIST_H) || !HAVE_BSD_NLIST_H +# include +# else /* HAVE_BSD_NLIST_H */ +# include +# endif # include #endif /* HAVE_LIBKVM_NLIST */ From 1cdf817c74f6c4e2136dce840ab33af072f91733 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Mon, 19 Mar 2012 10:47:22 +0100 Subject: [PATCH 17/23] src/common.h: Add comment about return value of read_file_contents(). --- src/common.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/common.h b/src/common.h index 229f7098d6..c292abfdfb 100644 --- a/src/common.h +++ b/src/common.h @@ -283,6 +283,7 @@ typedef int (*dirwalk_callback_f)(const char *dirname, const char *filename, void *user_data); int walk_directory (const char *dir, dirwalk_callback_f callback, void *user_data, int hidden); +/* Returns the number of bytes read or negative on error. */ int read_file_contents (const char *filename, char *buf, int bufsize); counter_t counter_diff (counter_t old_value, counter_t new_value); From 12213f8dfeee3feb3846aa658def0bb79c1211d0 Mon Sep 17 00:00:00 2001 From: Cyril Feraudet Date: Mon, 19 Mar 2012 11:08:06 +0100 Subject: [PATCH 18/23] Proposal fix for large "MaxPacketSize" use. When we use a "MaxPacketSize" over two thousand of octets (to pass huge message in notification for example), buffer may not be flushed for a while. By flushing buffer when there is about 1400 octets, we're sure there is no data too longer in. --- src/network.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network.c b/src/network.c index 06cc2c5012..f7f47c7ac4 100644 --- a/src/network.c +++ b/src/network.c @@ -2715,7 +2715,7 @@ static int network_write (const data_set_t *ds, const value_list_t *vl, ERROR ("network plugin: Unable to append to the " "buffer for some weird reason"); } - else if ((network_config_packet_size - send_buffer_fill) < 15) + else if (send_buffer_fill >= 1452 - 15) { flush_buffer (); } From 14edce51af9b810ac2a22d737a719a957495221a Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Fri, 23 Mar 2012 22:21:43 +0100 Subject: [PATCH 19/23] network plugin: Do not forward received notifications. The network plugin would send out all notifications it got through its callback, even the ones it received itself and even when forwarding was disabled. With this patch the network plugin will only transmit notifications created locally -- forwarding of notifications is not implemented due to missing loop-detection. For loop-detection we would have to keep track of the last timestamp of each notifications, and since each host/plugin/type/-instance field may be empty, this is not as straight forward as with value lists. If someone needs this, they will need to invest some work I'm afraid. --- src/network.c | 80 +++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 71 insertions(+), 9 deletions(-) diff --git a/src/network.c b/src/network.c index f7f47c7ac4..339a5011c2 100644 --- a/src/network.c +++ b/src/network.c @@ -351,6 +351,43 @@ static _Bool check_send_okay (const value_list_t *vl) /* {{{ */ return (!received); } /* }}} _Bool check_send_okay */ +static _Bool check_notify_received (const notification_t *n) /* {{{ */ +{ + notification_meta_t *ptr; + + for (ptr = n->meta; ptr != NULL; ptr = ptr->next) + if ((strcmp ("network:received", ptr->name) == 0) + && (ptr->type == NM_TYPE_BOOLEAN)) + return ((_Bool) ptr->nm_value.nm_boolean); + + return (0); +} /* }}} _Bool check_notify_received */ + +static _Bool check_send_notify_okay (const notification_t *n) /* {{{ */ +{ + static c_complain_t complain_forwarding = C_COMPLAIN_INIT_STATIC; + _Bool received = 0; + + if (n->meta == NULL) + return (1); + + received = check_notify_received (n); + + if (network_config_forward && received) + { + c_complain_once (LOG_ERR, &complain_forwarding, + "network plugin: A notification has been received via the network " + "forwarding if enabled. Forwarding of notifications is currently " + "not supported, because there is not loop-deteciton available. " + "Please contact the collectd mailing list if you need this " + "feature."); + } + + /* By default, only *send* value lists that were not *received* by the + * network plugin. */ + return (!received); +} /* }}} _Bool check_send_notify_okay */ + static int network_dispatch_values (value_list_t *vl, /* {{{ */ const char *username) { @@ -414,6 +451,29 @@ static int network_dispatch_values (value_list_t *vl, /* {{{ */ return (0); } /* }}} int network_dispatch_values */ +static int network_dispatch_notification (notification_t *n) /* {{{ */ +{ + int status; + + assert (n->meta == NULL); + + status = plugin_notification_meta_add_boolean (n, "network:received", 1); + if (status != 0) + { + ERROR ("network plugin: plugin_notification_meta_add_boolean failed."); + plugin_notification_meta_free (n->meta); + n->meta = NULL; + return (status); + } + + status = plugin_dispatch_notification (n); + + plugin_notification_meta_free (n->meta); + n->meta = NULL; + + return (status); +} /* }}} int network_dispatch_notification */ + #if HAVE_LIBGCRYPT static gcry_cipher_hd_t network_get_aes256_cypher (sockent_t *se, /* {{{ */ const void *iv, size_t iv_size, const char *username) @@ -1464,7 +1524,7 @@ static int parse_packet (sockent_t *se, /* {{{ */ } else { - plugin_dispatch_notification (&n); + network_dispatch_notification (&n); } } else if (pkg_type == TYPE_SEVERITY) @@ -3069,15 +3129,17 @@ static int network_config (oconfig_item_t *ci) /* {{{ */ } /* }}} int network_config */ static int network_notification (const notification_t *n, - user_data_t __attribute__((unused)) *user_data) + user_data_t __attribute__((unused)) *user_data) { char buffer[network_config_packet_size]; char *buffer_ptr = buffer; int buffer_free = sizeof (buffer); int status; - memset (buffer, '\0', sizeof (buffer)); + if (!check_send_notify_okay (n)) + return (0); + memset (buffer, 0, sizeof (buffer)); status = write_part_number (&buffer_ptr, &buffer_free, TYPE_TIME, (uint64_t) n->time); @@ -3092,7 +3154,7 @@ static int network_notification (const notification_t *n, if (strlen (n->host) > 0) { status = write_part_string (&buffer_ptr, &buffer_free, TYPE_HOST, - n->host, strlen (n->host)); + n->host, strlen (n->host)); if (status != 0) return (-1); } @@ -3100,7 +3162,7 @@ static int network_notification (const notification_t *n, if (strlen (n->plugin) > 0) { status = write_part_string (&buffer_ptr, &buffer_free, TYPE_PLUGIN, - n->plugin, strlen (n->plugin)); + n->plugin, strlen (n->plugin)); if (status != 0) return (-1); } @@ -3108,8 +3170,8 @@ static int network_notification (const notification_t *n, if (strlen (n->plugin_instance) > 0) { status = write_part_string (&buffer_ptr, &buffer_free, - TYPE_PLUGIN_INSTANCE, - n->plugin_instance, strlen (n->plugin_instance)); + TYPE_PLUGIN_INSTANCE, + n->plugin_instance, strlen (n->plugin_instance)); if (status != 0) return (-1); } @@ -3117,7 +3179,7 @@ static int network_notification (const notification_t *n, if (strlen (n->type) > 0) { status = write_part_string (&buffer_ptr, &buffer_free, TYPE_TYPE, - n->type, strlen (n->type)); + n->type, strlen (n->type)); if (status != 0) return (-1); } @@ -3125,7 +3187,7 @@ static int network_notification (const notification_t *n, if (strlen (n->type_instance) > 0) { status = write_part_string (&buffer_ptr, &buffer_free, TYPE_TYPE_INSTANCE, - n->type_instance, strlen (n->type_instance)); + n->type_instance, strlen (n->type_instance)); if (status != 0) return (-1); } From 1676cc920f366dfa38dbddce8be5f6b6c64754e7 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sat, 31 Mar 2012 17:27:14 +0200 Subject: [PATCH 20/23] Revert "Proposal fix for large "MaxPacketSize" use." This reverts commit 12213f8dfeee3feb3846aa658def0bb79c1211d0. --- src/network.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network.c b/src/network.c index 339a5011c2..34cd1c0151 100644 --- a/src/network.c +++ b/src/network.c @@ -2775,7 +2775,7 @@ static int network_write (const data_set_t *ds, const value_list_t *vl, ERROR ("network plugin: Unable to append to the " "buffer for some weird reason"); } - else if (send_buffer_fill >= 1452 - 15) + else if ((network_config_packet_size - send_buffer_fill) < 15) { flush_buffer (); } From 716a701876f324fa220adaf65a12ed5984eba80d Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sun, 1 Apr 2012 11:51:38 +0200 Subject: [PATCH 21/23] Bump version to 4.10.7; Update ChangeLog. --- ChangeLog | 29 +++++++++++++++++++++++++++++ version-gen.sh | 2 +- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 9bcfbc28fa..32e9ba3363 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,32 @@ +2012-03-23, Version 4.10.7 + * Build system: Fix the use of a libltdl macro. Thanks to Clemens Lang + for fixing this. Adresses some issues with building the iptables + plugin under Gentoo. + * libcollectdclient: A memory leak in the lcc_getval() function has + been fixed. Thanks to Jason Schmidlapp for finding and fixing this + issue. + * bind plugin: The use of 'QType" types has been fixed. + * df plugin: Fixed compiler issue under Mac OS X 10.7. + * conntrack plugin: Support zero as legitimate value. Thanks to Louis + Opter for his patch. + * memcached plugin: Increased the size of a static buffer, which was + truncating status messages form memcached. Thanks to Timon for the + patch. + * network plugin: Forwarding of notifications has been disabled. This + was a contition not checked for before, which may retult in an + endless loop. + * processes plugin: Support for process names with spaces has been + added to the Linux implementation. Thanks to Darrell Bishop for his + patch. + * perl plugin: A race condition in several callbacks, including log and + write callbacks, has been fixed. Thanks to "Rrpv" for reporting this + bug. + * snmp plugin: A bug when casting unsigned integers to gauge values has + been fixed: Unsigned integers would be cast to a signed integer and + then to a gauge, possibly resulting in a negative value. + * tcpconns plugin: Compilation with newer versions of the FreeBSD + runtime has been fixed. + 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 diff --git a/version-gen.sh b/version-gen.sh index 386a1c1c00..15ff80f03d 100755 --- a/version-gen.sh +++ b/version-gen.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -DEFAULT_VERSION="4.10.6.git" +DEFAULT_VERSION="4.10.7.git" VERSION="`git describe 2> /dev/null | sed -e 's/^collectd-//'`" From 5cf091d2e55d6904c2989f6d36e97cf12342b139 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sun, 1 Apr 2012 12:06:24 +0200 Subject: [PATCH 22/23] Bump version to 5.0.4; Update ChangeLog. --- ChangeLog | 29 +++++++++++++++++++++++++++++ version-gen.sh | 2 +- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 1beef6eb25..df882c81ba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,32 @@ +2012-04-01, Version 5.0.4 + * Build system: Fix the use of a libltdl macro. Thanks to Clemens Lang + for fixing this. Adresses some issues with building the iptables + plugin under Gentoo. + * libcollectdclient: A memory leak in the lcc_getval() function has + been fixed. Thanks to Jason Schmidlapp for finding and fixing this + issue. + * bind plugin: The use of 'QType" types has been fixed. + * df plugin: Fixed compiler issue under Mac OS X 10.7. + * conntrack plugin: Support zero as legitimate value. Thanks to Louis + Opter for his patch. + * memcached plugin: Increased the size of a static buffer, which was + truncating status messages form memcached. Thanks to Timon for the + patch. + * network plugin: Forwarding of notifications has been disabled. This + was a contition not checked for before, which may retult in an + endless loop. + * processes plugin: Support for process names with spaces has been + added to the Linux implementation. Thanks to Darrell Bishop for his + patch. + * perl plugin: A race condition in several callbacks, including log and + write callbacks, has been fixed. Thanks to "Rrpv" for reporting this + bug. + * snmp plugin: A bug when casting unsigned integers to gauge values has + been fixed: Unsigned integers would be cast to a signed integer and + then to a gauge, possibly resulting in a negative value. + * tcpconns plugin: Compilation with newer versions of the FreeBSD + runtime has been fixed. + 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 diff --git a/version-gen.sh b/version-gen.sh index 6147b59955..d55464316f 100755 --- a/version-gen.sh +++ b/version-gen.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -DEFAULT_VERSION="5.0.3.git" +DEFAULT_VERSION="5.0.4.git" VERSION="`git describe 2> /dev/null | sed -e 's/^collectd-//'`" From 005b30336048fac4a7af48125861d736990c1454 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sun, 1 Apr 2012 12:06:42 +0200 Subject: [PATCH 23/23] ChangeLog: Correct date. --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 32e9ba3363..92ef7fb4ed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -2012-03-23, Version 4.10.7 +2012-04-01, Version 4.10.7 * Build system: Fix the use of a libltdl macro. Thanks to Clemens Lang for fixing this. Adresses some issues with building the iptables plugin under Gentoo.