summaryrefslogtreecommitdiffstats
path: root/database/rrdcalc.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-06-14 19:20:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-06-14 19:20:33 +0000
commit6cf8f2d5174a53f582e61d715edbb88d6e3367cc (patch)
tree78cec0fd8d09c4a6a052461d42f4b2be3af6d396 /database/rrdcalc.c
parentAdding upstream version 1.39.1. (diff)
downloadnetdata-0ec47d31b6dd5f591027e49c7110a800fc070a86.tar.xz
netdata-0ec47d31b6dd5f591027e49c7110a800fc070a86.zip
Adding upstream version 1.40.0.upstream/1.40.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--database/rrdcalc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/database/rrdcalc.c b/database/rrdcalc.c
index 3ee8719c0..948ebe8a5 100644
--- a/database/rrdcalc.c
+++ b/database/rrdcalc.c
@@ -369,6 +369,10 @@ static inline bool rrdcalc_check_if_it_matches_rrdset(RRDCALC *rc, RRDSET *st) {
st->rrdhost->rrdlabels, rc->host_labels_pattern, '=', NULL))
return false;
+ if (st->rrdlabels && rc->chart_labels_pattern && !rrdlabels_match_simple_pattern_parsed(
+ st->rrdlabels, rc->chart_labels_pattern, '=', NULL))
+ return false;
+
return true;
}
@@ -605,11 +609,13 @@ static void rrdcalc_free_internals(RRDCALC *rc) {
string_freez(rc->host_labels);
string_freez(rc->module_match);
string_freez(rc->plugin_match);
+ string_freez(rc->chart_labels);
simple_pattern_free(rc->foreach_dimension_pattern);
simple_pattern_free(rc->host_labels_pattern);
simple_pattern_free(rc->module_pattern);
simple_pattern_free(rc->plugin_pattern);
+ simple_pattern_free(rc->chart_labels_pattern);
}
static void rrdcalc_rrdhost_delete_callback(const DICTIONARY_ITEM *item __maybe_unused, void *rrdcalc, void *rrdhost __maybe_unused) {