summaryrefslogtreecommitdiffstats
path: root/database/rrd.h
diff options
context:
space:
mode:
authorEmmanuel Vasilakis <mrzammler@mm.st>2023-01-18 10:42:30 +0200
committerGitHub <noreply@github.com>2023-01-18 10:42:30 +0200
commit3d5f9e64a012b8d0f66ccf483e0e0e6eb3186787 (patch)
treea564b1d7a15427c601d7ead9a410a825e6007894 /database/rrd.h
parentb9cafae62c973a651dbf1bb7448fc42e2eb61527 (diff)
Revert health to run in a single thread (#14244)
* revert health to single thread * remove getting now * use a health struct * remove commented code * cleanup health log from metdata * dont check for METADATA_UPDATE
Diffstat (limited to 'database/rrd.h')
-rw-r--r--database/rrd.h24
1 files changed, 13 insertions, 11 deletions
diff --git a/database/rrd.h b/database/rrd.h
index 77cfb5aee6..1d6a869d22 100644
--- a/database/rrd.h
+++ b/database/rrd.h
@@ -895,6 +895,17 @@ typedef struct alarm_log {
netdata_rwlock_t alarm_log_rwlock;
} ALARM_LOG;
+typedef struct health {
+ unsigned int health_enabled; // 1 when this host has health enabled
+ time_t health_delay_up_to; // a timestamp to delay alarms processing up to
+ STRING *health_default_exec; // the full path of the alarms notifications program
+ STRING *health_default_recipient; // the default recipient for all alarms
+ char *health_log_filename; // the alarms event log filename
+ size_t health_log_entries_written; // the number of alarm events written 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
+} HEALTH;
// ----------------------------------------------------------------------------
// RRD HOST
@@ -1012,17 +1023,8 @@ struct rrdhost {
// ------------------------------------------------------------------------
// health monitoring options
- unsigned int health_enabled; // 1 when this host has health enabled
- bool health_spawn; // true when health thread is running
- unsigned int aclk_alert_reloaded; // 1 on thread start and health reload, 0 after removed are sent
- time_t health_delay_up_to; // a timestamp to delay alarms processing up to
- STRING *health_default_exec; // the full path of the alarms notifications program
- STRING *health_default_recipient; // the default recipient for all alarms
- char *health_log_filename; // the alarms event log filename
- size_t health_log_entries_written; // the number of alarm events written 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
+ // health variables
+ HEALTH health;
// all RRDCALCs are primarily allocated and linked here
DICTIONARY *rrdcalc_root_index;