diff options
Diffstat (limited to '')
-rw-r--r-- | exporting/prometheus/remote_write/remote_write.c | 5 | ||||
-rw-r--r-- | exporting/prometheus/remote_write/remote_write_request.cc | 16 |
2 files changed, 10 insertions, 11 deletions
diff --git a/exporting/prometheus/remote_write/remote_write.c b/exporting/prometheus/remote_write/remote_write.c index 1857ca333..660b798e4 100644 --- a/exporting/prometheus/remote_write/remote_write.c +++ b/exporting/prometheus/remote_write/remote_write.c @@ -115,10 +115,9 @@ int init_prometheus_remote_write_instance(struct instance *instance) instance->connector_specific_data = simple_connector_data; #ifdef ENABLE_HTTPS - simple_connector_data->flags = NETDATA_SSL_START; - simple_connector_data->conn = NULL; + simple_connector_data->ssl = NETDATA_SSL_UNSET_CONNECTION; if (instance->config.options & EXPORTING_OPTION_USE_TLS) { - security_start_ssl(NETDATA_SSL_CONTEXT_EXPORTING); + netdata_ssl_initialize_ctx(NETDATA_SSL_EXPORTING_CTX); } #endif diff --git a/exporting/prometheus/remote_write/remote_write_request.cc b/exporting/prometheus/remote_write/remote_write_request.cc index ecfa11fa8..a628082d1 100644 --- a/exporting/prometheus/remote_write/remote_write_request.cc +++ b/exporting/prometheus/remote_write/remote_write_request.cc @@ -45,16 +45,16 @@ void add_host_info( label->set_name("__name__"); label->set_value(name); - label = timeseries->add_labels(); - label->set_name("instance"); - label->set_value(instance); - if (application) { label = timeseries->add_labels(); label->set_name("application"); label->set_value(application); } + label = timeseries->add_labels(); + label->set_name("instance"); + label->set_value(instance); + if (version) { label = timeseries->add_labels(); label->set_name("version"); @@ -118,10 +118,6 @@ void add_metric( label->set_name("chart"); label->set_value(chart); - label = timeseries->add_labels(); - label->set_name("family"); - label->set_value(family); - if (dimension) { label = timeseries->add_labels(); label->set_name("dimension"); @@ -129,6 +125,10 @@ void add_metric( } label = timeseries->add_labels(); + label->set_name("family"); + label->set_value(family); + + label = timeseries->add_labels(); label->set_name("instance"); label->set_value(instance); |