summaryrefslogtreecommitdiffstats
path: root/health/health_log.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 11:19:16 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 12:07:37 +0000
commitb485aab7e71c1625cfc27e0f92c9509f42378458 (patch)
treeae9abe108601079d1679194de237c9a435ae5b55 /health/health_log.c
parentAdding upstream version 1.44.3. (diff)
downloadnetdata-upstream.tar.xz
netdata-upstream.zip
Adding upstream version 1.45.3+dfsg.upstream/1.45.3+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/health/health_log.c (renamed from health/health_log.c)34
1 files changed, 17 insertions, 17 deletions
diff --git a/health/health_log.c b/src/health/health_log.c
index fd124ce80..8839b2da5 100644
--- a/health/health_log.c
+++ b/src/health/health_log.c
@@ -86,31 +86,31 @@ void health_log_alert_transition_with_trace(RRDHOST *host, ALARM_ENTRY *ae, int
inline ALARM_ENTRY* health_create_alarm_entry(
RRDHOST *host,
- uint32_t alarm_id,
- uint32_t alarm_event_id,
- const uuid_t config_hash_id,
+ RRDCALC *rc,
time_t when,
- STRING *name,
- STRING *chart,
- STRING *chart_context,
- STRING *chart_name,
- STRING *class,
- STRING *component,
- STRING *type,
- STRING *exec,
- STRING *recipient,
time_t duration,
NETDATA_DOUBLE old_value,
NETDATA_DOUBLE new_value,
RRDCALC_STATUS old_status,
RRDCALC_STATUS new_status,
- STRING *source,
- STRING *units,
- STRING *summary,
- STRING *info,
int delay,
HEALTH_ENTRY_FLAGS flags
) {
+ uint32_t alarm_id = rc->id;
+ uint32_t alarm_event_id = rc->next_event_id++;
+ STRING *name = rc->config.name;
+ STRING *chart = rc->rrdset->id;
+ STRING *chart_context = rc->rrdset->context;
+ STRING *chart_name = rc->rrdset->name;
+ STRING *class = rc->config.classification;
+ STRING *component = rc->config.component;
+ STRING *type = rc->config.type;
+ STRING *exec = rc->config.exec;
+ STRING *recipient = rc->config.recipient;
+ STRING *source = rc->config.source;
+ STRING *units = rc->config.units;
+ STRING *summary = rc->summary;
+ STRING *info = rc->info;
if (duration < 0)
duration = 0;
@@ -123,7 +123,7 @@ inline ALARM_ENTRY* health_create_alarm_entry(
ae->chart_context = string_dup(chart_context);
ae->chart_name = string_dup(chart_name);
- uuid_copy(ae->config_hash_id, *((uuid_t *) config_hash_id));
+ uuid_copy(ae->config_hash_id, rc->config.hash_id);
uuid_generate_random(ae->transition_id);
ae->global_id = now_realtime_usec();