diff options
author | Ilya Mashchenko <ilya@netdata.cloud> | 2023-11-30 22:14:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-30 22:14:57 +0200 |
commit | 35ffc0c82b4c74fa3f073cfda2df9eedfc8dbd31 (patch) | |
tree | d00813d64426ee38883a8cc7ddb6f5f03d9c42e0 | |
parent | d481e70f52f1f0922bece45ccabb72692691e4d6 (diff) |
remove system info logging (#16517)
* log system info to debug
* function cancel to debug
* never log system info
* setenv
-rw-r--r-- | collectors/plugins.d/pluginsd_parser.c | 2 | ||||
-rw-r--r-- | daemon/buildinfo.c | 4 | ||||
-rw-r--r-- | daemon/main.c | 10 |
3 files changed, 6 insertions, 10 deletions
diff --git a/collectors/plugins.d/pluginsd_parser.c b/collectors/plugins.d/pluginsd_parser.c index 246043a375..6e40850ea3 100644 --- a/collectors/plugins.d/pluginsd_parser.c +++ b/collectors/plugins.d/pluginsd_parser.c @@ -1117,7 +1117,7 @@ void pluginsd_function_cancel(void *data) { dfe_done(t); if(sent <= 0) - nd_log(NDLS_DAEMON, NDLP_NOTICE, + nd_log(NDLS_DAEMON, NDLP_DEBUG, "PLUGINSD: FUNCTION_CANCEL request didn't match any pending function requests in pluginsd.d."); } diff --git a/daemon/buildinfo.c b/daemon/buildinfo.c index 297919f026..7d585527ce 100644 --- a/daemon/buildinfo.c +++ b/daemon/buildinfo.c @@ -1291,7 +1291,7 @@ __attribute__((constructor)) void initialize_build_info(void) { // ---------------------------------------------------------------------------- // system info -int get_system_info(struct rrdhost_system_info *system_info, bool log); +int get_system_info(struct rrdhost_system_info *system_info); static void populate_system_info(void) { static bool populated = false; static SPINLOCK spinlock = NETDATA_SPINLOCK_INITIALIZER; @@ -1314,7 +1314,7 @@ static void populate_system_info(void) { } else { system_info = callocz(1, sizeof(struct rrdhost_system_info)); - get_system_info(system_info, false); + get_system_info(system_info); free_system_info = true; } diff --git a/daemon/main.c b/daemon/main.c index 1b8c556a74..1fd143bf90 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -1314,7 +1314,7 @@ static inline void coverity_remove_taint(char *s) (void)s; } -int get_system_info(struct rrdhost_system_info *system_info, bool log) { +int get_system_info(struct rrdhost_system_info *system_info) { char *script; script = mallocz(sizeof(char) * (strlen(netdata_configured_primary_plugins_dir) + strlen("system-info.sh") + 2)); sprintf(script, "%s/%s", netdata_configured_primary_plugins_dir, "system-info.sh"); @@ -1346,11 +1346,7 @@ int get_system_info(struct rrdhost_system_info *system_info, bool log) { if(unlikely(rrdhost_set_system_info_variable(system_info, line, value))) { netdata_log_error("Unexpected environment variable %s=%s", line, value); - } - else { - if(log) - netdata_log_info("%s=%s", line, value); - + } else { setenv(line, value, 1); } } @@ -2107,7 +2103,7 @@ int main(int argc, char **argv) { netdata_anonymous_statistics_enabled=-1; struct rrdhost_system_info *system_info = callocz(1, sizeof(struct rrdhost_system_info)); __atomic_sub_fetch(&netdata_buffers_statistics.rrdhost_allocations_size, sizeof(struct rrdhost_system_info), __ATOMIC_RELAXED); - get_system_info(system_info, true); + get_system_info(system_info); (void) registry_get_this_machine_guid(); system_info->hops = 0; get_install_type(&system_info->install_type, &system_info->prebuilt_arch, &system_info->prebuilt_dist); |