diff options
author | Stelios Fragkakis <52996999+stelfrag@users.noreply.github.com> | 2023-02-22 20:58:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-22 20:58:29 +0200 |
commit | 37ba7d615d458a5246a93e8ad0e67294500d538c (patch) | |
tree | e47097fceafc4a97c7f42567ca7732c4efa24306 /database | |
parent | 56f522ad1ca3b86c14d7e800e5ad7e63ca95c5d7 (diff) |
Clean host structure (#14584)
* Remove varlib_dir from host structure
* Remove unused parameter
Diffstat (limited to 'database')
-rw-r--r-- | database/rrd.h | 1 | ||||
-rw-r--r-- | database/rrdhost.c | 10 |
2 files changed, 1 insertions, 10 deletions
diff --git a/database/rrd.h b/database/rrd.h index 72c9f1746b..869d665d86 100644 --- a/database/rrd.h +++ b/database/rrd.h @@ -997,7 +997,6 @@ struct rrdhost { // the actual per tier is at .db[tier].mode char *cache_dir; // the directory to save RRD cache files - char *varlib_dir; // the directory to save health log struct { RRD_MEMORY_MODE mode; // the db mode for this tier diff --git a/database/rrdhost.c b/database/rrdhost.c index 1bd878ab6b..5d4dce1a08 100644 --- a/database/rrdhost.c +++ b/database/rrdhost.c @@ -333,10 +333,8 @@ int is_legacy = 1; rrdhost_option_set(host, RRDHOST_OPTION_DELETE_ORPHAN_HOST); char filename[FILENAME_MAX + 1]; - if(is_localhost) { + if(is_localhost) host->cache_dir = strdupz(netdata_configured_cache_dir); - host->varlib_dir = strdupz(netdata_configured_varlib_dir); - } else { // this is not localhost - append our GUID to localhost path if (is_in_multihost) { // don't append to cache dir in multihost @@ -353,9 +351,6 @@ int is_legacy = 1; if(r != 0 && errno != EEXIST) error("Host '%s': cannot create directory '%s'", rrdhost_hostname(host), host->cache_dir); } - - snprintfz(filename, FILENAME_MAX, "%s/%s", netdata_configured_varlib_dir, host->machine_guid); - host->varlib_dir = strdupz(filename); } // this is also needed for custom host variables - not only health @@ -502,7 +497,6 @@ int is_legacy = 1; " (to '%s' with api key '%s')" ", health %s" ", cache_dir '%s'" - ", varlib_dir '%s'" ", alarms default handler '%s'" ", alarms default recipient '%s'" , rrdhost_hostname(host) @@ -521,7 +515,6 @@ int is_legacy = 1; , host->rrdpush_send_api_key?host->rrdpush_send_api_key:"" , host->health.health_enabled?"enabled":"disabled" , host->cache_dir - , host->varlib_dir , string2str(host->health.health_default_exec) , string2str(host->health.health_default_recipient) ); @@ -1204,7 +1197,6 @@ void rrdhost_free___while_having_rrd_wrlock(RRDHOST *host, bool force) { string_freez(host->program_version); rrdhost_system_info_free(host->system_info); freez(host->cache_dir); - freez(host->varlib_dir); freez(host->rrdpush_send_api_key); freez(host->rrdpush_send_destination); rrdpush_destinations_free(host); |