diff options
author | thiagoftsm <thiagoftsm@gmail.com> | 2019-07-01 11:55:16 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-01 11:55:16 +0000 |
commit | dd73f3e0cd0d9a1797f0c82de0fae5ccf97e9464 (patch) | |
tree | 239fdd722a21d0d3f1e8adecc788edeca5eb907f /database/rrd.h | |
parent | 266cbec7a8c8f626b9a73a8f6ea7e269b9ce837e (diff) |
Repeating alarm notifications (#6309)
* Alarm_repeat mergin the original!
* Alarm_repeat binary tree!
* Alarm_repeat binary tree finished!
* Alarm_repeat move function and format string
* Alarms bringing a new Binary tree
* Alarms fixing the last two
* Alarm_repeat useless var!
* Alarm fix format and repeat alarm!
* Alarm_backend steps!
* Alarm_repeat stopping to test cloud!
* Alarm_repeat stopping to test cloud 2!
* Alarm_repeat fixing when restart!
Diffstat (limited to 'database/rrd.h')
-rw-r--r-- | database/rrd.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/database/rrd.h b/database/rrd.h index 278a9cd813..5b09c2dda6 100644 --- a/database/rrd.h +++ b/database/rrd.h @@ -572,6 +572,8 @@ struct alarm_entry { uint32_t updated_by_id; uint32_t updates_id; + time_t last_repeat; + struct alarm_entry *next; }; @@ -686,11 +688,16 @@ struct rrdhost { char *health_log_filename; // the alarms event log filename size_t health_log_entries_written; // the number of alarm events writtern to the alarms event log FILE *health_log_fp; // the FILE pointer to the open alarms event log file + uint32_t health_default_warn_repeat_every; // the default value for the interval between repeating warning notifications + uint32_t health_default_crit_repeat_every; // the default value for the interval between repeating critical notifications + // all RRDCALCs are primarily allocated and linked here // RRDCALCs may be linked to charts at any point // (charts may or may not exist when these are loaded) RRDCALC *alarms; + avl_tree_lock alarms_idx_health_log; + avl_tree_lock alarms_idx_name; ALARM_LOG health_log; // alarms historical events (event log) uint32_t health_last_processed_id; // the last processed health id from the log @@ -1022,6 +1029,12 @@ extern collected_number rrddim_set(RRDSET *st, const char *id, collected_number extern long align_entries_to_pagesize(RRD_MEMORY_MODE mode, long entries); // ---------------------------------------------------------------------------- +// Miscellaneous functions + +extern int alarm_compare_id(void *a, void *b); +extern int alarm_compare_name(void *a, void *b); + +// ---------------------------------------------------------------------------- // RRD internal functions #ifdef NETDATA_RRD_INTERNALS |