diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-07-20 04:49:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-07-20 04:49:55 +0000 |
commit | ab1bb5b7f1c3c3a7b240ab7fc8661459ecd7decb (patch) | |
tree | 7a900833aad3ccc685712c6c2a7d87576d54f427 /database/rrdcalc.h | |
parent | Adding upstream version 1.40.1. (diff) | |
download | netdata-ab1bb5b7f1c3c3a7b240ab7fc8661459ecd7decb.tar.xz netdata-ab1bb5b7f1c3c3a7b240ab7fc8661459ecd7decb.zip |
Adding upstream version 1.41.0.upstream/1.41.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'database/rrdcalc.h')
-rw-r--r-- | database/rrdcalc.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/database/rrdcalc.h b/database/rrdcalc.h index 3b48d74ec..2081452c7 100644 --- a/database/rrdcalc.h +++ b/database/rrdcalc.h @@ -28,6 +28,8 @@ typedef enum { RRDCALC_FLAG_FROM_TEMPLATE = (1 << 10), // the rrdcalc has been created from a template } RRDCALC_FLAGS; +void rrdcalc_flags_to_json_array(BUFFER *wb, const char *key, RRDCALC_FLAGS flags); + typedef enum { // This list uses several other options from RRDR_OPTIONS for db lookups. // To add an item here, you need to reserve a bit in RRDR_OPTIONS. @@ -120,6 +122,7 @@ struct rrdcalc { NETDATA_DOUBLE value; // the current value of the alarm NETDATA_DOUBLE old_value; // the previous value of the alarm + NETDATA_DOUBLE last_status_change_value; // the value at the last status change RRDCALC_FLAGS run_flags; // check RRDCALC_FLAG_* @@ -136,6 +139,7 @@ struct rrdcalc { int delay_up_current; // the current up notification delay duration int delay_down_current; // the current down notification delay duration int delay_last; // the last delay we used + ALARM_ENTRY *ae; // last alarm entry // ------------------------------------------------------------------------ // variables this alarm exposes to the rest of the alarms @@ -211,6 +215,7 @@ struct alert_config { STRING *repeat; STRING *host_labels; STRING *chart_labels; + STRING *source; STRING *p_db_lookup_dimensions; STRING *p_db_lookup_method; @@ -235,7 +240,7 @@ const char *rrdcalc_status2string(RRDCALC_STATUS status); void rrdcalc_free_unused_rrdcalc_loaded_from_config(RRDCALC *rc); -uint32_t rrdcalc_get_unique_id(RRDHOST *host, STRING *chart, STRING *name, uint32_t *next_event_id); +uint32_t rrdcalc_get_unique_id(RRDHOST *host, STRING *chart, STRING *name, uint32_t *next_event_id, uuid_t *config_hash_id); void rrdcalc_add_from_rrdcalctemplate(RRDHOST *host, RRDCALCTEMPLATE *rt, RRDSET *st, const char *overwrite_alert_name, const char *overwrite_dimensions); int rrdcalc_add_from_config(RRDHOST *host, RRDCALC *rc); |