summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0f91e06)
raw | patch | inline | side by side (parent: 0f91e06)
author | ~/.gitconfig <moshe@forter.com> | |
Fri, 15 Aug 2014 18:46:02 +0000 (21:46 +0300) | ||
committer | ~/.gitconfig <moshe@forter.com> | |
Fri, 15 Aug 2014 18:46:02 +0000 (21:46 +0300) |
src/collectd.conf.in | patch | blob | history | |
src/write_riemann.c | patch | blob | history |
diff --git a/src/collectd.conf.in b/src/collectd.conf.in
index bdc4969cd4aaf55eafc84b8edd2aa192a8d4521c..52904a2d1f11ae8e4a8b0be8248139f7564f30b6 100644 (file)
--- a/src/collectd.conf.in
+++ b/src/collectd.conf.in
# StoreRates true
# AlwaysAppendDS false
# TTLFactor 2.0
-# Prefix ServicePrefix
+# EventServicePrefix ""
# </Node>
# Tag "foobar"
# Attribute "foo" "bar"
diff --git a/src/write_riemann.c b/src/write_riemann.c
index a3b655a53384c0efcdc414891cc955fee8816b00..32c034c6080bd0a032c1c860ce2e6e08005fb4c0 100644 (file)
--- a/src/write_riemann.c
+++ b/src/write_riemann.c
@@ -569,21 +569,20 @@ static Event *riemann_value_to_protobuf (struct riemann_host const *host, /* {{{
format_name (name_buffer, sizeof (name_buffer),
/* host = */ "", vl->plugin, vl->plugin_instance,
vl->type, vl->type_instance);
- if (host->always_append_ds || (ds->ds_num > 1)) {
- if (host->prefix == NULL)
- ssnprintf (service_buffer, sizeof (service_buffer),
- "%s/%s", &name_buffer[1], ds->ds[index].name);
- else
- ssnprintf (service_buffer, sizeof (service_buffer),
- "%s/%s/%s", host->prefix, &name_buffer[1], ds->ds[index].name);
- } else {
- if (host->prefix == NULL)
- sstrncpy (service_buffer, &name_buffer[1],
- sizeof (service_buffer));
- else
- ssnprintf (service_buffer, sizeof (service_buffer),
- "%s/%s", host->prefix, &name_buffer[1]);
- }
+ if (host->always_append_ds || (ds->ds_num > 1))
+ if (host->prefix == NULL)
+ ssnprintf (service_buffer, sizeof (service_buffer),
+ "%s/%s", &name_buffer[1], ds->ds[index].name);
+ else
+ ssnprintf (service_buffer, sizeof (service_buffer),
+ "%s/%s/%s", host->prefix, &name_buffer[1], ds->ds[index].name);
+ else
+ if (host->prefix == NULL)
+ sstrncpy (service_buffer, &name_buffer[1],
+ sizeof (service_buffer));
+ else
+ ssnprintf (service_buffer, sizeof (service_buffer),
+ "%s/%s", host->prefix, &name_buffer[1]);
event->service = strdup (service_buffer);
status = cf_util_get_boolean(child, &host->notifications);
if (status != 0)
break;
- } else if (strcasecmp ("Prefix", child->key) == 0) {
+ } else if (strcasecmp ("EventServicePrefix", child->key) == 0) {
status = cf_util_get_string (child, &host->prefix);
break;
} else if (strcasecmp ("CheckThresholds", child->key) == 0) {