X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Famqp.c;h=767a8776bbfb07ce2a26f932cf7fb5da4d22d047;hb=e9fb3dcaad4d46f1e594fd773f6d2327822bdddf;hp=9c8c6e537c6cb1d2f3907402f7c602e2f8b326b6;hpb=7ca030dea2fcb1f16516e988ab4bd1fcba0efe7b;p=collectd.git diff --git a/src/amqp.c b/src/amqp.c index 9c8c6e53..767a8776 100644 --- a/src/amqp.c +++ b/src/amqp.c @@ -74,6 +74,7 @@ struct camqp_config_s char *prefix; char *postfix; char escape_char; + unsigned int graphite_flags; /* subscribe only */ char *exchange_type; @@ -794,7 +795,7 @@ static int camqp_write (const data_set_t *ds, const value_list_t *vl, /* {{{ */ { status = format_graphite (buffer, sizeof (buffer), ds, vl, conf->prefix, conf->postfix, conf->escape_char, - conf->store_rates); + conf->graphite_flags); if (status != 0) { ERROR ("amqp plugin: format_graphite failed with status %i.", @@ -934,7 +935,11 @@ static int camqp_config_connection (oconfig_item_t *ci, /* {{{ */ conf->delivery_mode = CAMQP_DM_VOLATILE; } else if ((strcasecmp ("StoreRates", child->key) == 0) && publish) + { status = cf_util_get_boolean (child, &conf->store_rates); + (void) cf_util_get_flag (child, &conf->graphite_flags, + GRAPHITE_STORE_RATES); + } else if ((strcasecmp ("Format", child->key) == 0) && publish) status = camqp_config_set_format (child, conf); else if ((strcasecmp ("GraphitePrefix", child->key) == 0) && publish)