From: Marc Fournier Date: Tue, 10 Jan 2017 22:03:15 +0000 (+0100) Subject: Merge branch 'collectd-5.7' X-Git-Tag: collectd-5.8.0~241 X-Git-Url: https://git.octo.it/?p=collectd.git;a=commitdiff_plain;h=76fb10bf790e35dd6caca13c4bb5d0f86c517370;hp=211bd48433190a4623d38ec70bcd5266e880066c Merge branch 'collectd-5.7' --- diff --git a/configure.ac b/configure.ac index c0fe54e8..1b9b3fbf 100644 --- a/configure.ac +++ b/configure.ac @@ -4225,6 +4225,16 @@ then fi if test "x$with_libpqos" = "xyes" then + SAVE_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $with_libpqos_cppflags" + AC_RUN_IFELSE([AC_LANG_PROGRAM( + [[#include ]], + [[return !(PQOS_VERSION >= 106)]])], + [with_libpqos="yes"], [with_libpqos="no (pqos library version 1.06 or higher is required)"]) + CPPFLAGS="$SAVE_CPPFLAGS" +fi +if test "x$with_libpqos" = "xyes" +then BUILD_WITH_LIBPQOS_CPPFLAGS="$with_libpqos_cppflags" BUILD_WITH_LIBPQOS_LDFLAGS="$with_libpqos_ldflags" BUILD_WITH_LIBPQOS_LIBS="-lpqos" diff --git a/contrib/redhat/collectd.spec b/contrib/redhat/collectd.spec index 8726d7c6..350c3579 100644 --- a/contrib/redhat/collectd.spec +++ b/contrib/redhat/collectd.spec @@ -152,6 +152,7 @@ %define with_write_log 0%{!?_without_write_log:1} %define with_write_prometheus 0%{!?_without_write_prometheus:1} %define with_write_redis 0%{!?_without_write_redis:1} +%define with_write_riemann 0%{!?_without_write_riemann:1} %define with_write_sensu 0%{!?_without_write_sensu:1} %define with_write_tsdb 0%{!?_without_write_tsdb:1} %define with_xmms 0%{!?_without_xmms:0%{?_has_xmms}} @@ -197,8 +198,6 @@ %define with_write_kafka 0%{!?_without_write_kafka:0} # plugin write_mongodb disabled, requires libmongoc %define with_write_mongodb 0%{!?_without_write_mongodb:0} -# plugin write_riemann disabled, requires a new enough riemann_c_client -%define with_write_riemann 0%{!?_without_write_riemann:0} # plugin xencpu disabled, requires xen-devel from non-default repo %define with_xencpu 0%{!?_without_xencpu:0} # plugin zone disabled, requires Solaris @@ -222,6 +221,7 @@ %define with_turbostat 0 %define with_write_prometheus 0 %define with_write_redis 0 +%define with_write_riemann 0 %endif # Plugins not buildable on RHEL < 7 @@ -233,6 +233,7 @@ %define with_redis 0 %define with_rrdcached 0 %define with_write_redis 0 +%define with_write_riemann 0 %define with_xmms 0 %endif @@ -883,7 +884,7 @@ The Write Redis plugin stores values in Redis, a “data structures server”. Summary: riemann plugin for collectd Group: System Environment/Daemons Requires: %{name}%{?_isa} = %{version}-%{release} -BuildRequires: protobuf-c-devel +BuildRequires: riemann-c-client-devel >= 1.6 %description write_riemann The riemann plugin submits values to Riemann, an event stream processor. %endif diff --git a/src/curl_json.c b/src/curl_json.c index 8e09bd82..4d8677ac 100644 --- a/src/curl_json.c +++ b/src/curl_json.c @@ -600,7 +600,7 @@ static int cj_init_curl(cj_t *db) /* {{{ */ curl_easy_setopt(db->curl, CURLOPT_TIMEOUT_MS, (long)db->timeout); else if (db->interval > 0) curl_easy_setopt(db->curl, CURLOPT_TIMEOUT_MS, - (long)CDTIME_T_TO_MS(db->timeout)); + (long)CDTIME_T_TO_MS(db->interval)); else curl_easy_setopt(db->curl, CURLOPT_TIMEOUT_MS, (long)CDTIME_T_TO_MS(plugin_get_interval()));