Module: check_mk
Branch: master
Commit: 9f903cce255fec5c202f488cdb78594cd15eb7e9
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9f903cce255fec…
Author: Götz Golla <gg(a)mathias-kettner.de>
Date: Wed Mar 12 15:27:46 2014 +0100
FIX: dell_poweredge_cpu not correctly detects when cpus are not present
---
checkman/dell_poweredge_cpu | 5 +----
checks/dell_poweredge_cpu | 8 +++-----
2 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/checkman/dell_poweredge_cpu b/checkman/dell_poweredge_cpu
index 52e7b59..3e16658 100644
--- a/checkman/dell_poweredge_cpu
+++ b/checkman/dell_poweredge_cpu
@@ -15,10 +15,7 @@ description:
No limits are set in the check.
item:
- Either the name of the location variable configured for the CPU, or
- the chassis index and sensor index seperated by a dash.
+ The name of the location variable configured for the CPU
inventory:
All CPUs of the device are detected
-
-
diff --git a/checks/dell_poweredge_cpu b/checks/dell_poweredge_cpu
index ff9ea56..de91938 100644
--- a/checks/dell_poweredge_cpu
+++ b/checks/dell_poweredge_cpu
@@ -46,15 +46,13 @@ dell_poweredge_cpu_scan = lambda oid:
oid('.1.3.6.1.2.1.1.2.0') == ".1.3.6.1.4.
def inventory_dell_poweredge_cpu(info):
inventory = []
for line in info[0]:
- if line[5] != "":
+ if line[5] != "" and line[2] != "1":
inventory.append( ( line[5], None ) )
- else:
- inventory.append( ( line[0]+"-"+line[1], None ) )
return inventory
def check_dell_poweredge_cpu(item, _no_params, info):
for chassisIndex, Index, StateSettings, Status, Reading, LocationName in info[0]:
- if item == LocationName or item == chassisIndex + "-" + Index:
+ if item == LocationName:
for line in info[1]:
if line[0] == chassisIndex and line[1] == Index:
BrandName = line[2]
@@ -72,7 +70,7 @@ def check_dell_poweredge_cpu(item, _no_params, info):
return state, infotext
- return 3, "Temp Sensor not found"
+ return 3, "CPU not found"
check_info["dell_poweredge_cpu"] = {
"check_function" : check_dell_poweredge_cpu,