Module: check_mk
Branch: master
Commit: c1d8099229e056c3719afb8f085e4e7ac5bae200
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c1d8099229e056…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Feb 7 13:22:03 2017 +0100
4021 windows agent: improved error message in logfile when a specified winperf counter id
could not get resolved
Change-Id: Ib559beebffa12a425c4391d8afcf3a9ee325749f
---
.werks/4021 | 9 +++++++++
ChangeLog | 1 +
agents/windows/PerfCounter.cc | 6 +++++-
agents/windows/build_version | 2 +-
agents/windows/check_mk_agent-64.exe | Bin 1328640 -> 1329152 bytes
agents/windows/check_mk_agent-64.unstripped.exe | Bin 15652368 -> 15658018 bytes
agents/windows/check_mk_agent-64.unversioned.exe | Bin 1328640 -> 1329152 bytes
agents/windows/check_mk_agent.exe | Bin 1305088 -> 1305600 bytes
agents/windows/check_mk_agent.msi | Bin 2903552 -> 2904576 bytes
agents/windows/check_mk_agent.unstripped.exe | Bin 13543976 -> 13549114 bytes
agents/windows/check_mk_agent.unversioned.exe | Bin 1305088 -> 1305600 bytes
agents/windows/install_agent-64.exe | Bin 586639 -> 586830 bytes
agents/windows/install_agent.exe | Bin 583691 -> 583901 bytes
13 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/.werks/4021 b/.werks/4021
new file mode 100644
index 0000000..6d481d3
--- /dev/null
+++ b/.werks/4021
@@ -0,0 +1,9 @@
+Title: windows agent: improved error message in logfile when a specified winperf counter
id could not get resolved
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.4.0i4
+Date: 1486470085
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index fb9d39f..6615622 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -26,6 +26,7 @@
* 4336 diskstat: now detects NVMe drives, eg. solid-state drives
* 4019 Windows powershell scripts are now always called with the options -noprofile
-executionpolicy bypass...
* 4020 windows/megaraid.bat: now also provides information for the megaraid_bbu check
(Battery Backup Unit)
+ * 4021 windows agent: improved error message in logfile when a specified winperf
counter id could not get resolved
* 4171 FIX: perle_psmu: fixed value error...
* 4172 FIX: smart.temp: fixed discovery and check function...
* 4173 FIX: if.include: ignore some more keys in 'Network interfaces and switch
ports' rule which are only used for interface grouping
diff --git a/agents/windows/PerfCounter.cc b/agents/windows/PerfCounter.cc
index 3eb3a50..398c244 100644
--- a/agents/windows/PerfCounter.cc
+++ b/agents/windows/PerfCounter.cc
@@ -205,8 +205,12 @@ PerfCounterObject::PerfCounterObject(unsigned int
counter_base_number)
_buffer = retrieveCounterData(std::to_wstring(counter_base_number).c_str());
_object = findObject(counter_base_number);
+
+ std::ostringstream stringStream;
+ stringStream << "counter id not found: " <<
counter_base_number;
+
if (_object == NULL) {
- throw std::runtime_error("counter id not found");
+ throw std::runtime_error(stringStream.str());
}
if (_object->NumInstances <= 0) {
diff --git a/agents/windows/build_version b/agents/windows/build_version
index 6357d64..166c7ce 100644
--- a/agents/windows/build_version
+++ b/agents/windows/build_version
@@ -1 +1 @@
-2522
+2539
diff --git a/agents/windows/check_mk_agent-64.exe b/agents/windows/check_mk_agent-64.exe
index aadbe3e..adb5363 100755
Binary files a/agents/windows/check_mk_agent-64.exe and
b/agents/windows/check_mk_agent-64.exe differ
diff --git a/agents/windows/check_mk_agent-64.unstripped.exe
b/agents/windows/check_mk_agent-64.unstripped.exe
index fead502..f1b99ec 100755
Binary files a/agents/windows/check_mk_agent-64.unstripped.exe and
b/agents/windows/check_mk_agent-64.unstripped.exe differ
diff --git a/agents/windows/check_mk_agent-64.unversioned.exe
b/agents/windows/check_mk_agent-64.unversioned.exe
index 599cfa7..881e4a6 100755
Binary files a/agents/windows/check_mk_agent-64.unversioned.exe and
b/agents/windows/check_mk_agent-64.unversioned.exe differ
diff --git a/agents/windows/check_mk_agent.exe b/agents/windows/check_mk_agent.exe
index bb27778..2aab3ac 100755
Binary files a/agents/windows/check_mk_agent.exe and b/agents/windows/check_mk_agent.exe
differ
diff --git a/agents/windows/check_mk_agent.msi b/agents/windows/check_mk_agent.msi
index 8cb6c97..7f9de40 100755
Binary files a/agents/windows/check_mk_agent.msi and b/agents/windows/check_mk_agent.msi
differ
diff --git a/agents/windows/check_mk_agent.unstripped.exe
b/agents/windows/check_mk_agent.unstripped.exe
index 6a56d88..27c88b2 100755
Binary files a/agents/windows/check_mk_agent.unstripped.exe and
b/agents/windows/check_mk_agent.unstripped.exe differ
diff --git a/agents/windows/check_mk_agent.unversioned.exe
b/agents/windows/check_mk_agent.unversioned.exe
index 3c80bab..5ffebcf 100755
Binary files a/agents/windows/check_mk_agent.unversioned.exe and
b/agents/windows/check_mk_agent.unversioned.exe differ
diff --git a/agents/windows/install_agent-64.exe b/agents/windows/install_agent-64.exe
index 44c648b..a5a7431 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 714e77f..b551fe0 100755
Binary files a/agents/windows/install_agent.exe and b/agents/windows/install_agent.exe
differ