Module: check_mk
Branch: master
Commit: 9ae1d8576ddd5a05c2ff2e239106b541418e5d86
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9ae1d8576ddd5a…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Jan 28 14:10:24 2016 +0100
#2984 mk_inventory.solaris: improved detection of serial number for solaris_prtdiag
plugin
The agent plugin is now able to detect serial numbers with spaces.
---
.werks/2984 | 10 ++++++++++
ChangeLog | 1 +
agents/plugins/mk_inventory.solaris | 2 +-
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/2984 b/.werks/2984
new file mode 100644
index 0000000..ab42a6d
--- /dev/null
+++ b/.werks/2984
@@ -0,0 +1,10 @@
+Title: mk_inventory.solaris: improved detection of serial number for solaris_prtdiag
plugin
+Level: 1
+Component: inv
+Compatible: compat
+Version: 1.2.7i4
+Date: 1453986550
+Class: feature
+
+The agent plugin is now able to detect serial numbers with spaces.
+
diff --git a/ChangeLog b/ChangeLog
index b4d13df..664d640 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -345,6 +345,7 @@
* 2436 NetApp monitoring: Now able to gather data for inventory...
* 2440 VMware ESX inventory: Now able to display ESX hostsystems and virtualmachines
of clusters
* 2889 snmp_extended_info: new inventory function which discovers the model name and
serial number...
+ * 2984 mk_inventory.solaris: improved detection of serial number for solaris_prtdiag
plugin...
* 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...
diff --git a/agents/plugins/mk_inventory.solaris b/agents/plugins/mk_inventory.solaris
index eaece65..b6b3d1f 100755
--- a/agents/plugins/mk_inventory.solaris
+++ b/agents/plugins/mk_inventory.solaris
@@ -51,7 +51,7 @@ then
if type sneep >/dev/null 2>&1; then
SN=$(sneep -t serial)
else
- SN=$(smbios -t SMB_TYPE_SYSTEM | grep 'Serial Number:' | awk
'{print $3}')
+ SN=$(smbios -t SMB_TYPE_SYSTEM | grep 'Serial Number:' | awk
'{print substr($0, index($0,$3))}')
fi
echo "SerialNumber: $SN"
prtdiag -v