[Nagiosplug-devel] [ nagiosplug-Feature Requests-2458521 ] Add performance data to check_procs plugin
SourceForge.net
noreply at sourceforge.net
Thu Jan 27 10:07:04 CET 2011
Feature Requests item #2458521, was opened at 2008-12-22 14:10
Message generated for change (Comment added) made by jmroth
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397600&aid=2458521&group_id=29880
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Priority: 5
Private: No
Submitted By: Jan Ondrej (ondrejj)
Assigned to: Nobody/Anonymous (nobody)
Summary: Add performance data to check_procs plugin
Initial Comment:
check_procs plugin has no performance data. It can be nice to display performance data for number of processes or zombie processes.
I have my own perfdata wrapper until this will be a part of nagios-plugins, but my wrapper has very limited functionality.
You only need to display this at end of line from check_plugin:
|procs=NUMBER_OF_PROCS;WARN_PROC_COUNT;CRITICAL_PROC_COUNT;0
Attaching my wrapper, which does this, but it's not a right way. :)
----------------------------------------------------------------------
Comment By: J.M. Roth (jmroth)
Date: 2011-01-27 10:07
Message:
here's a diff to add performance data to check_procs.c
--- check_procs-old.c 2010-07-27 22:47:16.000000000 +0200
+++ check_procs.c 2011-01-27 10:02:08.000000000 +0100
@@ -301,6 +301,7 @@
if ( verbose >= 1 && strcmp(fails,"") )
printf (" [%s]", fails);
+ printf ("|procs=%d;%d;%d;%d:%d;%d:%d", procs, warn, crit, wmin,
wmax, cmin, cmax);
printf ("\n");
return result;
}
----------------------------------------------------------------------
Comment By: GreenRover (greenrover)
Date: 2009-03-06 14:09
Message:
Her as the original check_procs.c
/root/nagios-plugins-1.4.13/plugins/check_procs.c
row 308 befor " printf ("\n");"
add:
printf (" | ");
printf (ngettext ("process=%d", "processes=%d", (unsigned long) procs),
procs);
printf (";%d;%d", wmax, cmax);
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397600&aid=2458521&group_id=29880
More information about the Devel
mailing list