Small fix of thresholds to CPU check
Signed-off-by: Sven Velt <sven@velt.de>
This commit is contained in:
parent
634f1c5703
commit
7a1e5339a9
|
@ -92,6 +92,11 @@ class CheckNAF(SNMPMonitoringPlugin):
|
||||||
# cputimeidle = int(self.SNMPGET(self.OID['CPU_Time_Idle']))
|
# cputimeidle = int(self.SNMPGET(self.OID['CPU_Time_Idle']))
|
||||||
cpu_cs = self.SNMPGET(self.OID['CPU_Context_Switches'])
|
cpu_cs = self.SNMPGET(self.OID['CPU_Context_Switches'])
|
||||||
|
|
||||||
|
if '%' in warn:
|
||||||
|
warn = warn[:-1]
|
||||||
|
if '%' in crit:
|
||||||
|
crit = crit[:-1]
|
||||||
|
|
||||||
returncode = self.value_wc_to_returncode(cpu_timebusy, warn, crit)
|
returncode = self.value_wc_to_returncode(cpu_timebusy, warn, crit)
|
||||||
output = 'CPU ' + str(cpu_timebusy) + '% busy, CPU architecture: ' + self.Status2String['CPU_Arch'].get(cpu_arch)
|
output = 'CPU ' + str(cpu_timebusy) + '% busy, CPU architecture: ' + self.Status2String['CPU_Arch'].get(cpu_arch)
|
||||||
perfdata = []
|
perfdata = []
|
||||||
|
@ -149,6 +154,7 @@ class CheckNAF(SNMPMonitoringPlugin):
|
||||||
|
|
||||||
return self.remember_check('disk', returncode, output, perfdata=perfdata, target=target)
|
return self.remember_check('disk', returncode, output, perfdata=perfdata, target=target)
|
||||||
|
|
||||||
|
|
||||||
def check_global(self):
|
def check_global(self):
|
||||||
model = self.SNMPGET(self.OID['Model'])
|
model = self.SNMPGET(self.OID['Model'])
|
||||||
globalstatus = int(self.SNMPGET(self.OID['Global_Status']))
|
globalstatus = int(self.SNMPGET(self.OID['Global_Status']))
|
||||||
|
|
Loading…
Reference in a new issue