diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-04-14 18:12:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-04-14 18:12:10 +0000 |
commit | b5321aff06d6ea8d730d62aec2ffd8e9271c1ffc (patch) | |
tree | 36c41e35994786456154f9d3bf88c324763aeea4 /libnetdata/config/appconfig.c | |
parent | Adding upstream version 1.33.1. (diff) | |
download | netdata-b5321aff06d6ea8d730d62aec2ffd8e9271c1ffc.tar.xz netdata-b5321aff06d6ea8d730d62aec2ffd8e9271c1ffc.zip |
Adding upstream version 1.34.0.upstream/1.34.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'libnetdata/config/appconfig.c')
-rw-r--r-- | libnetdata/config/appconfig.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libnetdata/config/appconfig.c b/libnetdata/config/appconfig.c index 37e9e7688..0daa6e5e4 100644 --- a/libnetdata/config/appconfig.c +++ b/libnetdata/config/appconfig.c @@ -591,7 +591,7 @@ int appconfig_load(struct config *root, char *filename, int overwrite_used, cons int line = 0; struct section *co = NULL; int is_exporter_config = 0; - int _backends = 0; // number of backend sections we have + int _connectors = 0; // number of exporting connector sections we have char working_instance[CONFIG_MAX_NAME + 1]; char working_connector[CONFIG_MAX_NAME + 1]; struct section *working_connector_section = NULL; @@ -641,8 +641,8 @@ int appconfig_load(struct config *root, char *filename, int overwrite_used, cons strncpy(working_connector, s, CONFIG_MAX_NAME); s = s + rc + 1; if (unlikely(!(*s))) { - _backends++; - sprintf(buffer, "instance_%d", _backends); + _connectors++; + sprintf(buffer, "instance_%d", _connectors); s = buffer; } strncpy(working_instance, s, CONFIG_MAX_NAME); @@ -793,7 +793,6 @@ void appconfig_generate(struct config *root, BUFFER *wb, int only_changed) || !strcmp(co->name, CONFIG_SECTION_CLOUD) || !strcmp(co->name, CONFIG_SECTION_REGISTRY) || !strcmp(co->name, CONFIG_SECTION_HEALTH) - || !strcmp(co->name, CONFIG_SECTION_BACKEND) || !strcmp(co->name, CONFIG_SECTION_STREAM) || !strcmp(co->name, CONFIG_SECTION_HOST_LABEL) || !strcmp(co->name, CONFIG_SECTION_ML) |