summaryrefslogtreecommitdiffstats
path: root/web/attachments/134273-check_cpu_perfdata.diff
blob: c841234457d9ded3d435b91bc431936dec7e1e3e (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
--- check_cpu	2005-05-12 15:26:00.273073312 -0700
+++ check_cpu.orig	2005-05-12 15:26:56.617507656 -0700
@@ -146,25 +146,17 @@
 ### state,  and exit the plugin.
 
 
-# if critical or warning is not set on the command line, then set it to zero
-# this keeps the performance data from having negative values for warn and crit
-if critical == -2:
-	critical = 0
-if warning == -1:
-	warning = 0
-
-
 if idleValue <= critical:
         status = "CPU CRITICAL"
-        print status + ": CPU is only " + idleCPU + "% idle | CPU_idle=" + idleCPU +"%;" + `warning` + ";" + `critical` + ";"
+        print status + ": CPU is only " + idleCPU + "% idle"
         sys.exit(2) 
 elif idleValue <= warning:
         status = "WARNING"
-        print status + ": CPU is only " + idleCPU + "% idle | CPU_idle=" + idleCPU +"%;" + `warning` + ";" + `critical` + ";"
+        print status + ": CPU is only " + idleCPU + "% idle"
         sys.exit(1)
 elif warning < idleValue:
         status = "OK"
-        print status + ": CPU is " + idleCPU + "% idle | CPU_idle=" + idleCPU +"%;" + `warning` + ";" + `critical` + ";"
+        print status + ": CPU is " + idleCPU + "% idle"
         sys.exit(0)
 else:
         status = "CPU STATUS UNKNOWN"