Module: check_mk
Branch: master
Commit: 16ed2ff5960164d44eb806fe5e3b6dd2b046a08d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=16ed2ff5960164…
Author: Marcel Arentz <ma(a)mathias-kettner.de>
Date: Mon Sep 25 09:26:36 2017 +0200
5299 dell_idrac_info: Added Dell HW information to inventory
The new information will be provided if got by idrac and includes:
- Serial number
- Express Service Code
- Bios version, vendor and date of version
- Raid controller name and version
Change-Id: Ifb9fabdd982eece104c5f4121cb3aa5846485742
---
.werks/5299 | 14 ++++++++++
inventory/dell_idrac_info | 63 ++++++++++++++++++++++++++++++++++++++++++
web/plugins/views/inventory.py | 3 ++
3 files changed, 80 insertions(+)
diff --git a/.werks/5299 b/.werks/5299
new file mode 100644
index 0000000..33825fe
--- /dev/null
+++ b/.werks/5299
@@ -0,0 +1,14 @@
+Title: dell_idrac_info: Added Dell HW information to inventory
+Level: 1
+Component: inv
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1506324149
+Class: feature
+
+The new information will be provided if got by idrac and includes:
+- Serial number
+- Express Service Code
+- Bios version, vendor and date of version
+- Raid controller name and version
diff --git a/inventory/dell_idrac_info b/inventory/dell_idrac_info
new file mode 100644
index 0000000..188baef
--- /dev/null
+++ b/inventory/dell_idrac_info
@@ -0,0 +1,63 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2017 mk(a)mathias-kettner.de |
+# +------------------------------------------------------------------+
+#
+# This file is part of Check_MK.
+# The official homepage is at
http://mathias-kettner.de/check_mk.
+#
+# check_mk is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation in version 2. check_mk is distributed
+# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
+# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE. See the GNU General Public License for more de-
+# tails. You should have received a copy of the GNU General Public
+# License along with GNU Make; see the file COPYING. If not, write
+# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+# Boston, MA 02110-1301 USA.
+
+# .1.3.6.1.4.1.674.10892.5.4.300.50.1.8.1.1 2.5.2
+# .1.3.6.1.4.1.674.10892.5.5.1.20.130.3.1.26.1 1.03
+# .1.3.6.1.4.1.674.10892.5.1.3.2.0 JG2NS12
+# .1.3.6.1.4.1.674.10892.5.1.3.3.0 42330791846
+
+
+
+def inv_snmp_extended_info(info):
+ serial, expresscode, bios_date, bios_version, \
+ bios_vendor, raid_name, raid_version = info[0]
+
+ node = inv_tree("hardware.system.")
+ node['serial'] = serial
+ node['expresscode'] = expresscode
+
+ node = inv_tree("hardware.bios.")
+ node['version'] = bios_version
+ node['vendor'] = bios_vendor
+ node['date'] = time.mktime(time.strptime(bios_date, "%m/%d/%Y"))
+
+ node = inv_tree("hardware.storage.controller.")
+ node['version'] = raid_version
+ node['name'] = raid_name
+
+inv_info['dell_hw_info'] = {
+ 'inv_function' : inv_snmp_extended_info,
+ 'snmp_info' : ('.1.3.6.1.4.1.674.10892.5', [
+ "1.3.2.0", #
IDRAC-MIB::systemServiceTag
+ "1.3.3.0", #
IDRAC-MIB::systemExpressServiceCode
+ "4.300.50.1.7.1.1", #
IDRAC-MIB::systemBIOSReleaseDateName
+ "4.300.50.1.8.1.1", #
IDRAC-MIB::systemBIOSVersionName
+ "4.300.50.1.11.1.1", #
IDRAC-MIB::systemBIOSManufacturerName
+ "5.1.20.130.1.1.2.1", #
IDRAC-MIB::controllerName
+ "5.1.20.130.1.1.8.1", #
IDRAC-MIB::controllerFWVersion
+ ]),
+ 'snmp_scan_function' : lambda oid:
oid(".1.3.6.1.4.1.674.10892.5.1.1.1.0"),
+}
diff --git a/web/plugins/views/inventory.py b/web/plugins/views/inventory.py
index b6c50bf..d777561 100644
--- a/web/plugins/views/inventory.py
+++ b/web/plugins/views/inventory.py
@@ -614,6 +614,7 @@ inventory_displayhints.update({
".hardware.system." : { "title" :
_("System") },
".hardware.system.product" : { "title" :
_("Product") },
".hardware.system.serial" : { "title" :
_("Serial Number") },
+ ".hardware.system.expresscode" : { "title" :
_("Express Servicecode") },
".hardware.system.model" : { "title" :
_("Model Name") },
# Legacy ones. Kept to not break existing views - DON'T use these values for new
plugins
@@ -729,6 +730,8 @@ inventory_displayhints.update({
".hardware.components.stacks:*.location" : { "title" :
_("Location") },
".hardware.storage." : { "title" :
_("Storage") },
+ ".hardware.storage.controller." : { "title" :
_("Controller") },
+ ".hardware.storage.controller.version" : { "title" :
_("Version") },
".hardware.storage.disks:" : { "title" :
_("Block Devices"), "render" : render_inv_dicttable },
".hardware.storage.disks:*." : { "title" :
_("Block Device %d") },
".hardware.storage.disks:*.signature" : { "title" :
_("Disk ID") },