fix percentages on alerts (#17391)
Costa Tsaousis committed
Apr 12, 2024 at 13:10 UTC
dc6809cdcea2872087f5111c31a971073b0316aa
2 files changed
+7
-1
src/health/health.h
+1
-1
@@ -22,7 +22,7 @@ typedef enum __attribute__((packed)) {
22
23
#define RRDR_OPTIONS_DATA_SOURCES (RRDR_OPTION_PERCENTAGE|RRDR_OPTION_ANOMALY_BIT)
24
#define RRDR_OPTIONS_DIMS_AGGREGATION (RRDR_OPTION_DIMS_MIN|RRDR_OPTION_DIMS_MAX|RRDR_OPTION_DIMS_AVERAGE|RRDR_OPTION_DIMS_MIN2MAX)
25
-#define RRDR_OPTIONS_REMOVE_OVERLAPPING(options) ((options) &= ~(RRDR_OPTIONS_DIMS_AGGREGATION|RRDR_OPTIONS_DATA_SOURCES))
25
+#define RRDR_OPTIONS_REMOVE_OVERLAPPING(options) ((options) & ~(RRDR_OPTIONS_DIMS_AGGREGATION|RRDR_OPTIONS_DATA_SOURCES))
26
27
void health_entry_flags_to_json_array(BUFFER *wb, const char *key, HEALTH_ENTRY_FLAGS flags);
28
src/health/health_prototypes.c
+6
@@ -540,9 +540,15 @@ void health_prototype_copy_config(struct rrd_alert_config *dst, struct rrd_alert
540
541
dst->update_every = src->update_every;
542
543
+ dst->alert_action_options = src->alert_action_options;
544
+
545
dst->dimensions = string_dup(src->dimensions);
546
547
dst->time_group = src->time_group;
548
+ dst->time_group_condition = src->time_group_condition;
549
+ dst->time_group_value = src->time_group_value;
550
+ dst->dims_group = src->dims_group;
551
+ dst->data_source = src->data_source;
552
dst->before = src->before;
553
dst->after = src->after;
554
dst->options = src->options;