diff options
Diffstat (limited to '')
-rw-r--r-- | exporting/prometheus/remote_write/Makefile.am | 14 | ||||
l--------- | src/exporting/prometheus/remote_write/README.md (renamed from exporting/prometheus/remote_write/README.md) | 0 | ||||
-rw-r--r-- | src/exporting/prometheus/remote_write/remote_write.c (renamed from exporting/prometheus/remote_write/remote_write.c) | 28 | ||||
-rw-r--r-- | src/exporting/prometheus/remote_write/remote_write.h (renamed from exporting/prometheus/remote_write/remote_write.h) | 0 | ||||
-rw-r--r-- | src/exporting/prometheus/remote_write/remote_write.proto (renamed from exporting/prometheus/remote_write/remote_write.proto) | 0 | ||||
-rw-r--r-- | src/exporting/prometheus/remote_write/remote_write_request.cc (renamed from exporting/prometheus/remote_write/remote_write_request.cc) | 0 | ||||
-rw-r--r-- | src/exporting/prometheus/remote_write/remote_write_request.h (renamed from exporting/prometheus/remote_write/remote_write_request.h) | 0 |
7 files changed, 13 insertions, 29 deletions
diff --git a/exporting/prometheus/remote_write/Makefile.am b/exporting/prometheus/remote_write/Makefile.am deleted file mode 100644 index d049ef48c..000000000 --- a/exporting/prometheus/remote_write/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -# SPDX-License-Identifier: GPL-3.0-or-later - -AUTOMAKE_OPTIONS = subdir-objects -MAINTAINERCLEANFILES = $(srcdir)/Makefile.in - -CLEANFILES = \ - remote_write.pb.cc \ - remote_write.pb.h \ - $(NULL) - -dist_noinst_DATA = \ - remote_write.proto \ - README.md \ - $(NULL) diff --git a/exporting/prometheus/remote_write/README.md b/src/exporting/prometheus/remote_write/README.md index 8ca4673a6..8ca4673a6 120000 --- a/exporting/prometheus/remote_write/README.md +++ b/src/exporting/prometheus/remote_write/README.md diff --git a/exporting/prometheus/remote_write/remote_write.c b/src/exporting/prometheus/remote_write/remote_write.c index ed431c9dc..b4b6f996b 100644 --- a/exporting/prometheus/remote_write/remote_write.c +++ b/src/exporting/prometheus/remote_write/remote_write.c @@ -330,24 +330,22 @@ static int format_variable_prometheus_remote_write_callback(const DICTIONARY_ITE struct prometheus_remote_write_variables_callback_options *opts = data; - if (rrdvar_flags(rv) & (RRDVAR_FLAG_CUSTOM_HOST_VAR | RRDVAR_FLAG_CUSTOM_CHART_VAR)) { - RRDHOST *host = opts->host; - struct instance *instance = opts->instance; - struct simple_connector_data *simple_connector_data = - (struct simple_connector_data *)instance->connector_specific_data; - struct prometheus_remote_write_specific_data *connector_specific_data = - (struct prometheus_remote_write_specific_data *)simple_connector_data->connector_specific_data; + RRDHOST *host = opts->host; + struct instance *instance = opts->instance; + struct simple_connector_data *simple_connector_data = + (struct simple_connector_data *)instance->connector_specific_data; + struct prometheus_remote_write_specific_data *connector_specific_data = + (struct prometheus_remote_write_specific_data *)simple_connector_data->connector_specific_data; - char name[PROMETHEUS_LABELS_MAX + 1]; - char *suffix = ""; + char name[PROMETHEUS_LABELS_MAX + 1]; + char *suffix = ""; - prometheus_name_copy(context, rrdvar_name(rv), PROMETHEUS_ELEMENT_MAX); - snprintf(name, PROMETHEUS_LABELS_MAX, "%s_%s%s", instance->config.prefix, context, suffix); + prometheus_name_copy(context, rrdvar_name(rv), PROMETHEUS_ELEMENT_MAX); + snprintf(name, PROMETHEUS_LABELS_MAX, "%s_%s%s", instance->config.prefix, context, suffix); - NETDATA_DOUBLE value = rrdvar2number(rv); - add_variable(connector_specific_data->write_request, name, - (host == localhost) ? instance->config.hostname : rrdhost_hostname(host), value, opts->now / USEC_PER_MS); - } + NETDATA_DOUBLE value = rrdvar2number(rv); + add_variable(connector_specific_data->write_request, name, + (host == localhost) ? instance->config.hostname : rrdhost_hostname(host), value, opts->now / USEC_PER_MS); return 0; } diff --git a/exporting/prometheus/remote_write/remote_write.h b/src/exporting/prometheus/remote_write/remote_write.h index d4e86494b..d4e86494b 100644 --- a/exporting/prometheus/remote_write/remote_write.h +++ b/src/exporting/prometheus/remote_write/remote_write.h diff --git a/exporting/prometheus/remote_write/remote_write.proto b/src/exporting/prometheus/remote_write/remote_write.proto index dfde254e1..dfde254e1 100644 --- a/exporting/prometheus/remote_write/remote_write.proto +++ b/src/exporting/prometheus/remote_write/remote_write.proto diff --git a/exporting/prometheus/remote_write/remote_write_request.cc b/src/exporting/prometheus/remote_write/remote_write_request.cc index a628082d1..a628082d1 100644 --- a/exporting/prometheus/remote_write/remote_write_request.cc +++ b/src/exporting/prometheus/remote_write/remote_write_request.cc diff --git a/exporting/prometheus/remote_write/remote_write_request.h b/src/exporting/prometheus/remote_write/remote_write_request.h index b25370133..b25370133 100644 --- a/exporting/prometheus/remote_write/remote_write_request.h +++ b/src/exporting/prometheus/remote_write/remote_write_request.h |