--- 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"