diff options
Diffstat (limited to 'database/rrdcalc.c')
-rw-r--r-- | database/rrdcalc.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/database/rrdcalc.c b/database/rrdcalc.c index d85825c5..8e41df8d 100644 --- a/database/rrdcalc.c +++ b/database/rrdcalc.c @@ -82,10 +82,14 @@ uint32_t rrdcalc_get_unique_id(RRDHOST *host, STRING *chart, STRING *name, uint3 alarm_id = sql_get_alarm_id(host, chart, name, next_event_id, config_hash_id); if (!alarm_id) { - if (unlikely(!host->health_log.next_alarm_id)) - host->health_log.next_alarm_id = (uint32_t)now_realtime_sec(); + //check possible stored config hash as zeroes or null + alarm_id = sql_get_alarm_id_check_zero_hash(host, chart, name, next_event_id, config_hash_id); + if (!alarm_id) { + if (unlikely(!host->health_log.next_alarm_id)) + host->health_log.next_alarm_id = (uint32_t)now_realtime_sec(); - alarm_id = host->health_log.next_alarm_id++; + alarm_id = host->health_log.next_alarm_id++; + } } } @@ -292,6 +296,7 @@ static void rrdcalc_link_to_rrdset(RRDSET *st, RRDCALC *rc) { rc->name, rc->rrdset->id, rc->rrdset->context, + rc->rrdset->name, rc->rrdset->family, rc->classification, rc->component, @@ -336,6 +341,7 @@ static void rrdcalc_unlink_from_rrdset(RRDCALC *rc, bool having_ll_wrlock) { rc->name, rc->rrdset->id, rc->rrdset->context, + rc->rrdset->name, rc->rrdset->family, rc->classification, rc->component, |