X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fwrite_graphite.c;h=dc3b2c74878568ade6220831c77891010e5d6421;hp=7624e2433da69a358bb38ca1ef29ea0e2f847545;hb=48efd3deb4c9139fd060ff3d289896e9031bcc7c;hpb=711f5b6c86f51061c21bedcaa46214a01de0125c diff --git a/src/write_graphite.c b/src/write_graphite.c index 7624e243..dc3b2c74 100644 --- a/src/write_graphite.c +++ b/src/write_graphite.c @@ -29,7 +29,7 @@ * Based on the write_http plugin. **/ -/* write_graphite plugin configuation example +/* write_graphite plugin configuration example * * * @@ -39,17 +39,18 @@ * LogSendErrors true * Prefix "collectd" * UseTags true + * ReverseHost false * * */ #include "collectd.h" -#include "common.h" #include "plugin.h" +#include "utils/common/common.h" +#include "utils/format_graphite/format_graphite.h" #include "utils_complain.h" -#include "utils_format_graphite.h" #include @@ -521,6 +522,8 @@ static int wg_config_node(oconfig_item_t *ci) { cf_util_get_flag(child, &cb->format_flags, GRAPHITE_DROP_DUPE_FIELDS); else if (strcasecmp("UseTags", child->key) == 0) cf_util_get_flag(child, &cb->format_flags, GRAPHITE_USE_TAGS); + else if (strcasecmp("ReverseHost", child->key) == 0) + cf_util_get_flag(child, &cb->format_flags, GRAPHITE_REVERSE_HOST); else if (strcasecmp("EscapeCharacter", child->key) == 0) config_set_char(&cb->escape_char, child); else { @@ -549,7 +552,8 @@ static int wg_config_node(oconfig_item_t *ci) { plugin_register_write(callback_name, wg_write, &(user_data_t){ - .data = cb, .free_func = wg_callback_free, + .data = cb, + .free_func = wg_callback_free, }); plugin_register_flush(callback_name, wg_flush, &(user_data_t){.data = cb});