|
@@ -670,7 +670,7 @@ static int load_netdata_conf(char *filename, char overwrite_used) {
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
|
|
-int get_system_info(RRDHOST* host, struct rrdhost_system_info *system_info) {
|
|
|
|
|
|
+int get_system_info(struct rrdhost_system_info *system_info) {
|
|
char *script;
|
|
char *script;
|
|
script = mallocz(sizeof(char) * (strlen(netdata_configured_primary_plugins_dir) + strlen("system-info.sh") + 2));
|
|
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");
|
|
sprintf(script, "%s/%s", netdata_configured_primary_plugins_dir, "system-info.sh");
|
|
@@ -701,7 +701,7 @@ int get_system_info(RRDHOST* host, struct rrdhost_system_info *system_info) {
|
|
char n[51], v[101];
|
|
char n[51], v[101];
|
|
snprintfz(n, 50,"%s",name);
|
|
snprintfz(n, 50,"%s",name);
|
|
snprintfz(v, 101,"%s",value);
|
|
snprintfz(v, 101,"%s",value);
|
|
- if(unlikely(rrdhost_set_system_info_variable(host, system_info, n, v))) {
|
|
|
|
|
|
+ if(unlikely(rrdhost_set_system_info_variable(system_info, n, v))) {
|
|
info("Unexpected environment variable %s=%s", n, v);
|
|
info("Unexpected environment variable %s=%s", n, v);
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
@@ -1169,7 +1169,7 @@ int main(int argc, char **argv) {
|
|
|
|
|
|
netdata_anonymous_statistics_enabled=-1;
|
|
netdata_anonymous_statistics_enabled=-1;
|
|
struct rrdhost_system_info *system_info = calloc(1, sizeof(struct rrdhost_system_info));
|
|
struct rrdhost_system_info *system_info = calloc(1, sizeof(struct rrdhost_system_info));
|
|
- get_system_info(NULL, system_info);
|
|
|
|
|
|
+ get_system_info(system_info);
|
|
|
|
|
|
rrd_init(netdata_configured_hostname, system_info);
|
|
rrd_init(netdata_configured_hostname, system_info);
|
|
// ------------------------------------------------------------------------
|
|
// ------------------------------------------------------------------------
|
|
@@ -1196,7 +1196,7 @@ int main(int argc, char **argv) {
|
|
info("netdata initialization completed. Enjoy real-time performance monitoring!");
|
|
info("netdata initialization completed. Enjoy real-time performance monitoring!");
|
|
netdata_ready = 1;
|
|
netdata_ready = 1;
|
|
|
|
|
|
- if (get_system_info(localhost, system_info) == 0) send_statistics("START","-", "-");
|
|
|
|
|
|
+ send_statistics("START","-", "-");
|
|
|
|
|
|
// ------------------------------------------------------------------------
|
|
// ------------------------------------------------------------------------
|
|
// unblock signals
|
|
// unblock signals
|