author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sun, 19 Feb 2017 12:07:39 +0000 (13:07 +0100) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sun, 19 Feb 2017 12:07:39 +0000 (13:07 +0100) |
Conflicts:
contrib/redhat/collectd.spec
src/Makefile.am
src/dpdkstat.c
contrib/redhat/collectd.spec
src/Makefile.am
src/dpdkstat.c
diff --git a/ChangeLog b/ChangeLog
index db0b0621126eeef1ada772da159de68b213ea165..9f1b639fc9f0081de2957664c64b0779edfbd93d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
+2017-01-23, Version 5.7.1
+ * collectd: Handling of boolean configuration options has been unified.
+ Thanks to Sebastian Harl. #2083, #2098
+ * collectd: Reporting of internal statistics has been fixed. Thanks to
+ Florian Forster. #2108
+ * collectd, various plugins: Bugs and issues reported by scan-build and
+ coverity-scan have been fixed. Thanks to Ruben Kerkhof and Florian
+ Forster.
+ * Build system: Parallel build have been fixed. Thanks to Ruben Kerkhof.
+ #2110
+ * DPDKStat plugin: Portability issues and a double-close bug have been
+ fixed. Thanks to Ruben Kerkhof and Marc Fournier.
+ * Intel RDT plugin: A check for the libpqos library version has been
+ added. Thanks to Serhiy Pshyk.
+ * NetApp plugin: Compilation problems have been corrected. Thanks to
+ Florian Forster. #2120
+ * Write Prometheus plugin: A memory leak has been fixed. Thanks to Ruben
+ Kerkhof.
+
2016-12-12, Version 5.7.0
* Documentation: The Turbostat plugin section has been improved. Thanks
to Florian Forster
index 350c35790e8f44fb1defe6ac6a5a95dbcea83fa2..faf7ced73b3253ea9039a32a4d37d431529066a1 100644 (file)
Summary: Statistics collection and monitoring daemon
Name: collectd
-Version: 5.7.0
-Release: 4%{?dist}
+Version: 5.7.1
+Release: 1%{?dist}
URL: https://collectd.org
Source: https://collectd.org/files/%{name}-%{version}.tar.bz2
License: GPLv2
%doc contrib/
%changelog
+* Tue Jan 01 2017 Marc Fournier <marc.fournier@camptocamp.com> - 5.7.1-1
+- New upstream version
+
* Sat Dec 31 2016 Ruben Kerkhof <ruben@rubenkerkhof.com> - 5.7.0-4
- Add new ovs_events plugin
diff --git a/src/daemon/plugin.c b/src/daemon/plugin.c
index c8fc15a14866c9982b9ba3b6f9000b959545a2cb..b37e9b325c32e9492e92a3e29caa49a5e78d34e4 100644 (file)
--- a/src/daemon/plugin.c
+++ b/src/daemon/plugin.c
return (plugindir);
}
-static void plugin_update_internal_statistics(void) { /* {{{ */
-
+static int plugin_update_internal_statistics(void) { /* {{{ */
gauge_t copy_write_queue_length = (gauge_t)write_queue_length;
/* Initialize `vl' */
value_list_t vl = VALUE_LIST_INIT;
- sstrncpy(vl.host, hostname_g, sizeof(vl.host));
sstrncpy(vl.plugin, "collectd", sizeof(vl.plugin));
+ vl.interval = plugin_get_interval();
/* Write queue */
sstrncpy(vl.plugin_instance, "write_queue", sizeof(vl.plugin_instance));
vl.type_instance[0] = 0;
plugin_dispatch_values(&vl);
- return;
-} /* }}} void plugin_update_internal_statistics */
+ return 0;
+} /* }}} int plugin_update_internal_statistics */
static void destroy_callback(callback_func_t *cf) /* {{{ */
{
/* Init the value cache */
uc_init();
- if (IS_TRUE(global_option_get("CollectInternalStats")))
+ if (IS_TRUE(global_option_get("CollectInternalStats"))) {
record_statistics = 1;
+ plugin_register_read("collectd", plugin_update_internal_statistics);
+ }
chain_name = global_option_get("PreCacheChain");
pre_cache_chain = fc_chain_get_by_name(chain_name);
/* TODO: Rename this function. */
void plugin_read_all(void) {
- if (record_statistics) {
- plugin_update_internal_statistics();
- }
uc_check_timeout();
return;
diff --git a/src/intel_rdt.c b/src/intel_rdt.c
index 6beac7b42bc6fe02e375bd670103bd9c5e2e542e..e2e2e3940260580bb640dfec4da764f710821e0c 100644 (file)
--- a/src/intel_rdt.c
+++ b/src/intel_rdt.c
#define RDT_MAX_SOCKET_CORES 64
#define RDT_MAX_CORES (RDT_MAX_SOCKET_CORES * RDT_MAX_SOCKETS)
+typedef enum {
+ UNKNOWN = 0,
+ CONFIGURATION_ERROR,
+} rdt_config_status;
+
struct rdt_core_group_s {
char *desc;
size_t num_cores;
static rdt_ctx_t *g_rdt = NULL;
+static rdt_config_status g_state = UNKNOWN;
+
static int isdup(const uint64_t *nums, size_t size, uint64_t val) {
for (size_t i = 0; i < size; i++)
if (nums[i] == val)
int ret = 0;
ret = rdt_preinit();
- if (ret != 0)
- return ret;
+ if (ret != 0) {
+ g_state = CONFIGURATION_ERROR;
+ /* if we return -1 at this point collectd
+ reports a failure in configuration and
+ aborts
+ */
+ goto exit;
+ }
for (int i = 0; i < ci->children_num; i++) {
oconfig_item_t *child = ci->children + i;
if (strcasecmp("Cores", child->key) == 0) {
ret = rdt_config_cgroups(child);
- if (ret != 0)
- return ret;
+ if (ret != 0) {
+ g_state = CONFIGURATION_ERROR;
+ /* if we return -1 at this point collectd
+ reports a failure in configuration and
+ aborts
+ */
+ goto exit;
+ }
#if COLLECT_DEBUG
rdt_dump_cgroups();
}
}
+exit:
return (0);
}
static int rdt_init(void) {
int ret;
+ if(g_state == CONFIGURATION_ERROR)
+ return (-1);
+
ret = rdt_preinit();
if (ret != 0)
return ret;
diff --git a/src/mqtt.c b/src/mqtt.c
index 33785c8f9f62eda5ccc6858e249cadd25fb25d7d..a962514ce1b122f93503d9516928de8a3411579a 100644 (file)
--- a/src/mqtt.c
+++ b/src/mqtt.c
* measure; we will try to reconnect the next time we have to publish a
* message */
conf->connected = 0;
+ mosquitto_disconnect(conf->mosq);
pthread_mutex_unlock(&conf->lock);
return (-1);
value_list_t const *vl, mqtt_client_conf_t *conf) {
char name[MQTT_MAX_TOPIC_SIZE];
int status;
+ char *c;
if ((conf->topic_prefix == NULL) || (conf->topic_prefix[0] == 0))
return (FORMAT_VL(buf, buf_len, vl));
if ((status < 0) || (((size_t)status) >= buf_len))
return (ENOMEM);
+ while((c = strchr(buf, '#')) || (c = strchr(buf, '+'))) {
+ *c = '_';
+ }
+
return (0);
} /* int format_topic */
diff --git a/version-gen.sh b/version-gen.sh
index 2083ec38d6dd8a5d3bb4cdfe149507b45c670c36..bdbb847a7c79d99da4edc82b33fb61f658660255 100755 (executable)
--- a/version-gen.sh
+++ b/version-gen.sh
#!/bin/sh
-DEFAULT_VERSION="5.7.0.git"
+DEFAULT_VERSION="5.7.1.git"
if [ -d .git ]; then
VERSION="`git describe --dirty=+ --abbrev=7 2> /dev/null | grep collectd | sed -e 's/^collectd-//' -e 's/-/./g'`"