summaryrefslogtreecommitdiffstats
path: root/exporting/opentsdb
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-11-30 18:47:00 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-11-30 18:47:00 +0000
commit03bf87dcb06f7021bfb2df2fa8691593c6148aff (patch)
treee16b06711a2ed77cafb4b7754be0220c3d14a9d7 /exporting/opentsdb
parentAdding upstream version 1.36.1. (diff)
downloadnetdata-03bf87dcb06f7021bfb2df2fa8691593c6148aff.tar.xz
netdata-03bf87dcb06f7021bfb2df2fa8691593c6148aff.zip
Adding upstream version 1.37.0.upstream/1.37.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'exporting/opentsdb')
-rw-r--r--exporting/opentsdb/opentsdb.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/exporting/opentsdb/opentsdb.c b/exporting/opentsdb/opentsdb.c
index 282de2e6..a974c126 100644
--- a/exporting/opentsdb/opentsdb.c
+++ b/exporting/opentsdb/opentsdb.c
@@ -156,7 +156,7 @@ int format_host_labels_opentsdb_telnet(struct instance *instance, RRDHOST *host)
return 0;
buffer_strcat(instance->labels_buffer, " ");
- rrdlabels_to_buffer(host->host_labels, instance->labels_buffer, "", "=", "", " ",
+ rrdlabels_to_buffer(host->rrdlabels, instance->labels_buffer, "", "=", "", " ",
exporting_labels_filter_callback, instance,
NULL, sanitize_opentsdb_label_value);
return 0;
@@ -177,13 +177,13 @@ int format_dimension_collected_opentsdb_telnet(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);
buffer_sprintf(
@@ -194,9 +194,9 @@ int format_dimension_collected_opentsdb_telnet(struct instance *instance, RRDDIM
dimension_name,
(unsigned long long)rd->last_collected_time.tv_sec,
rd->last_collected_value,
- (host == localhost) ? instance->config.hostname : host->hostname,
+ (host == localhost) ? instance->config.hostname : rrdhost_hostname(host),
(host->tags) ? " " : "",
- (host->tags) ? host->tags : "",
+ (host->tags) ? rrdhost_tags(host) : "",
(instance->labels_buffer) ? buffer_tostring(instance->labels_buffer) : "");
return 0;
@@ -217,13 +217,13 @@ int format_dimension_stored_opentsdb_telnet(struct instance *instance, RRDDIM *r
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;
@@ -240,9 +240,9 @@ int format_dimension_stored_opentsdb_telnet(struct instance *instance, RRDDIM *r
dimension_name,
(unsigned long long)last_t,
value,
- (host == localhost) ? instance->config.hostname : host->hostname,
+ (host == localhost) ? instance->config.hostname : rrdhost_hostname(host),
(host->tags) ? " " : "",
- (host->tags) ? host->tags : "",
+ (host->tags) ? rrdhost_tags(host) : "",
(instance->labels_buffer) ? buffer_tostring(instance->labels_buffer) : "");
return 0;
@@ -268,7 +268,7 @@ void opentsdb_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;
}
@@ -288,7 +288,7 @@ int format_host_labels_opentsdb_http(struct instance *instance, RRDHOST *host) {
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_opentsdb_label_value);
return 0;
@@ -309,13 +309,13 @@ int format_dimension_collected_opentsdb_http(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);
if (buffer_strlen((BUFFER *)instance->buffer) > 2)
@@ -336,9 +336,9 @@ int format_dimension_collected_opentsdb_http(struct instance *instance, RRDDIM *
dimension_name,
(unsigned long long)rd->last_collected_time.tv_sec,
rd->last_collected_value,
- (host == localhost) ? instance->config.hostname : host->hostname,
+ (host == localhost) ? instance->config.hostname : rrdhost_hostname(host),
(host->tags) ? " " : "",
- (host->tags) ? host->tags : "",
+ (host->tags) ? rrdhost_tags(host) : "",
instance->labels_buffer ? buffer_tostring(instance->labels_buffer) : "");
return 0;
@@ -359,13 +359,13 @@ int format_dimension_stored_opentsdb_http(struct instance *instance, RRDDIM *rd)
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;
@@ -392,9 +392,9 @@ int format_dimension_stored_opentsdb_http(struct instance *instance, RRDDIM *rd)
dimension_name,
(unsigned long long)last_t,
value,
- (host == localhost) ? instance->config.hostname : host->hostname,
+ (host == localhost) ? instance->config.hostname : rrdhost_hostname(host),
(host->tags) ? " " : "",
- (host->tags) ? host->tags : "",
+ (host->tags) ? rrdhost_tags(host) : "",
instance->labels_buffer ? buffer_tostring(instance->labels_buffer) : "");
return 0;