Code

mbmon plugin: Correct the `type's being passed to the dispatch function.
[collectd.git] / src / vserver.c
index d47957399a59bd3931312f79dafab24963d84413..3a77961bbb3089ff6bb259593c671f46f81a1592 100644 (file)
@@ -49,7 +49,7 @@ static char *rrd_inet6        = "vserver-%s/traffic-inet6.rrd";
 static char *rrd_other = "vserver-%s/traffic-other.rrd";
 static char *rrd_unspec        = "vserver-%s/traffic-unspec.rrd";
 
-static char *rrd_thread        = "vserver-%s/threads.rrd";
+static char *rrd_thread        = "vserver-%s/vs_threads.rrd";
 
 static char *rrd_load  = "vserver-%s/load.rrd";
 
@@ -343,11 +343,17 @@ static void vserver_read (void)
        DIR                     *proc;
        struct dirent   *dent; /* 42 */
 
+       static complain_t complain_obj;
+
        errno = 0;
-       if (NULL == (proc = opendir (PROCDIR))) {
-               syslog (LOG_ERR, "Cannot open '%s': %s", PROCDIR, strerror (errno));
+       if (NULL == (proc = opendir (PROCDIR)))
+       {
+               plugin_complain (LOG_ERR, &complain_obj, "vserver plugin: "
+                               "fopen (%s) failed: %s", PROCDIR, strerror (errno));
                return;
        }
+       plugin_relief (LOG_NOTICE, &complain_obj, "vserver plugin: "
+                       "fopen (%s) succeeded.", PROCDIR);
 
        while (NULL != (dent = readdir (proc))) {
                int  len;