summaryrefslogtreecommitdiffstats
path: root/web/attachments/134273-check_cpu_perfdata.diff
diff options
context:
space:
mode:
Diffstat (limited to 'web/attachments/134273-check_cpu_perfdata.diff')
-rw-r--r--web/attachments/134273-check_cpu_perfdata.diff31
1 files changed, 31 insertions, 0 deletions
diff --git a/web/attachments/134273-check_cpu_perfdata.diff b/web/attachments/134273-check_cpu_perfdata.diff
new file mode 100644
index 0000000..c841234
--- /dev/null
+++ b/web/attachments/134273-check_cpu_perfdata.diff
@@ -0,0 +1,31 @@
1--- check_cpu 2005-05-12 15:26:00.273073312 -0700
2+++ check_cpu.orig 2005-05-12 15:26:56.617507656 -0700
3@@ -146,25 +146,17 @@
4 ### state, and exit the plugin.
5
6
7-# if critical or warning is not set on the command line, then set it to zero
8-# this keeps the performance data from having negative values for warn and crit
9-if critical == -2:
10- critical = 0
11-if warning == -1:
12- warning = 0
13-
14-
15 if idleValue <= critical:
16 status = "CPU CRITICAL"
17- print status + ": CPU is only " + idleCPU + "% idle | CPU_idle=" + idleCPU +"%;" + `warning` + ";" + `critical` + ";"
18+ print status + ": CPU is only " + idleCPU + "% idle"
19 sys.exit(2)
20 elif idleValue <= warning:
21 status = "WARNING"
22- print status + ": CPU is only " + idleCPU + "% idle | CPU_idle=" + idleCPU +"%;" + `warning` + ";" + `critical` + ";"
23+ print status + ": CPU is only " + idleCPU + "% idle"
24 sys.exit(1)
25 elif warning < idleValue:
26 status = "OK"
27- print status + ": CPU is " + idleCPU + "% idle | CPU_idle=" + idleCPU +"%;" + `warning` + ";" + `critical` + ";"
28+ print status + ": CPU is " + idleCPU + "% idle"
29 sys.exit(0)
30 else:
31 status = "CPU STATUS UNKNOWN"