Module: check_mk
Branch: master
Commit: 67604cec40e3d48a43196559432162e7813d3b09
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=67604cec40e3d4…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Mon May 15 13:15:17 2017 +0200
4660 FIX win_os: Fixed wrong OS information if eg. ESX is installed on Windows host
Change-Id: I716e4611eee174786c1ab80ccff5fd76faa8f4ad
---
.werks/4660 | 11 +++++++++++
inventory/win_os | 6 ++++++
2 files changed, 17 insertions(+)
diff --git a/.werks/4660 b/.werks/4660
new file mode 100644
index 0000000..5345fa8
--- /dev/null
+++ b/.werks/4660
@@ -0,0 +1,11 @@
+Title: win_os: Fixed wrong OS information if eg. ESX is installed on Windows host
+Level: 1
+Component: inv
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1494846640
+
+
diff --git a/inventory/win_os b/inventory/win_os
index 58d98b2..b9631ed 100644
--- a/inventory/win_os
+++ b/inventory/win_os
@@ -31,6 +31,12 @@
def inv_win_os(info):
node = inv_tree("software.os.")
+ # Some information come eg. from esx and we delete these
+ # because basic os is windows
+ for what in ["vendor", "name", "version",
"type", "arch"]:
+ if what in node:
+ del node[what]
+
node["type"] = "Windows"
node["vendor"] = "Microsoft"