Code

check_procs: Added performance data to plugin output. sh/check_procs
authorSebastian Harl <sh@teamix.net>
Fri, 8 Apr 2011 08:50:52 +0000 (10:50 +0200)
committerSebastian Harl <sh@teamix.net>
Fri, 8 Apr 2011 08:51:50 +0000 (10:51 +0200)
plugins/check_procs.c

index 41228c52742d3bf1083bdcd1602a8790945d9179..1a748d7c01c0362ae10b58c9a5ff6818be5930d4 100644 (file)
@@ -299,6 +299,13 @@ main (int argc, char **argv)
        if ( verbose >= 1 && strcmp(fails,"") )
                printf (" [%s]", fails);
 
+       if (metric == METRIC_PROCS)
+               printf (" | procs=%d;%s;%s;0;\n", procs,
+                               warning_range ? warning_range : "",
+                               critical_range ? critical_range : "");
+       else
+               printf (" | procs=%d;;;0; procs_warn=%d;;;0; procs_crit=%d;;;0;", procs, warn, crit);
+
        printf ("\n");
        return result;
 }