projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'collectd-5.4' into collectd-5.5
[collectd.git]
/
src
/
write_riemann.c
diff --git
a/src/write_riemann.c
b/src/write_riemann.c
index
a09c723
..
58611a9
100644
(file)
--- a/
src/write_riemann.c
+++ b/
src/write_riemann.c
@@
-26,13
+26,6
@@
* Florian octo Forster <octo at collectd.org>
*/
* Florian octo Forster <octo at collectd.org>
*/
-#include "collectd.h"
-#include "plugin.h"
-#include "common.h"
-#include "configfile.h"
-#include "utils_cache.h"
-#include "riemann.pb-c.h"
-
#include <sys/socket.h>
#include <arpa/inet.h>
#include <errno.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <errno.h>
@@
-40,13
+33,19
@@
#include <inttypes.h>
#include <pthread.h>
#include <inttypes.h>
#include <pthread.h>
+#include "collectd.h"
+#include "plugin.h"
+#include "common.h"
+#include "configfile.h"
+#include "utils_cache.h"
+#include "riemann.pb-c.h"
+#include "write_riemann_threshold.h"
+
#define RIEMANN_HOST "localhost"
#define RIEMANN_PORT "5555"
#define RIEMANN_TTL_FACTOR 2.0
#define RIEMANN_BATCH_MAX 8192
#define RIEMANN_HOST "localhost"
#define RIEMANN_PORT "5555"
#define RIEMANN_TTL_FACTOR 2.0
#define RIEMANN_BATCH_MAX 8192
-int write_riemann_threshold_check(const data_set_t *, const value_list_t *, int *);
-
struct riemann_host {
char *name;
char *event_service_prefix;
struct riemann_host {
char *name;
char *event_service_prefix;
@@
-1051,6
+1050,7
@@
static int riemann_config(oconfig_item_t *ci) /* {{{ */
}
if ((val = strdup(child->values[1].value.string)) == NULL) {
WARNING("cannot allocate memory for attribute value.");
}
if ((val = strdup(child->values[1].value.string)) == NULL) {
WARNING("cannot allocate memory for attribute value.");
+ sfree (key);
return (-1);
}
strarray_add(&riemann_attrs, &riemann_attrs_num, key);
return (-1);
}
strarray_add(&riemann_attrs, &riemann_attrs_num, key);