diff options
Diffstat (limited to 'database/rrdcalctemplate.c')
-rw-r--r-- | database/rrdcalctemplate.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/database/rrdcalctemplate.c b/database/rrdcalctemplate.c index a87403963..f0e5da80b 100644 --- a/database/rrdcalctemplate.c +++ b/database/rrdcalctemplate.c @@ -37,9 +37,6 @@ bool rrdcalctemplate_check_rrdset_conditions(RRDCALCTEMPLATE *rt, RRDSET *st, RR if (rt->charts_pattern && !simple_pattern_matches_string(rt->charts_pattern, st->name) && !simple_pattern_matches_string(rt->charts_pattern, st->id)) return false; - if (rt->family_pattern && !simple_pattern_matches_string(rt->family_pattern, st->family)) - return false; - if (rt->module_pattern && !simple_pattern_matches_string(rt->module_pattern, st->module_name)) return false; @@ -100,9 +97,6 @@ static void rrdcalctemplate_free_internals(RRDCALCTEMPLATE *rt) { expression_free(rt->warning); expression_free(rt->critical); - string_freez(rt->family_match); - simple_pattern_free(rt->family_pattern); - string_freez(rt->plugin_match); simple_pattern_free(rt->plugin_pattern); @@ -217,10 +211,6 @@ inline void rrdcalctemplate_delete_all(RRDHOST *host) { } #define RRDCALCTEMPLATE_MAX_KEY_SIZE 1024 -static size_t rrdcalctemplate_key(char *dst, size_t dst_len, const char *name, const char *family_match) { - return snprintfz(dst, dst_len, "%s/%s", name, (family_match && *family_match)?family_match:"*"); -} - void rrdcalctemplate_add_from_config(RRDHOST *host, RRDCALCTEMPLATE *rt) { if(unlikely(!rt->context)) { netdata_log_error("Health configuration for template '%s' does not have a context", rrdcalctemplate_name(rt)); @@ -238,7 +228,7 @@ void rrdcalctemplate_add_from_config(RRDHOST *host, RRDCALCTEMPLATE *rt) { } char key[RRDCALCTEMPLATE_MAX_KEY_SIZE + 1]; - size_t key_len = rrdcalctemplate_key(key, RRDCALCTEMPLATE_MAX_KEY_SIZE, rrdcalctemplate_name(rt), rrdcalctemplate_family_match(rt)); + size_t key_len = snprintfz(key, RRDCALCTEMPLATE_MAX_KEY_SIZE, "%s", rrdcalctemplate_name(rt)); bool added = false; dictionary_set_advanced(host->rrdcalctemplate_root_index, key, (ssize_t)(key_len + 1), rt, sizeof(*rt), &added); |