[checkmk-commits] Check_MK Git: check_mk: #1943 FIX inventory plugin win_os: no longer detects incorrect i386 architecture

Andreas Boesl ab at mathias-kettner.de
Thu Feb 12 13:20:48 CET 2015


Module: check_mk
Branch: master
Commit: 0f9915c7ed65154d0c7c5e31bda171dbc1b15396
URL:    http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0f9915c7ed65154d0c7c5e31bda171dbc1b15396

Author: Andreas Boesl <ab at mathias-kettner.de>
Date:   Thu Feb 12 13:20:06 2015 +0100

#1943 FIX inventory plugin win_os: no longer detects incorrect i386 architecture

The inventory plugin set the architecture to i386 whenever the field was empty
or the 64-Bit info was written in lowercase.

---

 .werks/1943      |   11 +++++++++++
 ChangeLog        |    1 +
 inventory/win_os |    9 +++++----
 3 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/.werks/1943 b/.werks/1943
new file mode 100644
index 0000000..6b2a3db
--- /dev/null
+++ b/.werks/1943
@@ -0,0 +1,11 @@
+Title: inventory plugin win_os: no longer detects incorrect i386 architecture
+Level: 1
+Component: inv
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1423743481
+
+The inventory plugin set the architecture to i386 whenever the field was empty
+or the 64-Bit info was written in lowercase.
diff --git a/ChangeLog b/ChangeLog
index d5e837f..011d8fe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -252,6 +252,7 @@
     * 1846 Keep track of changes of software and hardware...
     * 1855 esx_systeminfo: new inventory plugin to retrieve info about the host operating system for ESX servers
     * 1851 FIX: win_exefiles: inventory check can now handle time stamps in us english locale
+    * 1943 FIX: inventory plugin win_os: no longer detects incorrect i386 architecture...
 
 
 1.2.6b1:
diff --git a/inventory/win_os b/inventory/win_os
index e653609..9fc5f2c 100644
--- a/inventory/win_os
+++ b/inventory/win_os
@@ -34,10 +34,11 @@ def inv_win_os(info):
     if len(line) == 7:
         node["name"] = line[1]
         node["kernel_version"] = line[2]
-        if line[3] == "64-Bit":
-            node["arch"] = "x86_64"
-        else:
-            node["arch"] = "i386"
+        if line[3]:
+            if line[3].lower() == "64-bit":
+                node["arch"] = "x86_64"
+            else:
+                node["arch"] = "i386"
         node["service_pack"] = line[4]+"."+line[5]
         dat = re.sub("\+\d+","",line[6])
         tz = int(re.sub("\d{14}.\d{6}","",line[6]))



More information about the checkmk-commits mailing list