summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: df32888)
raw | patch | inline | side by side (parent: df32888)
author | Moshe Zada <moshe@forter.com> | |
Thu, 21 Aug 2014 12:23:27 +0000 (15:23 +0300) | ||
committer | Moshe Zada <moshe@forter.com> | |
Thu, 21 Aug 2014 12:23:27 +0000 (15:23 +0300) |
src/collectd.conf.pod | patch | blob | history | |
src/write_riemann.c | patch | blob | history |
diff --git a/src/collectd.conf.pod b/src/collectd.conf.pod
index f2be55c60ae4c41c284c3c65f3f4be21e57c93ae..31e2e5a917db23622031a67dffa5e064f77b3b7a 100644 (file)
--- a/src/collectd.conf.pod
+++ b/src/collectd.conf.pod
=item B<EventServicePrefix> I<String>
Add the given string as a prefix to the event service name.
-if B<EventServicePrefix> not set or set to an empty string (""),
+If B<EventServicePrefix> not set or set to an empty string (""),
no prefix will be used.
=back
diff --git a/src/write_riemann.c b/src/write_riemann.c
index d8e3f73f209fa71bcbd6b446a348d4f9a769f1c2..61c1391408543e2a0a0ce8049ab2367a2c9edc0e 100644 (file)
--- a/src/write_riemann.c
+++ b/src/write_riemann.c
struct riemann_host {
char *name;
- char *eventServicePrefix;
+ char *event_service_prefix;
#define F_CONNECT 0x01
uint8_t flags;
pthread_mutex_t lock;
@@ -570,19 +570,19 @@ static Event *riemann_value_to_protobuf (struct riemann_host const *host, /* {{{
/* host = */ "", vl->plugin, vl->plugin_instance,
vl->type, vl->type_instance);
if (host->always_append_ds || (ds->ds_num > 1))
- if (host->eventServicePrefix == NULL || host->eventServicePrefix[0] == '\0')
+ if (host->event_service_prefix == NULL || host->event_service_prefix[0] == '\0')
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->eventServicePrefix, &name_buffer[1], ds->ds[index].name);
+ "%s%s/%s", host->event_service_prefix, &name_buffer[1], ds->ds[index].name);
else
- if (host->eventServicePrefix == NULL || host->eventServicePrefix[0] == '\0')
+ if (host->event_service_prefix == NULL || host->event_service_prefix[0] == '\0')
sstrncpy (service_buffer, &name_buffer[1],
sizeof (service_buffer));
else
ssnprintf (service_buffer, sizeof (service_buffer),
- "%s/%s", host->eventServicePrefix, &name_buffer[1]);
+ "%s%s", host->event_service_prefix, &name_buffer[1]);
event->service = strdup (service_buffer);
if (status != 0)
break;
} else if (strcasecmp ("EventServicePrefix", child->key) == 0) {
- status = cf_util_get_string (child, &host->eventServicePrefix);
+ status = cf_util_get_string (child, &host->event_service_prefix);
if (status != 0)
break;
} else if (strcasecmp ("CheckThresholds", child->key) == 0) {