]> arthur.barton.de Git - netdata.git/blobdiff - src/main.c
allow netdata to cleanup orphan hosts that have not pushed any metrics for some time...
[netdata.git] / src / main.c
index 7f590aca605f970a90543a07a005b6d8cd3aeb0e..ae8f599aae35a54fb99cd2897e301bdc96074b70 100644 (file)
@@ -705,6 +705,8 @@ int main(int argc, char **argv) {
     if(!config_loaded)
         config_load(NULL, 0);
 
+    // ------------------------------------------------------------------------
+    // initialize netdata
     {
         char *pmax = config_get(CONFIG_SECTION_GLOBAL, "glibc malloc arena max for plugins", "1");
         if(pmax && *pmax)
@@ -757,6 +759,16 @@ int main(int argc, char **argv) {
         log_init();
         error_log_limit_unlimited();
 
+
+        // --------------------------------------------------------------------
+        // load stream.conf
+        {
+            char filename[FILENAME_MAX + 1];
+            snprintfz(filename, FILENAME_MAX, "%s/stream.conf", netdata_configured_config_dir);
+            appconfig_load(&stream_config, filename, 0);
+        }
+
+
         // --------------------------------------------------------------------
         // setup process signals
 
@@ -851,15 +863,6 @@ int main(int argc, char **argv) {
 
         if(web_server_mode != WEB_SERVER_MODE_NONE)
             create_listen_sockets();
-
-
-        // --------------------------------------------------------------------
-        // load the aggregated host configuration file
-        {
-            char filename[FILENAME_MAX + 1];
-            snprintfz(filename, FILENAME_MAX, "%s/aggregated_hosts.conf", netdata_configured_config_dir);
-            appconfig_load(&stream_config, filename, 0);
-        }
     }
 
     // initialize the log files