diff options
author | Vladimir Kobal <vlad@prokk.net> | 2021-04-21 10:50:06 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-21 10:50:06 +0300 |
commit | 157fb5860a61c4472c2bc3ba11f2dd8712d9c845 (patch) | |
tree | b3ad0d016f1765dc9b00fffb055d06aebb6c0c4a /database | |
parent | 9d481060489110db52dcd0f8d7e22196c70742c0 (diff) |
Backend chart filtering backward compatibility fix (#11002)
Diffstat (limited to 'database')
-rw-r--r-- | database/rrd.h | 8 | ||||
-rw-r--r-- | database/rrdset.c | 4 |
2 files changed, 9 insertions, 3 deletions
diff --git a/database/rrd.h b/database/rrd.h index 24a5e8e5db..ce0ef44821 100644 --- a/database/rrd.h +++ b/database/rrd.h @@ -454,8 +454,8 @@ 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_BACKEND_SEND = 1 << 4, // if set, this chart should be sent to backends - RRDSET_FLAG_BACKEND_IGNORE = 1 << 5, // if set, this chart should not be sent to backends + 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_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) @@ -468,7 +468,9 @@ typedef enum rrdset_flags { // 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_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 diff --git a/database/rrdset.c b/database/rrdset.c index 15640d3ed8..da581c0cd5 100644 --- a/database/rrdset.c +++ b/database/rrdset.c @@ -175,6 +175,8 @@ int rrdset_set_name(RRDSET *st, const char *name) { if(unlikely(rrdset_index_add_name(host, st) != st)) error("RRDSET: INTERNAL ERROR: attempted to index duplicate chart name '%s'", st->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); @@ -858,6 +860,8 @@ RRDSET *rrdset_create_custom( rrdset_flag_clear(st, RRDSET_FLAG_DETAIL); rrdset_flag_clear(st, RRDSET_FLAG_DEBUG); 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); |