summaryrefslogtreecommitdiffstats
path: root/database/rrdcalc.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-08-10 09:18:52 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-08-10 09:19:08 +0000
commita2d7dede737947d7c6afa20a88e1f0c64e0eb96c (patch)
treefed4aff7dbe0be00cf91de6261d98bc0eb9a2449 /database/rrdcalc.c
parentReleasing debian version 1.41.0-1. (diff)
downloadnetdata-a2d7dede737947d7c6afa20a88e1f0c64e0eb96c.tar.xz
netdata-a2d7dede737947d7c6afa20a88e1f0c64e0eb96c.zip
Merging upstream version 1.42.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'database/rrdcalc.c')
-rw-r--r--database/rrdcalc.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/database/rrdcalc.c b/database/rrdcalc.c
index d85825c50..8e41df8d6 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,