@@ -207,6 +207,10 @@
#@ Author : Claudio Kuenzler (www.claudiokuenzler.com)
#@ Reason : Another two workarounds for Dell systems (VGA Cable Pres 0, Add-in Card 4 PEM Presence 0)
#@---------------------------------------------------
+#@ Date : 20150109
+#@ Author : Claudio Kuenzler (www.claudiokuenzler.com)
+#@ Reason : Output serial number of chassis if a blade server is checked
+#@---------------------------------------------------
import sys
import time
@@ -215,7 +219,7 @@
import string
from optparse import OptionParser,OptionGroup
-version = '20140319'
+version = '20150109'
NS = 'root/cimv2'
@@ -315,6 +319,9 @@
ExitCritical = 2
ExitUnknown = 3
+# Special handling for blade servers
+isblade = "no"
+
def dell_country(country):
if country == 'at': # Austria
return 'at/de/'
@@ -642,6 +649,7 @@
man = 'Unknown Manufacturer'
verboseoutput(" Manufacturer = "+man)
SerialNumber = instance[u'SerialNumber']
+ SerialChassis = instance[u'SerialNumber']
if SerialNumber:
verboseoutput(" SerialNumber = "+SerialNumber)
server_info = man + ' '
@@ -655,6 +663,7 @@
SerialNumber = instance[u'SerialNumber']
if SerialNumber:
verboseoutput(" SerialNumber = "+SerialNumber)
+ isblade = "yes"
# Report detail of Numeric Sensors and generate nagios perfdata
@@ -761,8 +770,8 @@
# Added 20121027 As long as Dell doesnt correct these CIM elements return code we have to ignore it
ignore_list.append("System Board 1 Riser Config Err 0: Connected")
ignore_list.append("System Board 1 LCD Cable Pres 0: Connected")
- ignore_list.append("System Board 1 VGA Cable Pres 0: Connected")
- ignore_list.append("Add-in Card 4 PEM Presence 0: Connected")
+ ignore_list.append("System Board 1 VGA Cable Pres 0: Connected")
+ ignore_list.append("Add-in Card 4 PEM Presence 0: Connected")
if instance['OperationalStatus'] is not None :
elementStatus = instance['OperationalStatus'][0]
verboseoutput(" Element Op Status = %d" % elementStatus)
@@ -813,6 +822,10 @@
SerialNumber = urlised_serialnumber(vendor,urlise_country,SerialNumber)
server_info = urlised_server_info(vendor,urlise_country,server_info)
+# If this is a blade server, also output chassis serial number as additional info
+if (isblade == "yes") :
+ SerialNumber += " Chassis S/N: %s " % (SerialChassis)
+
# Output performance data
perf = '|'
if perfdata:
|