From 0b6423f9c99d9edf8c96fefd0f6c453859395aa1 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Mon, 30 Sep 2013 00:03:24 +0200 Subject: Import Nagios Plugins site Import the Nagios Plugins web site, Cronjobs, infrastructure scripts, and configuration files. --- web/attachments/355994-check_procs.c.patch | 46 ++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 web/attachments/355994-check_procs.c.patch (limited to 'web/attachments/355994-check_procs.c.patch') diff --git a/web/attachments/355994-check_procs.c.patch b/web/attachments/355994-check_procs.c.patch new file mode 100644 index 0000000..3aa9724 --- /dev/null +++ b/web/attachments/355994-check_procs.c.patch @@ -0,0 +1,46 @@ +*** plugins/check_procs.org.c Mon Dec 21 15:11:31 2009 +--- plugins/check_procs.c Mon Dec 21 15:12:17 2009 +*************** +*** 280,293 **** + } + + if ( result == STATE_OK ) { +! printf ("%s %s: ", metric_name, _("OK")); + } else if (result == STATE_WARNING) { +! printf ("%s %s: ", metric_name, _("WARNING")); + if ( metric != METRIC_PROCS ) { + printf (_("%d warn out of "), warn); + } + } else if (result == STATE_CRITICAL) { +! printf ("%s %s: ", metric_name, _("CRITICAL")); + if (metric != METRIC_PROCS) { + printf (_("%d crit, %d warn out of "), crit, warn); + } +--- 280,293 ---- + } + + if ( result == STATE_OK ) { +! printf ("%s %s - ", metric_name, _("OK")); + } else if (result == STATE_WARNING) { +! printf ("%s %s - ", metric_name, _("WARNING")); + if ( metric != METRIC_PROCS ) { + printf (_("%d warn out of "), warn); + } + } else if (result == STATE_CRITICAL) { +! printf ("%s %s - ", metric_name, _("CRITICAL")); + if (metric != METRIC_PROCS) { + printf (_("%d crit, %d warn out of "), crit, warn); + } +*************** +*** 301,306 **** +--- 301,310 ---- + if ( verbose >= 1 && strcmp(fails,"") ) + printf (" [%s]", fails); + ++ // Print performance statistics for drawing graphs etc. tayfunsen ++ // Not sure what 0 in the end of the line is for. ++ printf (" | processes=%d;%d;%d;0", procs, warn, crit); ++ + printf ("\n"); + return result; + } -- cgit v1.2.3-74-g34f1