Module: check_mk
Branch: master
Commit: 610e0443cc8f62d5fdba629988f498b70d375de9
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=610e0443cc8f62…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Apr 14 16:23:57 2011 +0200
Windows agent: always output system counters
---
agents/windows/check_mk.ini | 3 +--
agents/windows/check_mk_agent.cc | 21 ++++++++++-----------
agents/windows/check_mk_agent.exe | Bin 96768 -> 96768 bytes
3 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/agents/windows/check_mk.ini b/agents/windows/check_mk.ini
index 4ea6924..97691eb 100644
--- a/agents/windows/check_mk.ini
+++ b/agents/windows/check_mk.ini
@@ -5,5 +5,4 @@
[winperf]
# Select counters to extract. The following counters
# are needed by checks shipped with check_mk.
- # 11838:msx_owa 12042:msx_async 10332:msx_queues
- counters = 238:processor 234:phydisk
+ # counters = 10332:msx_queues
diff --git a/agents/windows/check_mk_agent.cc b/agents/windows/check_mk_agent.cc
index a635168..0fec8e6 100755
--- a/agents/windows/check_mk_agent.cc
+++ b/agents/windows/check_mk_agent.cc
@@ -917,17 +917,12 @@ void section_mem(SOCKET &out)
void section_winperf(SOCKET &out)
{
- // no counters configured in check_mk.ini => output all below 700 except some
- if (g_num_winperf_counters == 0) {
- dump_performance_counters(out, 234, "phydisk");
- dump_performance_counters(out, 238, "processor");
- }
+ dump_performance_counters(out, 234, "phydisk");
+ dump_performance_counters(out, 238, "processor");
- // output configured counters
- else {
- for (unsigned i=0; i<g_num_winperf_counters; i++)
- dump_performance_counters(out, g_winperf_counters[i].id,
g_winperf_counters[i].name);
- }
+ // also output additionally configured counters
+ for (unsigned i=0; i<g_num_winperf_counters; i++)
+ dump_performance_counters(out, g_winperf_counters[i].id,
g_winperf_counters[i].name);
}
@@ -1576,7 +1571,11 @@ char *next_word(char **line)
s++;
*s = 0;
*line = s + 1;
- return value;
+ rstrip(value);
+ if (strlen(value) > 0)
+ return value;
+ else
+ return 0;
}
return 0;
}
diff --git a/agents/windows/check_mk_agent.exe b/agents/windows/check_mk_agent.exe
index ec7c0f7..89afa3d 100755
Binary files a/agents/windows/check_mk_agent.exe and b/agents/windows/check_mk_agent.exe
differ