summaryrefslogtreecommitdiffstats
path: root/exporting/graphite
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-11-30 18:47:05 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-11-30 18:47:05 +0000
commit97e01009d69b8fbebfebf68f51e3d126d0ed43fc (patch)
tree02e8b836c3a9d89806f3e67d4a5fe9f52dbb0061 /exporting/graphite
parentReleasing debian version 1.36.1-1. (diff)
downloadnetdata-97e01009d69b8fbebfebf68f51e3d126d0ed43fc.tar.xz
netdata-97e01009d69b8fbebfebf68f51e3d126d0ed43fc.zip
Merging upstream version 1.37.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'exporting/graphite')
-rw-r--r--exporting/graphite/graphite.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/exporting/graphite/graphite.c b/exporting/graphite/graphite.c
index 8ca094b3b..0b33f6428 100644
--- a/exporting/graphite/graphite.c
+++ b/exporting/graphite/graphite.c
@@ -101,7 +101,7 @@ int format_host_labels_graphite_plaintext(struct instance *instance, RRDHOST *ho
if (unlikely(!sending_labels_configured(instance)))
return 0;
- rrdlabels_to_buffer(host->host_labels, instance->labels_buffer, ";", "=", "", "",
+ rrdlabels_to_buffer(host->rrdlabels, instance->labels_buffer, ";", "=", "", "",
exporting_labels_filter_callback, instance,
NULL, sanitize_graphite_label_value);
@@ -123,24 +123,24 @@ int format_dimension_collected_graphite_plaintext(struct instance *instance, RRD
char chart_name[RRD_ID_LENGTH_MAX + 1];
exporting_name_copy(
chart_name,
- (instance->config.options & EXPORTING_OPTION_SEND_NAMES && st->name) ? st->name : st->id,
+ (instance->config.options & EXPORTING_OPTION_SEND_NAMES && st->name) ? rrdset_name(st) : rrdset_id(st),
RRD_ID_LENGTH_MAX);
char dimension_name[RRD_ID_LENGTH_MAX + 1];
exporting_name_copy(
dimension_name,
- (instance->config.options & EXPORTING_OPTION_SEND_NAMES && rd->name) ? rd->name : rd->id,
+ (instance->config.options & EXPORTING_OPTION_SEND_NAMES && rd->name) ? rrddim_name(rd) : rrddim_id(rd),
RRD_ID_LENGTH_MAX);
buffer_sprintf(
instance->buffer,
"%s.%s.%s.%s%s%s%s " COLLECTED_NUMBER_FORMAT " %llu\n",
instance->config.prefix,
- (host == localhost) ? instance->config.hostname : host->hostname,
+ (host == localhost) ? instance->config.hostname : rrdhost_hostname(host),
chart_name,
dimension_name,
(host->tags) ? ";" : "",
- (host->tags) ? host->tags : "",
+ (host->tags) ? rrdhost_tags(host) : "",
(instance->labels_buffer) ? buffer_tostring(instance->labels_buffer) : "",
rd->last_collected_value,
(unsigned long long)rd->last_collected_time.tv_sec);
@@ -163,13 +163,13 @@ int format_dimension_stored_graphite_plaintext(struct instance *instance, RRDDIM
char chart_name[RRD_ID_LENGTH_MAX + 1];
exporting_name_copy(
chart_name,
- (instance->config.options & EXPORTING_OPTION_SEND_NAMES && st->name) ? st->name : st->id,
+ (instance->config.options & EXPORTING_OPTION_SEND_NAMES && st->name) ? rrdset_name(st) : rrdset_id(st),
RRD_ID_LENGTH_MAX);
char dimension_name[RRD_ID_LENGTH_MAX + 1];
exporting_name_copy(
dimension_name,
- (instance->config.options & EXPORTING_OPTION_SEND_NAMES && rd->name) ? rd->name : rd->id,
+ (instance->config.options & EXPORTING_OPTION_SEND_NAMES && rd->name) ? rrddim_name(rd) : rrddim_id(rd),
RRD_ID_LENGTH_MAX);
time_t last_t;
@@ -182,11 +182,11 @@ int format_dimension_stored_graphite_plaintext(struct instance *instance, RRDDIM
instance->buffer,
"%s.%s.%s.%s%s%s%s " NETDATA_DOUBLE_FORMAT " %llu\n",
instance->config.prefix,
- (host == localhost) ? instance->config.hostname : host->hostname,
+ (host == localhost) ? instance->config.hostname : rrdhost_hostname(host),
chart_name,
dimension_name,
(host->tags) ? ";" : "",
- (host->tags) ? host->tags : "",
+ (host->tags) ? rrdhost_tags(host) : "",
(instance->labels_buffer) ? buffer_tostring(instance->labels_buffer) : "",
value,
(unsigned long long)last_t);
@@ -214,7 +214,7 @@ void graphite_http_prepare_header(struct instance *instance)
"\r\n",
instance->config.destination,
simple_connector_data->auth_string ? simple_connector_data->auth_string : "",
- buffer_strlen(simple_connector_data->last_buffer->buffer));
+ (unsigned long int) buffer_strlen(simple_connector_data->last_buffer->buffer));
return;
}