Module: check_mk
Branch: master
Commit: 2dcbdded040c99d989bf0eddc11a087de0a7d331
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2dcbdded040c99…
Author: Sebastian Herbord <sh(a)mathias-kettner.de>
Date: Thu Jun 30 14:20:09 2016 +0200
3151 FIX windows agent: further fix to crashes on failures to query wmi
---
.werks/3151 | 10 ++++++++++
ChangeLog | 1 +
agents/windows/check_mk_agent.cc | 8 +++++++-
agents/windows/check_mk_agent.msi | Bin 2779136 -> 248320 bytes
agents/windows/install_agent-64.exe | Bin 567138 -> 567132 bytes
agents/windows/install_agent.exe | Bin 560942 -> 560935 bytes
6 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/.werks/3151 b/.werks/3151
new file mode 100644
index 0000000..5d5628b
--- /dev/null
+++ b/.werks/3151
@@ -0,0 +1,10 @@
+Title: windows agent: further fix to crashes on failures to query wmi
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.4.0i1
+Date: 1467289042
+
+
diff --git a/ChangeLog b/ChangeLog
index 1513450..25b0939 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -290,6 +290,7 @@
* 3685 FIX: brocade_fcport: fixed unknown state texts
* 3686 FIX: hp_proliant_temp: fixed wrong device thresholds handling. If no
thresholds available the device reports -99
* 3150 FIX: fixed helpers failing to start and high cpu load when an unparsable local
check is installed...
+ * 3151 FIX: windows agent: further fix to crashes on failures to query wmi
Multisite:
* 3187 notification view: new filter for log command via regex
diff --git a/agents/windows/check_mk_agent.cc b/agents/windows/check_mk_agent.cc
index 3e9de18..980db65 100644
--- a/agents/windows/check_mk_agent.cc
+++ b/agents/windows/check_mk_agent.cc
@@ -1556,7 +1556,13 @@ void dump_wmi_table(OutputProxy &out, wmi::Result &result)
{
bool output_wmi_table(OutputProxy &out, const wchar_t *table_name,
const char *section_name, bool as_subtable = false) {
- wmi::Result result = WMILookup::get().getClass(table_name);
+ wmi::Result result;
+ try {
+ result = WMILookup::get().getClass(table_name);
+ } catch (const wmi::ComException &e) {
+ crash_log("wmi request for %ls failed: %s", table_name, e.what());
+ return true;
+ }
if (!result.valid()) {
crash_log("table %ls is empty or doesn't exist", table_name);
diff --git a/agents/windows/check_mk_agent.msi b/agents/windows/check_mk_agent.msi
index 15a3f15..1f309af 100755
Binary files a/agents/windows/check_mk_agent.msi and b/agents/windows/check_mk_agent.msi
differ
diff --git a/agents/windows/install_agent-64.exe b/agents/windows/install_agent-64.exe
index 6a9eb78..13db09e 100755
Binary files a/agents/windows/install_agent-64.exe and
b/agents/windows/install_agent-64.exe differ
diff --git a/agents/windows/install_agent.exe b/agents/windows/install_agent.exe
index 6f40bfa..2b48325 100755
Binary files a/agents/windows/install_agent.exe and b/agents/windows/install_agent.exe
differ