diff options
Diffstat (limited to 'database')
-rw-r--r-- | database/rrd.h | 12 | ||||
-rw-r--r-- | database/rrdhost.c | 48 | ||||
-rw-r--r-- | database/rrdset.c | 4 |
3 files changed, 6 insertions, 58 deletions
diff --git a/database/rrd.h b/database/rrd.h index ba06164010..e48c646019 100644 --- a/database/rrd.h +++ b/database/rrd.h @@ -461,23 +461,21 @@ typedef enum rrdset_flags { // (the master data set should be the one that has the same family and is not detail) RRDSET_FLAG_DEBUG = 1 << 2, // enables or disables debugging for a chart RRDSET_FLAG_OBSOLETE = 1 << 3, // this is marked by the collector/module as obsolete - RRDSET_FLAG_EXPORTING_SEND = 1 << 4, // if set, this chart should be sent to Prometheus web API - RRDSET_FLAG_EXPORTING_IGNORE = 1 << 5, // if set, this chart should not be sent to Prometheus web API + RRDSET_FLAG_EXPORTING_SEND = 1 << 4, // if set, this chart should be sent to Prometheus web API and external databases + RRDSET_FLAG_EXPORTING_IGNORE = 1 << 5, // if set, this chart should not be sent to Prometheus web API and external databases RRDSET_FLAG_UPSTREAM_SEND = 1 << 6, // if set, this chart should be sent upstream (streaming) RRDSET_FLAG_UPSTREAM_IGNORE = 1 << 7, // if set, this chart should not be sent upstream (streaming) RRDSET_FLAG_UPSTREAM_EXPOSED = 1 << 8, // if set, we have sent this chart definition to netdata parent (streaming) RRDSET_FLAG_STORE_FIRST = 1 << 9, // if set, do not eliminate the first collection during interpolation RRDSET_FLAG_HETEROGENEOUS = 1 << 10, // if set, the chart is not homogeneous (dimensions in it have multiple algorithms, multipliers or dividers) RRDSET_FLAG_HOMOGENEOUS_CHECK = 1 << 11, // if set, the chart should be checked to determine if the dimensions are homogeneous - RRDSET_FLAG_HIDDEN = 1 << 12, // if set, do not show this chart on the dashboard, but use it for backends + RRDSET_FLAG_HIDDEN = 1 << 12, // if set, do not show this chart on the dashboard, but use it for exporting RRDSET_FLAG_SYNC_CLOCK = 1 << 13, // if set, microseconds on next data collection will be ignored (the chart will be synced to now) RRDSET_FLAG_OBSOLETE_DIMENSIONS = 1 << 14, // this is marked by the collector/module when a chart has obsolete dimensions // No new values have been collected for this chart since agent start or it was marked RRDSET_FLAG_OBSOLETE at // least rrdset_free_obsolete_time seconds ago. RRDSET_FLAG_ARCHIVED = 1 << 15, RRDSET_FLAG_ACLK = 1 << 16, - RRDSET_FLAG_BACKEND_SEND = 1 << 17, // if set, this chart should be sent to backends - RRDSET_FLAG_BACKEND_IGNORE = 1 << 18 // if set, this chart should not be sent to backends } RRDSET_FLAGS; #ifdef HAVE_C___ATOMIC @@ -632,8 +630,8 @@ typedef enum rrdhost_flags { RRDHOST_FLAG_ORPHAN = 1 << 0, // this host is orphan (not receiving data) RRDHOST_FLAG_DELETE_OBSOLETE_CHARTS = 1 << 1, // delete files of obsolete charts RRDHOST_FLAG_DELETE_ORPHAN_HOST = 1 << 2, // delete the entire host when orphan - RRDHOST_FLAG_BACKEND_SEND = 1 << 3, // send it to backends - RRDHOST_FLAG_BACKEND_DONT_SEND = 1 << 4, // don't send it to backends + RRDHOST_FLAG_EXPORTING_SEND = 1 << 3, // send it to external databases + RRDHOST_FLAG_EXPORTING_DONT_SEND = 1 << 4, // don't send it to external databases RRDHOST_FLAG_ARCHIVED = 1 << 5, // The host is archived, no collected charts yet RRDHOST_FLAG_MULTIHOST = 1 << 6, // Host belongs to localhost/megadb } RRDHOST_FLAGS; diff --git a/database/rrdhost.c b/database/rrdhost.c index 8f87784008..5890b6f9ce 100644 --- a/database/rrdhost.c +++ b/database/rrdhost.c @@ -718,7 +718,7 @@ int rrd_init(char *hostname, struct rrdhost_system_info *system_info) { , netdata_configured_timezone , netdata_configured_abbrev_timezone , netdata_configured_utc_offset - , config_get(CONFIG_SECTION_BACKEND, "host tags", "") + , "" , program_name , program_version , default_rrd_update_every @@ -1233,50 +1233,6 @@ struct label *parse_json_tags(struct label *label_list, const char *tags) return label_list; } -static struct label *rrdhost_load_labels_from_tags(void) -{ - if (!localhost->tags) - return NULL; - - struct label *label_list = NULL; - BACKEND_TYPE type = BACKEND_TYPE_UNKNOWN; - - if (config_exists(CONFIG_SECTION_BACKEND, "enabled")) { - if (config_get_boolean(CONFIG_SECTION_BACKEND, "enabled", CONFIG_BOOLEAN_NO) != CONFIG_BOOLEAN_NO) { - const char *type_name = config_get(CONFIG_SECTION_BACKEND, "type", "graphite"); - type = backend_select_type(type_name); - } - } - - switch (type) { - case BACKEND_TYPE_GRAPHITE: - label_list = parse_simple_tags( - label_list, localhost->tags, '=', ';', DO_NOT_STRIP_QUOTES, DO_NOT_STRIP_QUOTES, - DO_NOT_SKIP_ESCAPED_CHARACTERS); - break; - case BACKEND_TYPE_OPENTSDB_USING_TELNET: - label_list = parse_simple_tags( - label_list, localhost->tags, '=', ' ', DO_NOT_STRIP_QUOTES, DO_NOT_STRIP_QUOTES, - DO_NOT_SKIP_ESCAPED_CHARACTERS); - break; - case BACKEND_TYPE_OPENTSDB_USING_HTTP: - label_list = parse_simple_tags( - label_list, localhost->tags, ':', ',', STRIP_QUOTES, STRIP_QUOTES, - DO_NOT_SKIP_ESCAPED_CHARACTERS); - break; - case BACKEND_TYPE_JSON: - label_list = parse_json_tags(label_list, localhost->tags); - break; - default: - label_list = parse_simple_tags( - label_list, localhost->tags, '=', ',', DO_NOT_STRIP_QUOTES, STRIP_QUOTES, - DO_NOT_SKIP_ESCAPED_CHARACTERS); - break; - } - - return label_list; -} - static struct label *rrdhost_load_kubernetes_labels(void) { struct label *l=NULL; @@ -1340,10 +1296,8 @@ void reload_host_labels(void) struct label *from_auto = rrdhost_load_auto_labels(); struct label *from_k8s = rrdhost_load_kubernetes_labels(); struct label *from_config = rrdhost_load_config_labels(); - struct label *from_tags = rrdhost_load_labels_from_tags(); struct label *new_labels = merge_label_lists(from_auto, from_k8s); - new_labels = merge_label_lists(new_labels, from_tags); new_labels = merge_label_lists(new_labels, from_config); rrdhost_rdlock(localhost); diff --git a/database/rrdset.c b/database/rrdset.c index e8217e90ba..7b58d3780d 100644 --- a/database/rrdset.c +++ b/database/rrdset.c @@ -190,8 +190,6 @@ int rrdset_set_name(RRDSET *st, const char *name) { rrdset_flag_clear(st, RRDSET_FLAG_EXPORTING_SEND); rrdset_flag_clear(st, RRDSET_FLAG_EXPORTING_IGNORE); - rrdset_flag_clear(st, RRDSET_FLAG_BACKEND_SEND); - rrdset_flag_clear(st, RRDSET_FLAG_BACKEND_IGNORE); rrdset_flag_clear(st, RRDSET_FLAG_UPSTREAM_SEND); rrdset_flag_clear(st, RRDSET_FLAG_UPSTREAM_IGNORE); rrdset_flag_clear(st, RRDSET_FLAG_UPSTREAM_EXPOSED); @@ -872,8 +870,6 @@ RRDSET *rrdset_create_custom( rrdset_flag_clear(st, RRDSET_FLAG_OBSOLETE); rrdset_flag_clear(st, RRDSET_FLAG_EXPORTING_SEND); rrdset_flag_clear(st, RRDSET_FLAG_EXPORTING_IGNORE); - rrdset_flag_clear(st, RRDSET_FLAG_BACKEND_SEND); - rrdset_flag_clear(st, RRDSET_FLAG_BACKEND_IGNORE); rrdset_flag_clear(st, RRDSET_FLAG_UPSTREAM_SEND); rrdset_flag_clear(st, RRDSET_FLAG_UPSTREAM_IGNORE); rrdset_flag_clear(st, RRDSET_FLAG_UPSTREAM_EXPOSED); |