summaryrefslogtreecommitdiffstats
path: root/exporting/read_config.c
diff options
context:
space:
mode:
authorVladimir Kobal <vlad@prokk.net>2020-01-09 12:51:41 +0200
committerGitHub <noreply@github.com>2020-01-09 12:51:41 +0200
commit0fba85e2c20add69546cefbf37bb2033d2d1e052 (patch)
treedd124104fb54f99ef2ddca7e92e946d2d7f7aa31 /exporting/read_config.c
parent37edc6898b453b80806f07264cc94acf04bdd39e (diff)
Send host labels via exporting connectors (#7554)
* Add labels to the JSON exporting connector * Add labels to the Graphite exporting connector * Add labels to the OpenTSDB telnet exporting connector * Add labels to the OpenTSDB HTTP exporting connector * Replace control characters in JSON strings * Add unit tests
Diffstat (limited to 'exporting/read_config.c')
-rw-r--r--exporting/read_config.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/exporting/read_config.c b/exporting/read_config.c
index 84c7828f93..5675187d21 100644
--- a/exporting/read_config.c
+++ b/exporting/read_config.c
@@ -318,6 +318,18 @@ struct engine *read_exporting_config()
tmp_instance->config.options = exporting_parse_data_source(data_source, tmp_instance->config.options);
+ if (exporter_get_boolean(
+ instance_name, EXPORTER_SEND_CONFIGURED_LABELS, EXPORTER_SEND_CONFIGURED_LABELS_DEFAULT))
+ tmp_instance->config.options |= EXPORTING_OPTION_SEND_CONFIGURED_LABELS;
+ else
+ tmp_instance->config.options &= ~EXPORTING_OPTION_SEND_CONFIGURED_LABELS;
+
+ if (exporter_get_boolean(
+ instance_name, EXPORTER_SEND_AUTOMATIC_LABELS, EXPORTER_SEND_AUTOMATIC_LABELS_DEFAULT))
+ tmp_instance->config.options |= EXPORTING_OPTION_SEND_AUTOMATIC_LABELS;
+ else
+ tmp_instance->config.options &= ~EXPORTING_OPTION_SEND_AUTOMATIC_LABELS;
+
if (exporter_get_boolean(instance_name, EXPORTER_SEND_NAMES, EXPORTER_SEND_NAMES_DEFAULT))
tmp_instance->config.options |= EXPORTING_OPTION_SEND_NAMES;
else