[nagiosplug] check_procs: Added performance data to plugin ...

Nagios Plugin Development nagios-plugins at users.sourceforge.net
Wed Nov 14 21:11:19 CET 2012


    Module: nagiosplug
    Branch: master
    Commit: e683a8dce530a4eaf1a8fcc90059ea268c7df0e6
    Author: Sebastian Harl <sh at teamix.net>
 Committer: Holger Weiss <holger at zedat.fu-berlin.de>
      Date: Fri Apr  8 10:50:52 2011 +0200
       URL: http://nagiosplug.git.sf.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=commit;h=e683a8d

check_procs: Added performance data to plugin output.

---

 plugins/check_procs.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/plugins/check_procs.c b/plugins/check_procs.c
index 23fdc27..acb256b 100644
--- a/plugins/check_procs.c
+++ b/plugins/check_procs.c
@@ -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;
 }





More information about the Commits mailing list