Module: check_mk
Branch: master
Commit: f42af2f9860b20a471bfb87b464d100085578b9b
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f42af2f9860b20…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu May 11 11:35:06 2017 +0200
4676 win_os: Added type/vendor information
Change-Id: Ic33b5a6e211d6ca47d7be6ed2a7188b264645de4
---
.werks/4676 | 10 ++++++++++
inventory/win_os | 8 ++++++++
2 files changed, 18 insertions(+)
diff --git a/.werks/4676 b/.werks/4676
new file mode 100644
index 0000000..8664dcd
--- /dev/null
+++ b/.werks/4676
@@ -0,0 +1,10 @@
+Title: win_os: Added type/vendor information
+Level: 1
+Component: inv
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1494495291
+Class: feature
+
+
diff --git a/inventory/win_os b/inventory/win_os
index 4c50210..58d98b2 100644
--- a/inventory/win_os
+++ b/inventory/win_os
@@ -30,15 +30,22 @@
def inv_win_os(info):
node = inv_tree("software.os.")
+
+ node["type"] = "Windows"
+ node["vendor"] = "Microsoft"
+
line = info[0]
if len(line) == 7:
node["name"] = line[1]
+
node["kernel_version"] = line[2]
+
if line[3]:
if line[3].lower() == "64-bit":
node["arch"] = "x86_64"
else:
node["arch"] = "i386"
+
node["service_pack"] = line[4]+"."+line[5]
if '+' in line[6]:
@@ -49,6 +56,7 @@ def inv_win_os(info):
tz = int(tz)*-1
else:
datestr, tz = line[6], 0
+
node["install_date"] = int(time.mktime(time.strptime(datestr,
"%Y%m%d%H%M%S.%f"))) - tz*60