]> arthur.barton.de Git - netdata.git/blobdiff - src/plugins_d.c
Merge pull request #2021 from ktsaou/master
[netdata.git] / src / plugins_d.c
index dedb3d72963f3db725f88a3c5770cebc9380681a..7fa19eaf05467266beaeab5df8f933a5dc6a2542 100644 (file)
@@ -96,7 +96,7 @@ inline size_t pluginsd_process(RRDHOST *host, struct plugind *cd, FILE *fp, int
     char line[PLUGINSD_LINE_MAX + 1];
 
     char *words[MAX_WORDS] = { NULL };
-    uint32_t HOST_HASH = simple_hash("HOST");
+    /* uint32_t HOST_HASH = simple_hash("HOST"); */
     uint32_t BEGIN_HASH = simple_hash("BEGIN");
     uint32_t END_HASH = simple_hash("END");
     uint32_t FLUSH_HASH = simple_hash("FLUSH");
@@ -205,7 +205,7 @@ inline size_t pluginsd_process(RRDHOST *host, struct plugind *cd, FILE *fp, int
 
             count++;
         }
-        else if(likely(hash == HOST_HASH && !strcmp(s, "HOST"))) {
+/*        else if(likely(hash == HOST_HASH && !strcmp(s, "HOST"))) {
             char *guid = words[1];
             char *hostname = words[2];
 
@@ -221,7 +221,7 @@ inline size_t pluginsd_process(RRDHOST *host, struct plugind *cd, FILE *fp, int
             }
 
             host = rrdhost_find_or_create(hostname, guid);
-        }
+        } */
         else if(likely(hash == FLUSH_HASH && !strcmp(s, "FLUSH"))) {
             debug(D_PLUGINSD, "PLUGINSD: '%s' is requesting a FLUSH", cd->fullfilename);
             st = NULL;
@@ -455,14 +455,14 @@ void *pluginsd_main(void *ptr) {
     if(pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL) != 0)
         error("Cannot set pthread cancel state to ENABLE.");
 
-    int automatic_run = config_get_boolean("plugins", "enable running new plugins", 1);
-    int scan_frequency = (int) config_get_number("plugins", "check for new plugins every", 60);
+    int automatic_run = config_get_boolean(CONFIG_SECTION_PLUGINS, "enable running new plugins", 1);
+    int scan_frequency = (int) config_get_number(CONFIG_SECTION_PLUGINS, "check for new plugins every", 60);
     DIR *dir = NULL;
     struct dirent *file = NULL;
     struct plugind *cd;
 
     // enable the apps plugin by default
-    // config_get_boolean("plugins", "apps", 1);
+    // config_get_boolean(CONFIG_SECTION_PLUGINS, "apps", 1);
 
     if(scan_frequency < 1) scan_frequency = 1;
 
@@ -491,7 +491,7 @@ void *pluginsd_main(void *ptr) {
 
             char pluginname[CONFIG_MAX_NAME + 1];
             snprintfz(pluginname, CONFIG_MAX_NAME, "%.*s", (int)(len - PLUGINSD_FILE_SUFFIX_LEN), file->d_name);
-            int enabled = config_get_boolean("plugins", pluginname, automatic_run);
+            int enabled = config_get_boolean(CONFIG_SECTION_PLUGINS, pluginname, automatic_run);
 
             if(unlikely(!enabled)) {
                 debug(D_PLUGINSD, "PLUGINSD: plugin '%s' is not enabled", file->d_name);