summaryrefslogtreecommitdiffstats
path: root/streaming
diff options
context:
space:
mode:
authorvkalintiris <vasilis@netdata.cloud>2022-05-03 19:02:36 +0300
committerGitHub <noreply@github.com>2022-05-03 19:02:36 +0300
commitebdd819d6ead44c5bab80c69be4a7d419402fe3c (patch)
treecb17c37c6febf067928d44203322d28e141a2aba /streaming
parentea451662055227545550d8f09deecb1427b7c672 (diff)
Remove per chart configuration. (#12728)
After https://github.com/netdata/netdata/pull/12209 per-chart configuration was used for (a) enabling/disabling a chart, and (b) renaming dimensions. Regarding the first use case: We already have component-specific configuration options|flags to finely control how a chart should behave. Eg. "send charts matching" in streaming, "charts to skip from training" in ML, etc. If we really need the concept of a disabled chart, we can add a host-level simple pattern to match these charts. Regarding the second use case: It's not obvious why we'd need to provide support for remapping dimension names through a chart-specific configuration from the core agent. If the need arises, we could add such support at the right place, ie. a exporter/streaming config section. This will allow each flag to act indepentendly from each other and avoid managing flag-state manually at various places, eg: ``` if(unlikely(!rrdset_flag_check(st, RRDSET_FLAG_ENABLED))) { rrdset_flag_clear(st, RRDSET_FLAG_UPSTREAM_SEND); rrdset_flag_set(st, RRDSET_FLAG_UPSTREAM_IGNORE); } ... ```
Diffstat (limited to 'streaming')
-rw-r--r--streaming/rrdpush.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/streaming/rrdpush.c b/streaming/rrdpush.c
index 8829d1eeaf..186719e51d 100644
--- a/streaming/rrdpush.c
+++ b/streaming/rrdpush.c
@@ -136,11 +136,7 @@ static inline int should_send_chart_matching(RRDSET *st) {
if (rrdset_flag_check(st, RRDSET_FLAG_ANOMALY_DETECTION))
return ml_streaming_enabled();
- if(unlikely(!rrdset_flag_check(st, RRDSET_FLAG_ENABLED))) {
- rrdset_flag_clear(st, RRDSET_FLAG_UPSTREAM_SEND);
- rrdset_flag_set(st, RRDSET_FLAG_UPSTREAM_IGNORE);
- }
- else if(!rrdset_flag_check(st, RRDSET_FLAG_UPSTREAM_SEND|RRDSET_FLAG_UPSTREAM_IGNORE)) {
+ if(!rrdset_flag_check(st, RRDSET_FLAG_UPSTREAM_SEND|RRDSET_FLAG_UPSTREAM_IGNORE)) {
RRDHOST *host = st->rrdhost;
if(simple_pattern_matches(host->rrdpush_send_charts_matching, st->id) ||