summaryrefslogtreecommitdiffstats
path: root/health
diff options
context:
space:
mode:
authorStelios Fragkakis <52996999+stelfrag@users.noreply.github.com>2023-08-22 20:00:44 +0300
committerGitHub <noreply@github.com>2023-08-22 20:00:44 +0300
commit35ae7175420304a6ef151bca223f74ee234868b2 (patch)
tree8c216c739c6f05587578f9b8e5a5b9ad14fe5bdb /health
parentebf521102476e4f9efbd017596ff70f48364b12e (diff)
Misc code cleanup (#15665)
* Cleanup code * Add SQLITE3_COLUMN_STRDUPZ_OR_NULL for readability * Bind unique id properly * Cleanup with is_claimed parameter to decide which cleanup to use Unify cleanup function sql_health_alarm_log_cleanup Add SQLITE3_BIND_STRING_OR_NULL and SQLITE3_COLUMN_STRINGDUP_OR_NULL sql_health_alarm_log_count returns number of rows instead of updating host->health.health_log_entries_written Reformat queries for clarity * Try to fix codacy issue * Try to fix codacy issue -- issue small warning * Change label from fail to done * Drop index on unique_id and health_log_id and create one on both * Update database/sqlite/sqlite_aclk_alert.c Co-authored-by: Emmanuel Vasilakis <mrzammler@gmail.com> * Fix double bind --------- Co-authored-by: Emmanuel Vasilakis <mrzammler@gmail.com>
Diffstat (limited to 'health')
-rw-r--r--health/health.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/health/health.c b/health/health.c
index d94c33161d..b92251566a 100644
--- a/health/health.c
+++ b/health/health.c
@@ -844,9 +844,6 @@ static void initialize_health(RRDHOST *host)
host->health.health_default_exec = string_strdupz(config_get(CONFIG_SECTION_HEALTH, "script to execute on alarm", filename));
host->health.health_default_recipient = string_strdupz("root");
- //if (!is_chart_name_populated(&host->host_uuid))
- // chart_name_populate(&host->host_uuid);
-
sql_health_alarm_log_load(host);
// ------------------------------------------------------------------------
@@ -1187,7 +1184,7 @@ void *health_main(void *ptr) {
#ifdef ENABLE_ACLK
if (netdata_cloud_enabled)
- sql_queue_alarm_to_aclk(host, ae, 1);
+ sql_queue_alarm_to_aclk(host, ae, true);
#endif
}
}