Module: check_mk
Branch: master
Commit: 6770c21e2d30a50775b7f92dfd03241a9ee84f77
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6770c21e2d30a5…
Author: Marcel Schulte <ms(a)mathias-kettner.de>
Date: Thu Mar 16 12:25:54 2017 +0100
8669 win_video: now inventorizes memory of graphic cards for Windows hosts
Memory of graphic cards is now gathered and shown in HW/SW inventory views of Windows
hosts.
Change-Id: I49d66acbe0a4901839a6161e7cf184d6f8a45cf5
---
.werks/8669 | 12 ++++++++++++
agents/windows/plugins/mk_inventory.vbs | 2 +-
inventory/win_video | 3 +++
web/plugins/views/inventory.py | 1 +
4 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/.werks/8669 b/.werks/8669
new file mode 100644
index 0000000..bd7b94f
--- /dev/null
+++ b/.werks/8669
@@ -0,0 +1,12 @@
+Title: win_video: now inventorizes memory of graphic cards for Windows hosts
+Level: 1
+Component: inv
+Class: feature
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1489663402
+
+Memory of graphic cards is now gathered and shown in HW/SW inventory views of Windows
hosts.
+
diff --git a/agents/windows/plugins/mk_inventory.vbs
b/agents/windows/plugins/mk_inventory.vbs
index b5623c1..6b5b7cc 100644
--- a/agents/windows/plugins/mk_inventory.vbs
+++ b/agents/windows/plugins/mk_inventory.vbs
@@ -255,7 +255,7 @@ Call getWMIObject("Win32_diskDrive",diskVars)
' Graphics Adapter
Call startSection("win_video",58,timeUntil)
-adapterVars = Array( "Name", "Description", "Caption",
"AdapterCompatibility", "VideoModeDescription",
"VideoProcessor", "DriverVersion", "DriverDate",
"MaxMemorySupported")
+adapterVars = Array( "Name", "Description", "Caption",
"AdapterCompatibility", "VideoModeDescription",
"VideoProcessor", "DriverVersion", "DriverDate",
"MaxMemorySupported", "AdapterRAM")
Call getWMIObject("Win32_VideoController",adapterVars)
' Network Adapter
diff --git a/inventory/win_video b/inventory/win_video
index 8733530..e56ed96 100644
--- a/inventory/win_video
+++ b/inventory/win_video
@@ -61,6 +61,9 @@ def inv_win_video(info):
array["driver_version"] = value
elif varname == "DriverDate":
array["driver_date"] =
int(time.mktime(time.strptime(value.split(".")[0], "%Y%m%d%H%M%S")))
+ elif varname == "AdapterRAM":
+ array["graphic_memory"] = saveint(value)
+
node.append(array)
diff --git a/web/plugins/views/inventory.py b/web/plugins/views/inventory.py
index cb95f9f..55bed31 100644
--- a/web/plugins/views/inventory.py
+++ b/web/plugins/views/inventory.py
@@ -703,6 +703,7 @@ inventory_displayhints.update({
".hardware.video:*.driver" : { "title" :
_("Driver"), "short" : _("Driver") },
".hardware.video:*.driver_date" : { "title" :
_("Driver Date"), "short" : _("Driver Date") },
".hardware.video:*.driver_version" : { "title" :
_("Driver Version"), "short" : _("Driver Version") },
+ ".hardware.video:*.graphic_memory" : { "title" :
_("Memory"), "paint" : "bytes_rounded" },
".hardware.nwadapter:" : { "title" :
_("Network Adapters"), },
".hardware.nwadapter:*." : { "title" :
_("Network Adapter %d"), },