Module: check_mk
Branch: master
Commit: b0b9f493b730e7237976948ba047639797bf0cc6
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b0b9f493b730e7…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Oct 27 15:41:29 2015 +0100
#2439 FIX solaris_prtdiag: Can now handle Oracle Corporation SUN FIRE X4170 M2 SERVER
The inventory plugin was unable to handle systems of this type <i>Oracle Corporation
SUN FIRE X4170 M2 SERVER</i>.
---
.werks/2439 | 10 ++++++++++
ChangeLog | 1 +
inventory/solaris_prtdiag | 4 ++++
3 files changed, 15 insertions(+)
diff --git a/.werks/2439 b/.werks/2439
new file mode 100644
index 0000000..1888018
--- /dev/null
+++ b/.werks/2439
@@ -0,0 +1,10 @@
+Title: solaris_prtdiag: Can now handle Oracle Corporation SUN FIRE X4170 M2 SERVER
+Level: 1
+Component: inv
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i4
+Date: 1445956783
+
+The inventory plugin was unable to handle systems of this type <i>Oracle
Corporation SUN FIRE X4170 M2 SERVER</i>.
diff --git a/ChangeLog b/ChangeLog
index b65f313..942347d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -48,6 +48,7 @@
* 2436 NetApp monitoring: Now able to gather data for inventory...
* 2667 FIX: solaris_mem: fix exception in inventory plugin
* 2714 FIX: Fixed visibility of folding arrows by making them dark
+ * 2439 FIX: solaris_prtdiag: Can now handle Oracle Corporation SUN FIRE X4170 M2
SERVER...
1.2.7i3:
diff --git a/inventory/solaris_prtdiag b/inventory/solaris_prtdiag
index 2fd8716..d4aadb6 100644
--- a/inventory/solaris_prtdiag
+++ b/inventory/solaris_prtdiag
@@ -104,12 +104,15 @@ def inv_solaris_prtdiag(info):
# 'System Configuration: Oracle Corporation sun4v SPARC T4-1'
# 'System Configuration: Sun Microsystems sun4u SPARC Enterprise M4000
Server'
# 'System Configuration: Supermicro H8DG6/H8DGi'
+ # 'System Configuration: Oracle Corporation SUN FIRE X4170 M2
SERVER'
node = inv_tree("hardware.system.")
system_info = line[0].split(':', 1)[1].rstrip('\'')
# Fields are separated by double spaces for some outputs
if " " in system_info:
system_info_list = system_info.split(" ")
+ elif system_info.startswith(" Oracle Corporation") and
len(system_info) > 20:
+ system_info_list = system_info[1:19], system_info[20:]
else:
system_info_list = system_info.split()
@@ -117,6 +120,7 @@ def inv_solaris_prtdiag(info):
node["product"] = system_info_list[1]
product_list = node["product"].split()
+
if product_list[-1].startswith('T'):
node["family"] = "T-series"
elif product_list[-2].startswith('M'):