summaryrefslogtreecommitdiffstats
path: root/database
diff options
context:
space:
mode:
authorMarkos Fountoulakis <44345837+mfundul@users.noreply.github.com>2020-07-14 12:44:05 +0300
committerGitHub <noreply@github.com>2020-07-14 12:44:05 +0300
commitdf57b89fafdffa7fd45aaf608c07b9a6717cc2ea (patch)
tree147a08da5c489c11214e5e68ae77fdf695784cea /database
parentd9d4d1dca53849e2cbcc5b3079aa13a63e819b5b (diff)
Fix transition from archived to active charts not generating alarms. (#9536)
Diffstat (limited to 'database')
-rw-r--r--database/rrdset.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/database/rrdset.c b/database/rrdset.c
index bf9175a614..0483c5ac84 100644
--- a/database/rrdset.c
+++ b/database/rrdset.c
@@ -534,9 +534,9 @@ RRDSET *rrdset_create_custom(
char fullid[RRD_ID_LENGTH_MAX + 1];
snprintfz(fullid, RRD_ID_LENGTH_MAX, "%s.%s", type, id);
+ int changed_from_archived_to_active = 0;
RRDSET *st = rrdset_find_on_create(host, fullid);
if (st) {
- int changed_from_archived_to_active = 0;
int mark_rebuild = 0;
rrdset_flag_set(st, RRDSET_FLAG_SYNC_CLOCK);
rrdset_flag_clear(st, RRDSET_FLAG_UPSTREAM_EXPOSED);
@@ -670,7 +670,7 @@ RRDSET *rrdset_create_custom(
st = rrdset_find_on_create(host, fullid);
if(st) {
- if (!is_archived && rrdset_flag_check(st, RRDSET_FLAG_ARCHIVED)) {
+ if (changed_from_archived_to_active) {
rrdset_flag_clear(st, RRDSET_FLAG_ARCHIVED);
rrdsetvar_create(st, "last_collected_t", RRDVAR_TYPE_TIME_T, &st->last_collected_time.tv_sec, RRDVAR_OPTION_DEFAULT);
rrdsetvar_create(st, "collected_total_raw", RRDVAR_TYPE_TOTAL, &st->last_collected_total, RRDVAR_OPTION_DEFAULT);