summaryrefslogtreecommitdiffstats
path: root/database/rrdcalc.c
diff options
context:
space:
mode:
Diffstat (limited to 'database/rrdcalc.c')
-rw-r--r--database/rrdcalc.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/database/rrdcalc.c b/database/rrdcalc.c
index bc91da64f..85b9efb75 100644
--- a/database/rrdcalc.c
+++ b/database/rrdcalc.c
@@ -91,6 +91,9 @@ static void rrdsetcalc_link(RRDSET *st, RRDCALC *rc) {
rc->name,
rc->rrdset->id,
rc->rrdset->family,
+ rc->classification,
+ rc->component,
+ rc->type,
rc->exec,
rc->recipient,
now - rc->last_status_change,
@@ -165,6 +168,9 @@ inline void rrdsetcalc_unlink(RRDCALC *rc) {
rc->name,
rc->rrdset->id,
rc->rrdset->family,
+ rc->classification,
+ rc->component,
+ rc->type,
rc->exec,
rc->recipient,
now - rc->last_status_change,
@@ -428,6 +434,10 @@ inline RRDCALC *rrdcalc_create_from_template(RRDHOST *host, RRDCALCTEMPLATE *rt,
if(rt->units) rc->units = strdupz(rt->units);
if(rt->info) rc->info = strdupz(rt->info);
+ if (rt->classification) rc->classification = strdupz(rt->classification);
+ if (rt->component) rc->component = strdupz(rt->component);
+ if (rt->type) rc->type = strdupz(rt->type);
+
if(rt->calculation) {
rc->calculation = expression_parse(rt->calculation->source, NULL, NULL);
if(!rc->calculation)
@@ -535,6 +545,10 @@ inline RRDCALC *rrdcalc_create_from_rrdcalc(RRDCALC *rc, RRDHOST *host, const ch
if(rc->units) newrc->units = strdupz(rc->units);
if(rc->info) newrc->info = strdupz(rc->info);
+ if (rc->classification) newrc->classification = strdupz(rc->classification);
+ if (rc->component) newrc->component = strdupz(rc->component);
+ if (rc->type) newrc->type = strdupz(rc->type);
+
if(rc->calculation) {
newrc->calculation = expression_parse(rc->calculation->source, NULL, NULL);
if(!newrc->calculation)
@@ -573,6 +587,9 @@ void rrdcalc_free(RRDCALC *rc) {
freez(rc->source);
freez(rc->units);
freez(rc->info);
+ freez(rc->classification);
+ freez(rc->component);
+ freez(rc->type);
simple_pattern_free(rc->spdim);
freez(rc->labels);
simple_pattern_free(rc->splabels);