summaryrefslogtreecommitdiffstats
path: root/database/rrdcalc.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-08-10 09:18:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-08-10 09:18:49 +0000
commitdd814a7c1a8de056a79f7238578b09236edd5506 (patch)
tree429e7eed5a634a4efe9a6877ce66da8e64aa1782 /database/rrdcalc.c
parentAdding upstream version 1.41.0. (diff)
downloadnetdata-dd814a7c1a8de056a79f7238578b09236edd5506.tar.xz
netdata-dd814a7c1a8de056a79f7238578b09236edd5506.zip
Adding upstream version 1.42.0.upstream/1.42.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--database/rrdcalc.c12
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,