Module: check_mk
Branch: master
Commit: 85cc44ee1cf8723861329be38c216f7b309cfd94
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=85cc44ee1cf872…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Thu Apr 25 15:16:54 2019 +0200
7456 FIX dotnet_clrmemory: Fixed crash caused by WMI timeout
During discovery WMI timeouts should not be raised.
Change-Id: I9d7e3d1f655e692f18225b4bdab732f58b795db1
---
.werks/7456 | 11 +++++++++++
checks/wmi.include | 8 +++++---
2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/.werks/7456 b/.werks/7456
new file mode 100644
index 0000000..d03e20a
--- /dev/null
+++ b/.werks/7456
@@ -0,0 +1,11 @@
+Title: dotnet_clrmemory: Fixed crash caused by WMI timeout
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1556198161
+
+During discovery WMI timeouts should not be raised.
diff --git a/checks/wmi.include b/checks/wmi.include
index c0b4606..59f6c35 100644
--- a/checks/wmi.include
+++ b/checks/wmi.include
@@ -147,8 +147,8 @@ class WMITable(object):
if wmi_status.lower() == "timeout":
self.timed_out = True
- def get(self, row, column):
- if self.timed_out:
+ def get(self, row, column, silently_skip_timed_out=False):
+ if not silently_skip_timed_out and self.timed_out:
raise MKCounterWrapped('WMI query timed out')
return self._get_row_col_value(row, column)
@@ -294,7 +294,9 @@ def _prepare_wmi_table(parsed, tablename, line, key, timestamp,
frequency):
def wmi_filter_global_only(tables, row):
- return all(table.get(row, "Name") == "_Global_" for table in
tables.values())
+ return all(
+ table.get(row, "Name", silently_skip_timed_out=True) ==
"_Global_"
+ for table in tables.values())
#.