Module: check_mk
Branch: master
Commit: 15494ef09b45781a804bdee9ca4bc6afb2954f9f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=15494ef09b4578…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Mon May 15 18:35:35 2017 +0200
4661 msexch_isstore, msexch_isclienttype: Split up check files. Second one needs its own
check plugin file if using Nagios core
Change-Id: I03e8b9000592785b41efa9142329b83d47c00a62
---
.werks/4661 | 12 ++++++++
checks/msexch_isclienttype | 68 ++++++++++++++++++++++++++++++++++++++++++++++
checks/msexch_isstore | 23 ----------------
3 files changed, 80 insertions(+), 23 deletions(-)
diff --git a/.werks/4661 b/.werks/4661
new file mode 100644
index 0000000..f32c456
--- /dev/null
+++ b/.werks/4661
@@ -0,0 +1,12 @@
+Title: msexch_isstore, msexch_isclienttype: Split up check files. Second one needs its
own check plugin file if using Nagios core
+Level: 1
+Component: checks
+Class: fix
+Compatible: incomp
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1494865578
+
+This incompatible change relates only to Check_MK installations using
+Nagios core. In this case please perform a re-discovery on affected hosts.
diff --git a/checks/msexch_isclienttype b/checks/msexch_isclienttype
new file mode 100644
index 0000000..96d7d39
--- /dev/null
+++ b/checks/msexch_isclienttype
@@ -0,0 +1,68 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2015 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-
+# tails. 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.
+
+
+# checks for is store and is clienttype
+# as I understand it, these are logically related but the performance
+# counters are completely separate
+
+
+# source for these defaults:
+#
https://blogs.technet.microsoft.com/samdrey/2015/01/26/exchange-2013-perfor…
+factory_settings['msexch_isclienttype_defaultlevels'] = {
+ 'store_latency': {
+ 'upper': (40.0, 50.0)
+ },
+ 'clienttype_latency': {
+ 'upper': (40.0, 50.0)
+ },
+ 'clienttype_requests': {
+ 'upper': (60, 70)
+ }
+}
+
+
+def check_msexch_isclienttype(item, params, parsed):
+ yield wmi_yield_raw_average(parsed, item, "RPCAverageLatency",
+ label="ms average latency",
+ perfvar="average_latency",
+ levels=params['clienttype_latency'])
+ yield wmi_yield_raw_persec(parsed, item, "RPCRequests",
+ label=" RPC Requests",
+ perfvar="requests_per_sec",
+ levels=params['clienttype_requests'])
+
+
+check_info['msexch_isclienttype'] = {
+ 'inventory_function' : inventory_wmi_table,
+ 'check_function' : check_msexch_isclienttype,
+ 'parse_function' : parse_wmi_table,
+ 'has_perfdata' : True,
+ 'service_description' : "Exchange IS Client Type %s",
+ 'includes' : ['wmi.include'],
+ 'group' : 'msx_info_store',
+ 'default_levels_variable' : 'msexch_isclienttype_defaultlevels'
+}
diff --git a/checks/msexch_isstore b/checks/msexch_isstore
index 123e200..385ea76 100644
--- a/checks/msexch_isstore
+++ b/checks/msexch_isstore
@@ -62,26 +62,3 @@ check_info['msexch_isstore'] = {
'group' : 'msx_info_store',
'default_levels_variable' : 'msexch_info_store_defaultlevels'
}
-
-
-def check_msexch_isclienttype(item, params, parsed):
- yield wmi_yield_raw_average(parsed, item, "RPCAverageLatency",
- label="ms average latency",
- perfvar="average_latency",
- levels=params['clienttype_latency'])
- yield wmi_yield_raw_persec(parsed, item, "RPCRequests",
- label=" RPC Requests",
- perfvar="requests_per_sec",
- levels=params['clienttype_requests'])
-
-
-check_info['msexch_isclienttype'] = {
- 'inventory_function' : inventory_wmi_table,
- 'check_function' : check_msexch_isclienttype,
- 'parse_function' : parse_wmi_table,
- 'has_perfdata' : True,
- 'service_description' : "Exchange IS Client Type %s",
- 'includes' : ['wmi.include'],
- 'group' : 'msx_info_store',
- 'default_levels_variable' : 'msexch_info_store_defaultlevels'
-}