diff options
author | Costa Tsaousis <costa@netdata.cloud> | 2024-04-12 13:10:02 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-12 13:10:02 +0300 |
commit | dc6809cdcea2872087f5111c31a971073b0316aa (patch) | |
tree | f9cf2238c0036f0041bb077a5c30246e4748bb25 | |
parent | 623ee3a9952891ecb2a56325db440a8d207e9d9b (diff) |
fix percentages on alerts (#17391)
-rw-r--r-- | src/health/health.h | 2 | ||||
-rw-r--r-- | src/health/health_prototypes.c | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/health/health.h b/src/health/health.h index 2a1dd6c656..8aca6dcb2b 100644 --- a/src/health/health.h +++ b/src/health/health.h @@ -22,7 +22,7 @@ typedef enum __attribute__((packed)) { #define RRDR_OPTIONS_DATA_SOURCES (RRDR_OPTION_PERCENTAGE|RRDR_OPTION_ANOMALY_BIT) #define RRDR_OPTIONS_DIMS_AGGREGATION (RRDR_OPTION_DIMS_MIN|RRDR_OPTION_DIMS_MAX|RRDR_OPTION_DIMS_AVERAGE|RRDR_OPTION_DIMS_MIN2MAX) -#define RRDR_OPTIONS_REMOVE_OVERLAPPING(options) ((options) &= ~(RRDR_OPTIONS_DIMS_AGGREGATION|RRDR_OPTIONS_DATA_SOURCES)) +#define RRDR_OPTIONS_REMOVE_OVERLAPPING(options) ((options) & ~(RRDR_OPTIONS_DIMS_AGGREGATION|RRDR_OPTIONS_DATA_SOURCES)) void health_entry_flags_to_json_array(BUFFER *wb, const char *key, HEALTH_ENTRY_FLAGS flags); diff --git a/src/health/health_prototypes.c b/src/health/health_prototypes.c index 8e343bfa1a..ceefbc2225 100644 --- a/src/health/health_prototypes.c +++ b/src/health/health_prototypes.c @@ -540,9 +540,15 @@ void health_prototype_copy_config(struct rrd_alert_config *dst, struct rrd_alert dst->update_every = src->update_every; + dst->alert_action_options = src->alert_action_options; + dst->dimensions = string_dup(src->dimensions); dst->time_group = src->time_group; + dst->time_group_condition = src->time_group_condition; + dst->time_group_value = src->time_group_value; + dst->dims_group = src->dims_group; + dst->data_source = src->data_source; dst->before = src->before; dst->after = src->after; dst->options = src->options; |