Module: check_mk
Branch: master
Commit: 0946a6602f9f825c9958c91f9e5a9a40415b73ff
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0946a6602f9f82…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Apr 14 14:48:32 2011 +0200
Removed obsolete winperf_system
---
agents/windows/check_mk.ini | 6 +-
agents/windows/check_mk_agent.cc | 1 -
checkman/winperf_system.diskio | 26 ----------
checks/winperf_system | 64 --------------------------
pnp-rraconf/check_mk-winperf_phydisk.rra.cfg | 1 +
5 files changed, 4 insertions(+), 94 deletions(-)
diff --git a/agents/windows/check_mk.ini b/agents/windows/check_mk.ini
index e9e16c1..e17edab 100644
--- a/agents/windows/check_mk.ini
+++ b/agents/windows/check_mk.ini
@@ -3,6 +3,6 @@
# only_from = 127.0.0.1 192.168.56.0/24
[winperf]
- # Select counters to extract
- counters = 2:system 238:processor 11838:msx_owa 12042:msx_async 10332:msx_queues 234:phydisk
- # 230:process
+ # Select counters to extract. The following counters
+ # are needed by checks shipped with check_mk.
+ counters = 238:processor 234:phydisk 11838:msx_owa 12042:msx_async 10332:msx_queues
diff --git a/agents/windows/check_mk_agent.cc b/agents/windows/check_mk_agent.cc
index 4e766d2..507613a 100755
--- a/agents/windows/check_mk_agent.cc
+++ b/agents/windows/check_mk_agent.cc
@@ -919,7 +919,6 @@ 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, 2, "system");
dump_performance_counters(out, 234, "phydisk");
dump_performance_counters(out, 238, "processor");
dump_performance_counters(out, 11838, "msx_owa");
diff --git a/checkman/winperf_system.diskio b/checkman/winperf_system.diskio
deleted file mode 100644
index 3032d34..0000000
--- a/checkman/winperf_system.diskio
+++ /dev/null
@@ -1,26 +0,0 @@
-title: Measure Disk IO on Windows systems
-agents: windows
-author: Mathias Kettner <mk(a)mathias-kettner.de>
-license: GPL
-distribution: check_mk
-description:
- This check monitors the summarized disk IO on a Windows system
- using the windows performance counters (agent section {<<<winperf_system>>>}).
-
- The current implementation does not allow to set levels, and the check
- is thus always OK. The reason is, that currently only data of the
- last check cycle is available for measurement. In order to define
- useful levels an average over a longer period of time would be needed.
- A future implementation might change this.
-
- This check replaces the old check {winperf.diskstat} and is compatible
- with the new agent version {1.1.11i1}.
-
-perfdata:
- Two variables: the averaged disk throughput summed up over all disks,
- for read and for write access.
-
-inventory:
- A check of this type is automatically created for all Windows
- hosts.
-
diff --git a/checks/winperf_system b/checks/winperf_system
deleted file mode 100644
index 7c7db56..0000000
--- a/checks/winperf_system
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/python
-# -*- encoding: utf-8; py-indent-offset: 4 -*-
-# +------------------------------------------------------------------+
-# | ____ _ _ __ __ _ __ |
-# | / ___| |__ ___ ___| | __ | \/ | |/ / |
-# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
-# | | |___| | | | __/ (__| < | | | | . \ |
-# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
-# | |
-# | Copyright Mathias Kettner 2010 mk(a)mathias-kettner.de |
-# +------------------------------------------------------------------+
-#
-# This file is part of Check_MK.
-# The official homepage is at http://mathias-kettner.de/check_mk.
-#
-# check_mk is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation in version 2. check_mk is distributed
-# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
-# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE. See the GNU General Public License for more de-
-# ails. You should have received a copy of the GNU General Public
-# License along with GNU Make; see the file COPYING. If not, write
-# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
-# Boston, MA 02110-1301 USA.
-
-
-def inventory_win_diskstat(checkname, info):
- for line in info[1:]:
- try:
- if line[0] == '16' or line[0] == '18':
- return [(None, None)]
- except:
- pass
-
-
-def check_win_diskstat(item, params, info):
- this_time = int(float(info[0][0]))
- read_bytes_ctr = 0
- write_bytes_ctr = 0
- for line in info[1:]:
- if line[0] == '16':
- read_bytes_ctr = int(line[1])
- elif line[0] == '18':
- write_bytes_ctr = int(line[1])
- break
- try:
- read_timedif, read_per_sec = \
- get_counter("winperf_system.diskio.read", this_time, read_bytes_ctr)
- write_timedif, write_per_sec = \
- get_counter("winperf_system.diskio.write", this_time, write_bytes_ctr)
-
- except MKCounterWrapped, e:
- # make sure that inital check does not need three cycles for all counters
- # to be initialized
- get_counter("winperf_system.diskio.write", this_time, write_bytes_ctr)
- raise e
-
- perfdata = [ ("read", "%dc" % read_bytes_ctr),
- ("write", "%dc" % write_bytes_ctr) ]
- return (0, "OK - reading %.1f MB/s, writing %.1f MB/s (in last %d secs)" %
- (read_per_sec / 1048576, write_per_sec / 1048576, read_timedif), perfdata)
-
-check_info['winperf_system.diskio'] = (check_win_diskstat, "Disk IO SUMMARY", 1, inventory_win_diskstat)
diff --git a/pnp-rraconf/check_mk-winperf_phydisk.rra.cfg b/pnp-rraconf/check_mk-winperf_phydisk.rra.cfg
new file mode 120000
index 0000000..15fd63d
--- /dev/null
+++ b/pnp-rraconf/check_mk-winperf_phydisk.rra.cfg
@@ -0,0 +1 @@
+check_mk-diskstat.rra.cfg
\ No newline at end of file