summaryrefslogtreecommitdiffstats
path: root/web/attachments/355994-check_procs.c.patch
blob: 3aa972430305bd8acb1f3767a91fec032bda9b1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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;
  }