Module: check_mk
Branch: master
Commit: 9cf491bd4579cb7232b3454d863a6ef38ffe8bdf
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9cf491bd4579cb…
Author: Götz Golla <gg(a)mathias-kettner.de>
Date: Fri Mar 21 11:18:39 2014 +0100
Slot number is now derived from drsServerSlotName instead of drsServerIndex
---
checkman/dell_chassis_slots | 2 +-
checks/dell_chassis_slots | 21 +++++++++++----------
2 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/checkman/dell_chassis_slots b/checkman/dell_chassis_slots
index a382cab..2cedd3d 100644
--- a/checkman/dell_chassis_slots
+++ b/checkman/dell_chassis_slots
@@ -15,7 +15,7 @@ description:
of the server: drsServerServiceTag, drsServerSlotName
item:
- The id of the slot
+ The name of the slot as given by drsServerSlotNumber
inventory:
All slots where the state is not "absent".
diff --git a/checks/dell_chassis_slots b/checks/dell_chassis_slots
index a3a634a..dda58f2 100644
--- a/checks/dell_chassis_slots
+++ b/checks/dell_chassis_slots
@@ -25,10 +25,11 @@
# Boston, MA 02110-1301 USA.
dell_chassis_slots_info = ( ".1.3.6.1.4.1.674.10892.2.5.1.1", [
- "1", # drsServerIndex
+ #"1", # drsServerIndex
"2", # drsServerMonitoringCapable
"3", # drsServerServiceTag
"4", # drsServerSlotName
+ "5", # drsServerSlotNumber
])
dell_chassis_slots_scan = lambda oid: oid('.1.3.6.1.2.1.1.2.0') ==
".1.3.6.1.4.1.674.10892.2"
@@ -36,18 +37,18 @@ dell_chassis_slots_scan = lambda oid:
oid('.1.3.6.1.2.1.1.2.0') == ".1.3.6.1.4.
def inventory_dell_chassis_slots(info):
inventory = []
for line in info:
- index = line[0]
- if saveint(index) in ( 1, 2, 3, 4, 5, 6, 7, 8, 9 ):
- index = "0"+index
- if line[1] != "1" and line[3] != "N/A":
- inventory.append( ( index, None ) )
+ number = line[3]
+ if saveint(number) in ( 1, 2, 3, 4, 5, 6, 7, 8, 9 ):
+ number = "0"+number
+ if line[0] != "1" and line[2] != "N/A":
+ inventory.append( ( number, None ) )
return inventory
def check_dell_chassis_slots(item, _no_params, info):
- for index, status, service_tag, name in info:
- if saveint(index) in ( 1, 2, 3, 4, 5, 6, 7, 8, 9 ):
- index = "0"+index
- if item == index:
+ for status, service_tag, name, number in info:
+ if saveint(number) in ( 1, 2, 3, 4, 5, 6, 7, 8, 9 ):
+ number = "0"+number
+ if item == number:
#absent = 1,none = 2,basic = 3,off = 4,
state_table = {
"1" : ( "absent", 0 ),