Module: check_mk
Branch: master
Commit: d2efac34a1a8ec44fb99ae5c4e4f2c12ef7a8ff4
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d2efac34a1a8ec…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Thu Nov 7 09:29:23 2013 +0100
memory_multiitem, cpu_utilization_multiitem: added Wato rules (from Andreas) with generic names (as agreed in team)
---
web/plugins/wato/check_parameters.py | 55 ++++++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index c19e5e3..3d66204 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -1941,6 +1941,36 @@ register_check_parameters(
register_check_parameters(
subgroup_os,
+ "memory_multiitem",
+ _("Mail memory usage of Devices with Modules"),
+ Dictionary(
+ help = _("The memory levels for the sub-module of this host, e.g. pluggable cards"),
+ elements = [
+ ("levels", Alternative(
+ title = _("Memory levels"),
+ elements = [
+ Tuple(
+ title = _("Specify levels in percentage of total RAM"),
+ elements = [
+ Percentage(title = _("Warning at a memory usage of"), default_value = 80.0, maxvalue = None),
+ Percentage(title = _("Critical at a memory usage of"), default_value = 90.0, maxvalue = None)]),
+ Tuple(
+ title = _("Specify levels in absolute usage values"),
+ elements = [
+ Filesize(title = _("Warning if above")),
+ Filesize(title = _("Critical if above"))]),
+ ])),
+ ],
+ optional_keys = []),
+ TextAscii(
+ title = _("Module name"),
+ allow_empty = False
+ ),
+ "match"
+)
+
+register_check_parameters(
+ subgroup_os,
"esx_host_memory",
_("Main memory usage of ESX host system"),
Tuple(
@@ -2116,6 +2146,31 @@ register_check_parameters(
register_check_parameters(
subgroup_os,
+ "cpu_utilization_multiitem",
+ _("CPU utilization of Devices with Modules"),
+ Dictionary(
+ help = _("The CPU utilization sums up the percentages of CPU time that is used "
+ "for user processes and kernel routines over all available cores within "
+ "the last check interval. The possible range is from 0% to 100%"),
+ elements = [
+ ("levels", Tuple(
+ title = _("Alert on too high CPU utilization"),
+ elements = [
+ Percentage(title = _("Warning at a utilization of")),
+ Percentage(title = _("Critical at a utilization of"))],
+ default_value = (90.0, 95.0)),
+ ),
+ ]
+ ),
+ TextAscii(
+ title = _("Module name"),
+ allow_empty = False
+ ),
+ None
+)
+
+register_check_parameters(
+ subgroup_os,
"cpu_utilization_os",
_("CPU utilization for Windows and ESX Hosts"),
Dictionary(
Module: check_mk
Branch: master
Commit: f6bef77bb2389a1f4f058179cf3eeff863f1504e
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f6bef77bb2389a…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Thu Nov 7 13:02:09 2013 +0100
Missing git add cause of werk...
---
checkman/apc_ats | 14 +++++++
checks/apc_ats_status | 99 +++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 113 insertions(+)
diff --git a/checkman/apc_ats b/checkman/apc_ats
new file mode 100644
index 0000000..0f640af
--- /dev/null
+++ b/checkman/apc_ats
@@ -0,0 +1,14 @@
+title: APC ATS ( Automatic Transfer Swichtes )
+agents: snmp
+catalog: hw/power
+license: GPL
+distribution: check_mk
+description:
+ Checks the status of APC Automatic Transfer Switch.
+ This means it throws {CRIT} if:
+ The power source has changed since last inventory,
+ the communication status gets lost,
+ the redundancy is lost,
+ the current ouput power exceeded the maximum limit for swiching to the alternate power source
+ or the 5V or 24V supply fails
+
diff --git a/checks/apc_ats_status b/checks/apc_ats_status
new file mode 100644
index 0000000..7681472
--- /dev/null
+++ b/checks/apc_ats_status
@@ -0,0 +1,99 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2013 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_apc_ats_status(info):
+ if len(info) == 1:
+ return [ (None, saveint(info[0][1]) ) ]
+ return []
+
+def check_apc_ats_status(_no_item, source, info):
+ comstatus, selected_source, redundancy, overcurrent, ps5, ps24 = map(saveint, info[0])
+ state = 0
+ messages = []
+
+ #current source of power
+ sources = { 1 : "A", 2 : "B" }
+ if source != selected_source:
+ state = 2
+ messages.append("Power source Changed from %s to %s(!!)" % \
+ (source[source], sources[selected_source]))
+ else:
+ messages.append("Power source %s selected" % sources[source])
+
+ #current communication status of the Automatic Transfer Switch.
+ if comstatus == 1:
+ state = max(1,state)
+ messages.append("Communication Status: never Discovered(!)")
+ elif comstatus == 3:
+ state = 2
+ messages.append("Communication Status: lost(!!)")
+
+ # current redundancy state of the ATS.
+ # Lost(1) indicates that the ATS is unable to switch over to the alternate power source
+ # if the current source fails. Redundant(2) indicates that the ATS will switch
+ # over to the alternate power source if the current source fails.
+ if redundancy != 2:
+ state = 2
+ messages.append("redundancy lost(!!)")
+ else:
+ messages.append("Device fully redundant")
+
+ # current state of the ATS. atsOverCurrent(1) indicates that the ATS has i
+ # exceeded the output current threshold and will not allow a switch
+ # over to the alternate power source if the current source fails.
+ # atsCurrentOK(2) indicates that the output current is below the output current threshold.
+ if overcurrent == 1:
+ state = 2
+ messages.append("exceedet ouput current threshold(!!)")
+
+ # 5Volt power supply
+ if ps5 != 2:
+ state = 2
+ messages.append("5V power supply failed(!!)")
+
+ # 24Volt power supply
+ if ps24 != 2:
+ state = 2
+ messages.append("24V power suppy failed(!!)")
+
+ return state, ", ".join(messages)
+
+check_info["apc_ats_status"] = {
+ "check_function" : check_apc_ats_status,
+ "inventory_function" : inventory_apc_ats_status,
+ "service_description" : "apc_ats_status",
+ "has_perfdata" : False,
+ "snmp_scan_function" : lambda oid: ".1.3.6.1.4.1.318.1.3.11" in oid(".1.3.6.1.2.1.1.2.0"),
+ "snmp_info" : ( ".1.3.6.1.4.1.318.1.1.8.5.1", [
+ "1.0", # atsStatusCommStatus
+ "2.0", # atsStatusSelectedSource
+ "3.0", # atsStatusRedundancyState
+ "4.0", # atsStatusOverCurrentState
+ "5.0", # atsStatus5VPowerSupply
+ "6.0", # atsStatus24VPowerSupply
+ ] ),
+}
+
Module: check_mk
Branch: master
Commit: 576461a1c9abadc1a2ecfd6eb0fc2c0cedc0ecba
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=576461a1c9abad…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Nov 7 10:46:47 2013 +0100
Updated bug entries #0945
---
.bugs/945 | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/.bugs/945 b/.bugs/945
new file mode 100644
index 0000000..605a6db
--- /dev/null
+++ b/.bugs/945
@@ -0,0 +1,10 @@
+Title: windows_agent: processing of eventlog messages is time consuming
+Component: checks
+State: open
+Date: 2013-11-07 10:42:10
+Targetversion: future
+Class: nastiness
+
+To resolve the text from an eventlog entry the windows agent opens
+the corresponding dll file and reads the text for the given event id.
+It seems that for each line the dll is opened again by LoadLibrary()