notify_email plugin: Add plugin to send notifications via email.
[collectd.git] / src / load.c
index c9f130b..7d11b98 100644 (file)
 #include <sys/loadavg.h>
 #endif
 
+#if HAVE_STATGRAB_H
+# include <statgrab.h>
+#endif
+
 #ifdef HAVE_GETLOADAVG
 #if !defined(LOADAVG_1MIN) || !defined(LOADAVG_5MIN) || !defined(LOADAVG_15MIN)
 #define LOADAVG_1MIN  0
@@ -49,8 +53,9 @@ static void load_submit (gauge_t snum, gauge_t mnum, gauge_t lnum)
        vl.time = time (NULL);
        strcpy (vl.host, hostname_g);
        strcpy (vl.plugin, "load");
+       strcpy (vl.type, "load");
 
-       plugin_dispatch_values ("load", &vl);
+       plugin_dispatch_values (&vl);
 }
 
 static int load_read (void)
@@ -112,7 +117,7 @@ static int load_read (void)
        load_submit (snum, mnum, lnum);
 /* #endif KERNEL_LINUX */
 
-#elif defined(HAVE_LIBSTATGRAB)
+#elif HAVE_LIBSTATGRAB
        gauge_t snum, mnum, lnum;
        sg_load_stats *ls;