Module: check_mk
Branch: master
Commit: b89af681c90e01e852f172482b407a86317f7d22
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b89af681c90e01…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Wed Dec 21 10:49:01 2016 +0100
4007 Windows Agent: Reduced number of needless WMI Queries when Skype performance counters
are missing
The windows agent now skips the processing of the skype section earlier, if the
performancecounters are not available. This presumably fixes an error where the windows
agents hangs in a followup WMI query.
Change-Id: Ia8a0b8e16e4db1152f725b6f2e77e00b3bafcd72
---
.werks/4007 | 11 +++++++++++
ChangeLog | 1 +
agents/windows/build_version | 2 +-
agents/windows/check_mk_agent-64.exe | Bin 1326592 -> 1327104 bytes
agents/windows/check_mk_agent-64.unstripped.exe | Bin 15505551 -> 15506632 bytes
agents/windows/check_mk_agent-64.unversioned.exe | Bin 1326592 -> 1327104 bytes
agents/windows/check_mk_agent.exe | Bin 1302528 -> 1302528 bytes
agents/windows/check_mk_agent.msi | Bin 2898944 -> 2899456 bytes
agents/windows/check_mk_agent.unstripped.exe | Bin 13405932 -> 13407014 bytes
agents/windows/check_mk_agent.unversioned.exe | Bin 1302528 -> 1302528 bytes
agents/windows/crash.exe | Bin 101624 -> 101624 bytes
agents/windows/install_agent-64.exe | Bin 585677 -> 585703 bytes
agents/windows/install_agent.exe | Bin 582548 -> 582532 bytes
agents/windows/nowin.exe | Bin 103760 -> 103760 bytes
agents/windows/sections/SectionGroup.cc | 10 ++++++++++
agents/windows/sections/SectionGroup.h | 2 ++
agents/windows/sections/SectionSkype.cc | 1 +
17 files changed, 26 insertions(+), 1 deletion(-)
diff --git a/.werks/4007 b/.werks/4007
new file mode 100644
index 0000000..38ec8d2
--- /dev/null
+++ b/.werks/4007
@@ -0,0 +1,11 @@
+Title: Windows Agent: Reduced number of needless WMI Queries when Skype performance
counters are missing
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.4.0i4
+Date: 1482313422
+Class: feature
+
+The windows agent now skips the processing of the skype section earlier, if the
+performancecounters are not available. This presumably fixes an error where the windows
+agents hangs in a followup WMI query.
diff --git a/ChangeLog b/ChangeLog
index 16a32c0..7130923 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,7 @@
* 4005 agent_activemq: now able to provide BasicAuth credentials...
NOTE: Please refer to the migration notes!
* 4201 mkeventd_status: avoid duplicate averaging, make graphs more precise in time
resolution...
+ * 4007 Windows Agent: Reduced number of needless WMI Queries when Skype performance
counters are missing...
* 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/build_version b/agents/windows/build_version
index 811f4e3..76c0db3 100644
--- a/agents/windows/build_version
+++ b/agents/windows/build_version
@@ -1 +1 @@
-2193
+2196
diff --git a/agents/windows/check_mk_agent-64.exe b/agents/windows/check_mk_agent-64.exe
index 87ba09f..a3c6a22 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 7fc7774..af25adc 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 27ec82b..6319119 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 ad56930..aefa0e4 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 7f4969a..f573f80 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 7fd04ea..78d6e4c 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 9526051..0e9744c 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/crash.exe b/agents/windows/crash.exe
index 4e83695..5d2ffdc 100755
Binary files a/agents/windows/crash.exe and b/agents/windows/crash.exe differ
diff --git a/agents/windows/install_agent-64.exe b/agents/windows/install_agent-64.exe
index 60cc69f..61adf30 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 7a8cca9..84f75ea 100755
Binary files a/agents/windows/install_agent.exe and b/agents/windows/install_agent.exe
differ
diff --git a/agents/windows/nowin.exe b/agents/windows/nowin.exe
index 3deb1b4..d4d8e4b 100755
Binary files a/agents/windows/nowin.exe and b/agents/windows/nowin.exe differ
diff --git a/agents/windows/sections/SectionGroup.cc
b/agents/windows/sections/SectionGroup.cc
index 1e25d61..48bde73 100644
--- a/agents/windows/sections/SectionGroup.cc
+++ b/agents/windows/sections/SectionGroup.cc
@@ -48,6 +48,12 @@ SectionGroup *SectionGroup::withToggleIfMissing()
return this;
}
+SectionGroup *SectionGroup::withFailIfMissing()
+{
+ _fail_if_missing = true;
+ return this;
+}
+
SectionGroup *SectionGroup::withNestedSubtables()
{
withHiddenHeader(false);
@@ -68,6 +74,10 @@ bool SectionGroup::produceOutputInner(std::ostream &out,
if (table->produceOutput(out, env, _nested)) {
all_failed = false;
}
+ else if (_fail_if_missing) {
+ all_failed = true;
+ break;
+ }
}
if (!all_failed) {
diff --git a/agents/windows/sections/SectionGroup.h
b/agents/windows/sections/SectionGroup.h
index 139cbbb..932961a 100644
--- a/agents/windows/sections/SectionGroup.h
+++ b/agents/windows/sections/SectionGroup.h
@@ -42,6 +42,7 @@ class SectionGroup : public Section {
std::vector<std::unique_ptr<Section>> _subsections;
std::vector<std::unique_ptr<Section>> _dependent_subsections;
bool _toggle_if_missing{false};
+ bool _fail_if_missing{false};
bool _nested{false};
time_t _disabled_until{0};
@@ -61,6 +62,7 @@ public:
**/
SectionGroup *withDependentSubSection(Section *section);
SectionGroup *withToggleIfMissing();
+ SectionGroup *withFailIfMissing();
protected:
virtual bool produceOutputInner(std::ostream &out,
diff --git a/agents/windows/sections/SectionSkype.cc
b/agents/windows/sections/SectionSkype.cc
index a9cacd2..f1e0f00 100644
--- a/agents/windows/sections/SectionSkype.cc
+++ b/agents/windows/sections/SectionSkype.cc
@@ -27,6 +27,7 @@
SectionSkype::SectionSkype() : SectionGroup("skype") {
withToggleIfMissing();
+ withFailIfMissing();
withNestedSubtables();
withSeparator(',');