summaryrefslogtreecommitdiffstats
path: root/src/exporting/graphite/graphite.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/exporting/graphite/graphite.c (renamed from exporting/graphite/graphite.c)10
1 files changed, 3 insertions, 7 deletions
diff --git a/exporting/graphite/graphite.c b/src/exporting/graphite/graphite.c
index 254db982e..1fc1f2b04 100644
--- a/exporting/graphite/graphite.c
+++ b/src/exporting/graphite/graphite.c
@@ -74,7 +74,7 @@ int init_graphite_instance(struct instance *instance)
void sanitize_graphite_label_value(char *dst, const char *src, size_t len)
{
while (*src != '\0' && len) {
- if (isspace(*src) || *src == ';' || *src == '~')
+ if (isspace((uint8_t)*src) || *src == ';' || *src == '~')
*dst++ = '_';
else
*dst++ = *src;
@@ -133,13 +133,11 @@ int format_dimension_collected_graphite_plaintext(struct instance *instance, RRD
buffer_sprintf(
instance->buffer,
- "%s.%s.%s.%s%s%s%s " COLLECTED_NUMBER_FORMAT " %llu\n",
+ "%s.%s.%s.%s%s " COLLECTED_NUMBER_FORMAT " %llu\n",
instance->config.prefix,
(host == localhost) ? instance->config.hostname : rrdhost_hostname(host),
chart_name,
dimension_name,
- (host->tags) ? ";" : "",
- (host->tags) ? rrdhost_tags(host) : "",
(instance->labels_buffer) ? buffer_tostring(instance->labels_buffer) : "",
rd->collector.last_collected_value,
(unsigned long long)rd->collector.last_collected_time.tv_sec);
@@ -179,13 +177,11 @@ int format_dimension_stored_graphite_plaintext(struct instance *instance, RRDDIM
buffer_sprintf(
instance->buffer,
- "%s.%s.%s.%s%s%s%s " NETDATA_DOUBLE_FORMAT " %llu\n",
+ "%s.%s.%s.%s%s " NETDATA_DOUBLE_FORMAT " %llu\n",
instance->config.prefix,
(host == localhost) ? instance->config.hostname : rrdhost_hostname(host),
chart_name,
dimension_name,
- (host->tags) ? ";" : "",
- (host->tags) ? rrdhost_tags(host) : "",
(instance->labels_buffer) ? buffer_tostring(instance->labels_buffer) : "",
value,
(unsigned long long)last_t);