Module: check_mk
Branch: master
Commit: 890b9b0c48b12d765fe0282c65dd51398a9fc101
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=890b9b0c48b12d…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed May 21 10:29:54 2014 +0200
Fixed syntax error in manpage of esx_vsphere_vm.guest_tools
---
checkman/esx_vsphere_vm.guest_tools | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/checkman/esx_vsphere_vm.guest_tools b/checkman/esx_vsphere_vm.guest_tools
index ddebdde..a29969a 100644
--- a/checkman/esx_vsphere_vm.guest_tools
+++ b/checkman/esx_vsphere_vm.guest_tools
@@ -21,9 +21,8 @@ inventory:
On each VM one check is generated.
[parameters]
-parameters (dict): A dictionary with the following keys
-{"guestToolsUnmanaged"}: 1 # default WARN
-{"guestToolsNeedUpgrade"} 1 # default WARN
-{"guestToolsCurrent"}: 0 # default OK
-{"guestToolsNotInstalled"}: 2 # default CRIT
+parameters (dict): A dictionary with the following keys, that define the state of the check in
+ the various possible error conditions. Use {0} for OK, {1} for WARN, {2} for CRIT and {3} for
+ UNKNOWN. The default settings are: {"guestToolsUnmanaged"}: 1, {"guestToolsNeedUpgrade"}: 1,
+ {"guestToolsCurrent"}: 0, {"guestToolsNotInstalled"}: 2
Module: check_mk
Branch: master
Commit: d7f2e41014ad2bc10739d1d0f71a2104a01d3791
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d7f2e41014ad2b…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Wed May 21 10:28:56 2014 +0200
fast_lta_silent_cubes.capacity: New check for Total Capacity over all Silent Cubes on FAST LTA Storage Systems
---
.werks/957 | 8 +++
ChangeLog | 1 +
checkman/fast_lta_silent_cubes.capacity | 35 +++++++++++++
checks/fast_lta_silent_cubes | 55 ++++++++++++++++++++
.../check_mk-fast_lta_silent_cubes.capacity.php | 1 +
pnp-templates/check_mk-hitachi_hnas_span.php | 26 +++++++++
web/plugins/perfometer/check_mk.py | 1 +
7 files changed, 127 insertions(+)
diff --git a/.werks/957 b/.werks/957
new file mode 100644
index 0000000..0f8a83f
--- /dev/null
+++ b/.werks/957
@@ -0,0 +1,8 @@
+Title: fast_lta_silent_cubes.capacity: New check for Total Capacity over all Silent Cubes on FAST LTA Storage Systems
+Level: 2
+Component: checks
+Version: 1.2.5i3
+Date: 1400660881
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index f0a9fda..e6b4441 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -51,6 +51,7 @@
* 0162 if_brocade: New if64 Check version for Brocade VDX Switches...
NOTE: Please refer to the migration notes!
* 0956 fast_lta_headunit.status, fast_lta_headunit.replication: New checks for FAST LTA Storage Systems
+ * 0957 fast_lta_silent_cubes.capacity: New check for Total Capacity over all Silent Cubes on FAST LTA Storage Systems
* 0777 FIX: special agent emcvnx: did not work with security file authentication...
* 0786 FIX: zfsget: fixed compatibility with older Solaris agents...
* 0809 FIX: brocade_fcport: Fixed recently introduced problem with port speed detection
diff --git a/checkman/fast_lta_silent_cubes.capacity b/checkman/fast_lta_silent_cubes.capacity
new file mode 100644
index 0000000..a16c511
--- /dev/null
+++ b/checkman/fast_lta_silent_cubes.capacity
@@ -0,0 +1,35 @@
+title: FAST LTA Storage Systems: Total Capacity over all Silent Cubes
+agents: snmp
+catalog: hw/storagehw/fastlta
+license: GPL
+distribution: check_mk
+description:
+ Checks the total / used capacity over all silent cubes connected to a FAST
+ LTA Storage System.
+
+ Returns {WARN} or {CRIT} if usage is above given levels.
+
+ It uses the check logic of the {df} check, so for configuration
+ parameters and examples please refer to the man page of {df}.
+
+item:
+ "Total" for now is the only item.
+
+perfdata:
+ Three values: The first value is the used space in total over all connected
+ silent cubes in MB. Also the minimum (0 MB), maximum (total size over all
+ silent cubes) and the warning and critical levels in MB are provided.
+ The second is the change of the usage in MB per range since the last check
+ (e.g. in MB per 24 hours) and the 3rd is the averaged change (so called
+ trend), also in MB per range. Please note, that performance data for
+ trends is enabled per default. You can globally disable that in {main.mk}
+ with {filesystem_default_levels["trend_perfdata"] = False}.
+
+inventory:
+ Finds exactly one check on every system (head unit).
+
+[parameters]
+parameters (dict): See man page of {df}.
+
+[configuration]
+filesystem_default_levels: And other, see man page of {df}.
diff --git a/checks/fast_lta_silent_cubes b/checks/fast_lta_silent_cubes
new file mode 100644
index 0000000..581fd6a
--- /dev/null
+++ b/checks/fast_lta_silent_cubes
@@ -0,0 +1,55 @@
+#!/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_fast_lta_silent_cubes_status(info):
+ if len(info[0]) > 1:
+ return [ ("Total", {}) ]
+ else:
+ return []
+
+def check_fast_lta_silent_cubes_status(item, params, info):
+ fslist = []
+ for total, used in info:
+ size_mb = int(total) / 1048576.0
+ avail_mb = ( int(total) - int(used) ) / 1048576.0
+ fslist.append((item, size_mb, avail_mb))
+
+ return df_check_filesystem_list(item, params, fslist)
+
+check_info["fast_lta_silent_cubes.capacity"] = {
+ "check_function" : check_fast_lta_silent_cubes_status,
+ "inventory_function" : inventory_fast_lta_silent_cubes_status,
+ "service_description" : "Silent Cubes Capacity %s",
+ "has_perfdata" : True,
+ "group" : "filesystem",
+ "includes" : [ "df.include" ],
+ "snmp_info" : (".1.3.6.1.4.1.27417.3", [2, # scTotalCapacity
+ 3] # scTotalUsedCapacity
+ ),
+ "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.8072.3.2.10"),
+}
+
diff --git a/pnp-templates/check_mk-fast_lta_silent_cubes.capacity.php b/pnp-templates/check_mk-fast_lta_silent_cubes.capacity.php
new file mode 120000
index 0000000..aac1010
--- /dev/null
+++ b/pnp-templates/check_mk-fast_lta_silent_cubes.capacity.php
@@ -0,0 +1 @@
+check_mk-hitachi_hnas_volume.php
\ No newline at end of file
diff --git a/pnp-templates/check_mk-hitachi_hnas_span.php b/pnp-templates/check_mk-hitachi_hnas_span.php
index 6b314eb..18544ad 100644
--- a/pnp-templates/check_mk-hitachi_hnas_span.php
+++ b/pnp-templates/check_mk-hitachi_hnas_span.php
@@ -128,4 +128,30 @@ if (isset($RRD['growth'])) {
$def[3] .= "COMMENT:\"\\n\" ";
}
+if (isset($RRD['trend_hoursleft'])) {
+ // Trend
+ $opt[4] = "--vertical-label 'Days left' -l -1 -u 365 -X0 --title '$hostname: Days left for $servicedesc' ";
+ $def[4] = "DEF:hours_left=${RRD_AVG['trend_hoursleft']} ";
+ $def[4] .= "DEF:hours_left_min=${RRD_MIN['trend_hoursleft']} ";
+ // negative hours indicate no growth
+ // the dataset hours_left_isneg stores this info for each point as True/False
+ $def[4] .= "CDEF:hours_left_isneg=hours_left_min,-1,EQ ";
+ $def[4] .= "CDEF:hours_left_unmon=hours_left_min,400,0,IF ";
+ $def[4] .= "CDEF:days_left=hours_left,24,/ ";
+ $def[4] .= "CDEF:days_left_cap=days_left,400,MIN ";
+ // Convert negative points to 400 (y-axis cap)
+ $def[4] .= "CDEF:days_left_cap_positive=hours_left_isneg,400,days_left_cap,IF ";
+ // The AREA has a rendering problem. Points are too far to the right
+ $def[4] .= "AREA:hours_left_unmon#AA2200: ";
+
+ $def[4] .= "AREA:days_left_cap_positive#22AA44:\"Days left\:\" ";
+ if ($ACT[4] == -1)
+ {
+ $def[4] .= "COMMENT:\"Not growing\" ";
+ }
+ else {
+ $def[4] .= "GPRINT:days_left:LAST:\"%7.2lf days\" ";
+ }
+}
+
?>
diff --git a/web/plugins/perfometer/check_mk.py b/web/plugins/perfometer/check_mk.py
index d2023a4..eb758ae 100644
--- a/web/plugins/perfometer/check_mk.py
+++ b/web/plugins/perfometer/check_mk.py
@@ -117,6 +117,7 @@ perfometers["check_mk-hitachi_hnas_volume"] = perfometer_check_mk_df
perfometers["check_mk-emcvnx_raidgroups.capacity"] = perfometer_check_mk_df
perfometers["check_mk-emcvnx_raidgroups.capacity_contiguous"] = perfometer_check_mk_df
perfometers["check_mk-ibm_svc_mdiskgrp"] = perfometer_check_mk_df
+perfometers["check_mk-fast_lta_silent_cubes.capacity"] = perfometer_check_mk_df
def perfometer_esx_vsphere_datastores(row, check_command, perf_data):
used_mb = perf_data[0][1]
Module: check_mk
Branch: master
Commit: cdd87dbd4c718016e064f8fed1125eaf73340502
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=cdd87dbd4c7180…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue May 20 17:23:50 2014 +0200
New notification plugin for ASCII emails
There is now a new notification script for ASCII emails. Just like the
HTML email template it is configurable with WATO via host rules and
notification rules. You can configure several header fields as well
as the exact body content. It also supports bulk notifications.
This new script obsoletes the plain builtin ASCII emails that are
now called <i>ASCII email (legacy)</i>.
---
.werks/974 | 14 +++++++
ChangeLog | 1 +
modules/notify.py | 5 ++-
notifications/mail | 26 +++++++++++++
notifications/sms | 26 +++++++++++++
web/htdocs/check_mk.css | 4 ++
web/htdocs/valuespec.py | 14 ++++++-
web/htdocs/wato.py | 2 +-
web/plugins/wato/notifications.py | 77 +++++++++++++++++++++++++++++++++++++
9 files changed, 164 insertions(+), 5 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=cdd87dbd4c…
Module: check_mk
Branch: master
Commit: b1f44c62e81f2800eef4e6032c3f0ccc29859987
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b1f44c62e81f28…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue May 20 12:47:35 2014 +0200
Removed obsolete comment
---
web/htdocs/wato.py | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 3d1f548..3732489 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -2292,18 +2292,6 @@ def mode_rename_host(phase):
html.help(_("The renaming of hosts is a complex operation since a host's name is being "
"used as a unique key in various places. It also involves stopping and starting "
"of the monitoring core. You cannot rename a host while you have pending changes."))
- ### html.write("<ul>")
- ### html.write("<li>%s</li>" % _("Name of the host in the WATO folder."))
- ### html.write("<li>%s</li>" % _("Cluster definitions (if the host is the node of a cluster"))
- ### html.write("<li>%s</li>" % _("Configuration rules (when the host is explicitely named in the rule condition"))
- ### html.write("<li>%s</li>" % _("Global and user specific notification rules"))
- ### html.write("<li>%s</li>" % _("Check_MK temporary and cache information"))
- ### html.write("<li>%s</li>" % _("The service configuration of the host"))
- ### html.write("<li>%s</li>" % _("Stored logfiles (from logwatch plugin)"))
- ### html.write("<li>%s</li>" % _("Stored SNMP walks"))
- ### html.write("<li>%s</li>" % _("Performance data (RR databased)"))
- ### html.write("<li>%s</li>" % _("NagVis map definitions"))
- ### html.write("</ul>")
html.begin_form("rename_host", method="POST")
forms.header(_("Rename to host %s") % hostname)
Module: check_mk
Branch: master
Commit: ea078f72cd2bfe1b0879029e6cf59c53a532794f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ea078f72cd2bfe…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue May 20 12:45:18 2014 +0200
Renaming of hosts via WATO
WATO has now a new function <i>Rename Host</i>. You will find a button with that name
in the Properties of a host. It allows a renaming of an existing host. Before you
can use that feature you need to have all changes activated, so nothing is pending.
Renaming a host is a complex precedure that will not only rename the host in WATO,
but also in:
<ul>
<li>all rules from <i>Host & Service Parameters</i></li>
<li>cluster's node definitions</li>
<li>a host's parent definitions</li>
<li>Business Intelligence rules</li>
<li>notification rules (both rule based and flexible notifications)</li>
<li>internal Check_MK data like caches and performance counters</li>
<li>auto-disovered services of the host</li>
<li>logfile information of logwatch plugin</li>
<li>stored SNMP walks</li>
<li>RR databases with performance data</li>
<li>RRD updates in journal of RRD Cache</li>
<li>spool files of PNP4Nagios</li>
<li>NagVis maps</li>
<li>monitoring history entries (events and availability)</li>
<li>the current monitoring state (including ackowledgements and downtimes)</li>
</ul>
Please note that renaming of a host involves a temporary stop of the monitoring
core. This is neccessary in order to avoid situation where the old and the new
name of a host is being used at the same time.
---
.werks/973 | 35 ++++++++++++++
ChangeLog | 1 +
doc/drafts/LIESMICH.hosts_umbenennen | 27 +----------
modules/automation.py | 17 +++++++
modules/check_mk.py | 9 +++-
web/htdocs/wato.py | 88 ++++++++++++++++++++++++++--------
6 files changed, 132 insertions(+), 45 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=ea078f72cd…
Module: check_mk
Branch: master
Commit: 56920752518ea123eeef39344f4489aeaed9da53
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=56920752518ea1…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue May 20 12:13:57 2014 +0200
FIX notification: fixed exception when sending notifications as sms / ascii mail
Flexible notification plugins with configurable parameters did not work if
the parameters were configured as list of strings.
This exception happened on notications send by ASCII mails and sms.
---
.werks/918 | 10 ++++++++++
ChangeLog | 1 +
modules/notify.py | 10 +++++++---
3 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/.werks/918 b/.werks/918
new file mode 100644
index 0000000..491087e
--- /dev/null
+++ b/.werks/918
@@ -0,0 +1,10 @@
+Title: notification: fixed exception when sending notifications as sms / ascii mail
+Level: 2
+Component: notifications
+Version: 1.2.5i3
+Date: 1400580654
+Class: fix
+
+Flexible notification plugins with configurable parameters did not work if
+the parameters were configured as list of strings.
+This exception happened on notications send by ASCII mails and sms.
diff --git a/ChangeLog b/ChangeLog
index 029b577..94d0d05 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -109,6 +109,7 @@
* 0753 FIX: FIX: correctly show original state in HTML notification mails...
* 0609 FIX: mail notification script now uses 6 digit hex codes for colors to be better compatible with web based mail browsers
* 0964 FIX: Fix hanging shutdown of CMC on RedHat 5.X...
+ * 0918 FIX: notification: fixed exception when sending notifications as sms / ascii mail...
Reporting & Availability:
* 0756 Allow availability of multisite BI aggregates at once...
diff --git a/modules/notify.py b/modules/notify.py
index 4ab982b..3e08ec4 100644
--- a/modules/notify.py
+++ b/modules/notify.py
@@ -513,9 +513,13 @@ def notify_rulebased(raw_context, analyse=False):
return analysis_info
def rbn_finalize_plugin_parameters(hostname, plugin, rule_parameters):
- parameters = host_extra_conf_merged(hostname, notification_parameters.get(plugin, []))
- parameters.update(rule_parameters)
- return parameters
+ # Right now we are only able to finalize notification plugins with dict parameters..
+ if type(rule_parameters) == dict:
+ parameters = host_extra_conf_merged(hostname, notification_parameters.get(plugin, []))
+ parameters.update(rule_parameters)
+ return parameters
+ else:
+ return rule_parameters
def add_rulebased_macros(raw_context):
# For the rule based notifications we need the list of contacts