Code

libvirtstats plugin: Added a plugin to collect virtual host statistics.
[collectd.git] / src / plugin.c
index 67d61880ee963c5cc4fc2403d9da8c3c274f0a3b..6b17290f32dbe08a9a4bb6406cbc8fef35efdd01 100644 (file)
@@ -32,6 +32,7 @@
 #include "configfile.h"
 #include "utils_llist.h"
 #include "utils_cache.h"
+#include "utils_threshold.h"
 
 /*
  * Private structures
@@ -696,6 +697,7 @@ int plugin_dispatch_values (const char *name, value_list_t *vl)
 
        /* Update the value cache */
        uc_update (ds, vl);
+       ut_check_threshold (ds, vl);
 
        le = llist_head (list_write);
        while (le != NULL)
@@ -715,6 +717,11 @@ int plugin_dispatch_notification (const notification_t *notif)
        llentry_t *le;
        /* Possible TODO: Add flap detection here */
 
+       DEBUG ("plugin_dispatch_notification: severity = %i; message = %s; "
+                       "time = %u; host = %s;",
+                       notif->severity, notif->message,
+                       (unsigned int) notif->time, notif->host);
+
        /* Nobody cares for notifications */
        if (list_notification == NULL)
                return (-1);