diff options
Diffstat (limited to 'libnetdata')
-rw-r--r-- | libnetdata/config/appconfig.c | 3 | ||||
-rw-r--r-- | libnetdata/config/appconfig.h | 25 |
2 files changed, 15 insertions, 13 deletions
diff --git a/libnetdata/config/appconfig.c b/libnetdata/config/appconfig.c index 6c008234ad..39a57e5ff5 100644 --- a/libnetdata/config/appconfig.c +++ b/libnetdata/config/appconfig.c @@ -547,7 +547,8 @@ int appconfig_load(struct config *root, char *filename, int overwrite_used, cons s++; if (is_exporter_config) { - global_exporting_section = !(strcmp(s, CONFIG_SECTION_EXPORTING)); + global_exporting_section = + !(strcmp(s, CONFIG_SECTION_EXPORTING)) || !(strcmp(s, CONFIG_SECTION_PROMETHEUS)); if (unlikely(!global_exporting_section)) { int rc; rc = is_valid_connector(s, 0); diff --git a/libnetdata/config/appconfig.h b/libnetdata/config/appconfig.h index a0a3bd6329..8c2ce09a97 100644 --- a/libnetdata/config/appconfig.h +++ b/libnetdata/config/appconfig.h @@ -82,18 +82,19 @@ #define CONFIG_FILENAME "netdata.conf" -#define CONFIG_SECTION_GLOBAL "global" -#define CONFIG_SECTION_WEB "web" -#define CONFIG_SECTION_STATSD "statsd" -#define CONFIG_SECTION_PLUGINS "plugins" -#define CONFIG_SECTION_CLOUD "cloud" -#define CONFIG_SECTION_REGISTRY "registry" -#define CONFIG_SECTION_HEALTH "health" -#define CONFIG_SECTION_BACKEND "backend" -#define CONFIG_SECTION_STREAM "stream" -#define CONFIG_SECTION_EXPORTING "exporting:global" -#define CONFIG_SECTION_HOST_LABEL "host labels" -#define EXPORTING_CONF "exporting.conf" +#define CONFIG_SECTION_GLOBAL "global" +#define CONFIG_SECTION_WEB "web" +#define CONFIG_SECTION_STATSD "statsd" +#define CONFIG_SECTION_PLUGINS "plugins" +#define CONFIG_SECTION_CLOUD "cloud" +#define CONFIG_SECTION_REGISTRY "registry" +#define CONFIG_SECTION_HEALTH "health" +#define CONFIG_SECTION_BACKEND "backend" +#define CONFIG_SECTION_STREAM "stream" +#define CONFIG_SECTION_EXPORTING "exporting:global" +#define CONFIG_SECTION_PROMETHEUS "prometheus:exporter" +#define CONFIG_SECTION_HOST_LABEL "host labels" +#define EXPORTING_CONF "exporting.conf" // these are used to limit the configuration names and values lengths // they are not enforced by config.c functions (they will strdup() all strings, no matter of their length) |