summaryrefslogtreecommitdiffstats
path: root/exporting/read_config.c
diff options
context:
space:
mode:
authorVladimir Kobal <vlad@prokk.net>2020-07-02 15:33:30 +0300
committerGitHub <noreply@github.com>2020-07-02 15:33:30 +0300
commit4f2de8d5107dbab1e845ae7d33da51ad58467978 (patch)
tree640b3f185fea5edca1f360ca70640b70ca12de7d /exporting/read_config.c
parent6f3d87b2dd57a1511a91821ed0569a2f337d20fd (diff)
Read the prefix option from instance config sections (#9463)
Diffstat (limited to 'exporting/read_config.c')
-rw-r--r--exporting/read_config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/exporting/read_config.c b/exporting/read_config.c
index d9fea656ec..1450d3036d 100644
--- a/exporting/read_config.c
+++ b/exporting/read_config.c
@@ -282,7 +282,6 @@ struct engine *read_exporting_config()
if (exporting_config_exists) {
engine->config.hostname =
strdupz(exporter_get(CONFIG_SECTION_EXPORTING, "hostname", netdata_configured_hostname));
- engine->config.prefix = strdupz(exporter_get(CONFIG_SECTION_EXPORTING, "prefix", "netdata"));
engine->config.update_every = exporter_get_number(
CONFIG_SECTION_EXPORTING, EXPORTING_UPDATE_EVERY_OPTION_NAME, EXPORTING_UPDATE_EVERY_DEFAULT);
}
@@ -430,6 +429,8 @@ struct engine *read_exporting_config()
tmp_instance->config.destination = strdupz(exporter_get(instance_name, "destination", default_destination));
+ tmp_instance->config.prefix = strdupz(exporter_get(instance_name, "prefix", "netdata"));
+
#ifdef ENABLE_HTTPS
if (tmp_instance->config.type == EXPORTING_CONNECTOR_TYPE_OPENTSDB_USING_HTTP && !strncmp(tmp_ci_list->local_ci.connector_name, "opentsdb:https", 14)) {
tmp_instance->config.options |= EXPORTING_OPTION_USE_TLS;
@@ -448,7 +449,6 @@ struct engine *read_exporting_config()
if (unlikely(!exporting_config_exists) && !engine->config.hostname) {
engine->config.hostname = strdupz(config_get(instance_name, "hostname", netdata_configured_hostname));
- engine->config.prefix = strdupz(config_get(instance_name, "prefix", "netdata"));
engine->config.update_every =
config_get_number(instance_name, EXPORTING_UPDATE_EVERY_OPTION_NAME, EXPORTING_UPDATE_EVERY_DEFAULT);
}