diff options
author | Vladimir Kobal <vlad@prokk.net> | 2020-04-06 09:26:25 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-06 09:26:25 +0300 |
commit | ebbce7c7773a886d222dbaa60d098b6c25150f69 (patch) | |
tree | 03848706164fba421a72c9bedf25f421ffdafa25 /libnetdata | |
parent | 50209f1971280324b0e692ac01bf45e809874856 (diff) |
Prometheus web api connector (#8540)
* Fix the Prometheus web API code in the exporting engine
* Rename connector types
* Remove the conditional compilation of the exporting engine
* Use labels instead of tags
* Fix the exporter configuration
* Document functions
* Add unit tests
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) |