summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c8b2244)
raw | patch | inline | side by side (parent: c8b2244)
author | ~/.gitconfig <moshe@forter.com> | |
Wed, 13 Aug 2014 12:06:43 +0000 (15:06 +0300) | ||
committer | ~/.gitconfig <moshe@forter.com> | |
Wed, 13 Aug 2014 12:06:43 +0000 (15:06 +0300) |
src/write_riemann.c | patch | blob | history |
diff --git a/src/write_riemann.c b/src/write_riemann.c
index 78f01c05e51da1d45fcdfe5e209008a184d83ec5..56752124faade07ea8053edbd0cc7e06cabd366b 100644 (file)
--- a/src/write_riemann.c
+++ b/src/write_riemann.c
struct riemann_host {
char *name;
+ char *prefix;
#define F_CONNECT 0x01
uint8_t flags;
pthread_mutex_t lock;
riemann_event_add_tag (event, riemann_tags[i]);
format_name (service_buffer, sizeof (service_buffer),
- /* host = */ "", n->plugin, n->plugin_instance,
+ /* host = */ host->prefix, n->plugin, n->plugin_instance,
n->type, n->type_instance);
event->service = strdup (&service_buffer[1]);
@@ -566,7 +567,7 @@ static Event *riemann_value_to_protobuf (struct riemann_host const *host, /* {{{
}
format_name (name_buffer, sizeof (name_buffer),
- /* host = */ "", vl->plugin, vl->plugin_instance,
+ /* host = */ host->prefix, vl->plugin, vl->plugin_instance,
vl->type, vl->type_instance);
if (host->always_append_ds || (ds->ds_num > 1))
ssnprintf (service_buffer, sizeof (service_buffer),
status = cf_util_get_boolean(child, &host->notifications);
if (status != 0)
break;
+ } else if (strcasecmp ("Prefix", child->key) == 0) {
+ status = cf_util_get_string (child, &host->prefix);
+ break;
} else if (strcasecmp ("CheckThresholds", child->key) == 0) {
status = cf_util_get_boolean(child, &host->check_thresholds);
if (status != 0)