Module: check_mk
Branch: master
Commit: 742869f0d6a43ee2aae6dab07941ae195633ff6d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=742869f0d6a43e…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu May 28 15:57:24 2015 +0200
#2281 FIX mkeventd: fix: now able to create notifications with events containing umlauts
The event console was unable to create a notification for a event if it contained umlauts like ä, ö, etc.
The event itself got created, just the notification part was missing.
---
.werks/2281 | 11 +++++++++++
ChangeLog | 1 +
mkeventd/bin/mkeventd | 1 +
3 files changed, 13 insertions(+)
diff --git a/.werks/2281 b/.werks/2281
new file mode 100644
index 0000000..bbce732
--- /dev/null
+++ b/.werks/2281
@@ -0,0 +1,11 @@
+Title: mkeventd: fix: now able to create notifications with events containing umlauts
+Level: 2
+Component: ec
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1432821086
+
+The event console was unable to create a notification for a event if it contained umlauts like ä, ö, etc.
+The event itself got created, just the notification part was missing.
diff --git a/ChangeLog b/ChangeLog
index d20d8fa..a2cd837 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -578,6 +578,7 @@
* 2133 FIX: Fix visualization of global EC setting for Rule Optimizer...
* 2139 FIX: Fix exception in Event Console when archiving events with match groups and non ASCII characters
* 2151 FIX: Fixed wrong time in events when forwarding logwatch to EC between timezones...
+ * 2281 FIX: mkeventd: fix: now able to create notifications with events containing umlauts...
Livestatus:
* 2229 Do not fail on non-existing Livestatus columns any longer, output None or null instead...
diff --git a/mkeventd/bin/mkeventd b/mkeventd/bin/mkeventd
index 325d455..b2bd1be 100755
--- a/mkeventd/bin/mkeventd
+++ b/mkeventd/bin/mkeventd
@@ -3289,6 +3289,7 @@ def do_notify(event, username, is_cancelling):
# Send notification context via stdin.
context_string = "".join([ "%s=%s\n" % (varname, value.replace("\n", "\\n")) for (varname, value) in context.items() ])
+ context_string = to_utf8(context_string)
p = subprocess.Popen(["cmk", "--notify", "stdin"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
response = p.communicate(input=context_string)[0]
status = p.returncode
Module: check_mk
Branch: master
Commit: d188540f6fb95b37dd56d978d4107f009077c11e
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d188540f6fb95b…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu May 28 13:54:30 2015 +0200
Matrix layout: new painter option for omitting identical rows
---
web/htdocs/views.py | 46 ++++++++++++++++++++++-------------------
web/plugins/config/builtin.py | 3 ---
web/plugins/views/layouts.py | 5 +++--
web/plugins/views/painters.py | 10 +++++++++
4 files changed, 38 insertions(+), 26 deletions(-)
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index 5a56e0c..ae8a896 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -1057,6 +1057,28 @@ def show_view(view, show_heading = False, show_buttons = True,
colset.remove("site")
columns = list(colset)
+ # The layout of the view: it can be overridden by several specifying
+ # an output format (like json or python). Note: the layout is not
+ # always needed. In case of an embedded view in the reporting this
+ # field is simply missing, because the rendering is done by the
+ # report itself.
+ # TODO: CSV export should be handled by the layouts. It cannot
+ # be done generic in most cases
+ if html.output_format == "html":
+ if "layout" in view:
+ layout = multisite_layouts[view["layout"]]
+ else:
+ layout = None
+ else:
+ if "layout" in view and "csv_export" in multisite_layouts[view["layout"]]:
+ multisite_layouts[view["layout"]]["csv_export"](rows, view, group_painters, painters)
+ return
+ else:
+ # Generic layout of export
+ layout = multisite_layouts.get(html.output_format)
+ if not layout:
+ layout = multisite_layouts["json"]
+
# Get list of painter options we need to display (such as PNP time range
# or the format being used for timestamp display)
painter_options = []
@@ -1066,6 +1088,9 @@ def show_view(view, show_heading = False, show_buttons = True,
if p.get("load_inv"):
need_inventory_data = True
+ # Also layouts can register painter options
+ painter_options += layout.get("options", [])
+
painter_options = list(set(painter_options))
painter_options.sort()
@@ -1115,27 +1140,6 @@ def show_view(view, show_heading = False, show_buttons = True,
if browser_reload and 'R' in display_options and not only_count:
html.set_browser_reload(browser_reload)
- # The layout of the view: it can be overridden by several specifying
- # an output format (like json or python). Note: the layout is not
- # always needed. In case of an embedded view in the reporting this
- # field is simply missing, because the rendering is done by the
- # report itself.
- # TODO: CSV export should be handled by the layouts. It cannot
- # be done generic in most cases
- if html.output_format == "html":
- if "layout" in view:
- layout = multisite_layouts[view["layout"]]
- else:
- layout = None
- else:
- if "layout" in view and "csv_export" in multisite_layouts[view["layout"]]:
- multisite_layouts[view["layout"]]["csv_export"](rows, view, group_painters, painters)
- return
- else:
- # Generic layout of export
- layout = multisite_layouts.get(html.output_format)
- if not layout:
- layout = multisite_layouts["json"]
# Until now no single byte of HTML code has been output.
# Now let's render the view. The render_function will be
diff --git a/web/plugins/config/builtin.py b/web/plugins/config/builtin.py
index cd840ab..8ae8501 100644
--- a/web/plugins/config/builtin.py
+++ b/web/plugins/config/builtin.py
@@ -110,9 +110,6 @@ sounds = [
view_option_refreshes = [ 30, 60, 90, 0 ]
view_option_columns = [ 1, 2, 3, 4, 5, 6, 8, 10, 12 ]
-# Experimental:
-matrix_omit_uniform_lines = False
-
# MISC
doculink_urlformat = "http://mathias-kettner.de/checkmk_%s.html";
diff --git a/web/plugins/views/layouts.py b/web/plugins/views/layouts.py
index 2f3ab9d..67c8b3a 100644
--- a/web/plugins/views/layouts.py
+++ b/web/plugins/views/layouts.py
@@ -546,7 +546,7 @@ def render_matrix(rows, view, group_painters, painters, num_columns, _ignore_sho
# Now for each unique service^H^H^H^H^H^H ID column paint one row
for row_id in unique_row_ids:
# Omit rows where all cells have the same values
- if config.matrix_omit_uniform_lines:
+ if get_painter_option("matrix_omit_uniform"):
at_least_one_different = False
for counts in value_counts[row_id].values():
if len(counts) > 1:
@@ -602,7 +602,7 @@ def csv_export_matrix(rows, view, group_painters, painters):
for row_id in unique_row_ids:
# Omit rows where all cells have the same values
- if config.matrix_omit_uniform_lines:
+ if get_painter_option("matrix_omit_uniform"):
at_least_one_different = False
for counts in value_counts[row_id].values():
if len(counts) > 1:
@@ -721,4 +721,5 @@ multisite_layouts["matrix"] = {
"csv_export" : csv_export_matrix,
"group" : True,
"checkboxes" : False,
+ "options" : [ "matrix_omit_uniform" ],
}
diff --git a/web/plugins/views/painters.py b/web/plugins/views/painters.py
index ba0dfc3..b44ef96 100644
--- a/web/plugins/views/painters.py
+++ b/web/plugins/views/painters.py
@@ -100,6 +100,16 @@ multisite_painter_options["ts_date"] = {
'valuespec' : DateFormat(),
}
+multisite_painter_options["matrix_omit_uniform"] = {
+ 'valuespec' : DropdownChoice(
+ title = _("Find differences..."),
+ choices = [
+ ( False, _("Always show all rows") ),
+ ( True, _("Omit rows where all columns are identical") ),
+ ]
+ )
+}
+
# This helper function returns the value of the given custom var
def paint_custom_var(what, key, row):
if what:
Module: check_mk
Branch: master
Commit: 4f3d8a694137385a22808bb51087f2ccfc70e4f2
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4f3d8a69413738…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Wed May 27 16:23:55 2015 +0200
#2280 agent_vsphere: now provides more information if the login attempt fails
In addition of <i>Cannot connect to vSphere Server. Maybe you provided wrong credentials.
Please check your connection settings and try again."</i>, the agent now also reports
extra information.
---
.werks/2280 | 12 ++++++++++++
ChangeLog | 1 +
agents/special/agent_vsphere | 2 +-
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.werks/2280 b/.werks/2280
new file mode 100644
index 0000000..c59a1c5
--- /dev/null
+++ b/.werks/2280
@@ -0,0 +1,12 @@
+Title: agent_vsphere: now provides more information if the login attempt fails
+Level: 1
+Component: checks
+Class: feature
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1432736447
+
+In addition of <i>Cannot connect to vSphere Server. Maybe you provided wrong credentials.
+Please check your connection settings and try again."</i>, the agent now also reports
+extra information.
diff --git a/ChangeLog b/ChangeLog
index d31d837..d20d8fa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -196,6 +196,7 @@
* 1250 alcatel_timetra_cpu: New CPU Check for Alcatel Switches supporting the TIMETRA MIB
* 2215 pfsense_status, pfsense_if: Two new checks to monitor the interfaces and status of pfSense firewalls...
* 1251 lvm_pvs, lvm_vgs: New Checks for LVM volume groups and physical volumes...
+ * 2280 agent_vsphere: now provides more information if the login attempt fails...
* 1457 FIX: logins: new check renamed from "users" check...
NOTE: Please refer to the migration notes!
* 1762 FIX: lnx_thermal: Now ignoring trip points with level 0...
diff --git a/agents/special/agent_vsphere b/agents/special/agent_vsphere
index 2c52738..156e329 100755
--- a/agents/special/agent_vsphere
+++ b/agents/special/agent_vsphere
@@ -683,7 +683,7 @@ except Exception, e:
raise
error = "Cannot connect to vSphere Server. Maybe you provided wrong " \
"credentials. Please check your connection settings and try " \
- "again."
+ "again. Error message: %r" % e
if not error:
Module: check_mk
Branch: master
Commit: ea7590038af1efe62b6f4cff06f367339b56b7cc
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ea7590038af1ef…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Wed May 27 13:53:41 2015 +0200
#1251 lvm_pvs, lvm_vgs: New Checks for LVM volume groups and physical volumes
The checks need the agent plugin {lvm} in order to work.
---
.werks/1251 | 10 ++++++++++
ChangeLog | 1 +
agents/plugins/lvm | 6 ++++++
checkman/lvm_pvs | 15 +++++++++++++++
checkman/lvm_vgs | 15 +++++++++++++++
checks/lvm_pvs | 39 +++++++++++++++++++++++++++++++++++++++
checks/lvm_vgs | 38 ++++++++++++++++++++++++++++++++++++++
7 files changed, 124 insertions(+)
diff --git a/.werks/1251 b/.werks/1251
new file mode 100644
index 0000000..52c96ea
--- /dev/null
+++ b/.werks/1251
@@ -0,0 +1,10 @@
+Title: lvm_pvs, lvm_vgs: New Checks for LVM volume groups and physical volumes
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i1
+Date: 1432727463
+Class: feature
+
+The checks need the agent plugin {lvm} in order to work.
+
diff --git a/ChangeLog b/ChangeLog
index 767614f..d31d837 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -195,6 +195,7 @@
* 1249 alcatel_cpu, alcatel_temp, alcatel_fans: New checks for Alcatel switches based on IND1 MIB
* 1250 alcatel_timetra_cpu: New CPU Check for Alcatel Switches supporting the TIMETRA MIB
* 2215 pfsense_status, pfsense_if: Two new checks to monitor the interfaces and status of pfSense firewalls...
+ * 1251 lvm_pvs, lvm_vgs: New Checks for LVM volume groups and physical volumes...
* 1457 FIX: logins: new check renamed from "users" check...
NOTE: Please refer to the migration notes!
* 1762 FIX: lnx_thermal: Now ignoring trip points with level 0...
diff --git a/agents/plugins/lvm b/agents/plugins/lvm
new file mode 100755
index 0000000..26dc110
--- /dev/null
+++ b/agents/plugins/lvm
@@ -0,0 +1,6 @@
+#!/bin/bash
+echo "<<<lvm_vgs>>>"
+vgs --units b --nosuffix --noheadings --separator ' '
+
+echo "<<<lvm_pvs>>>"
+pvs --units b --nosuffix --noheadings --separator ' '
diff --git a/checkman/lvm_pvs b/checkman/lvm_pvs
new file mode 100644
index 0000000..1812655
--- /dev/null
+++ b/checkman/lvm_pvs
@@ -0,0 +1,15 @@
+title: LVM: Physical volume
+agents: linux
+catalog: os/storage
+license: GPL
+distribution: check_mk
+description:
+ This Check monitors the size and the usage of physical volumes in LVM.
+ It useses same configuration like normal filesystems and supports almost the same
+ options (except inodes etc.)
+
+ You need to install the agent plugin {lvm}.
+
+
+inventory:
+ One item is generated per physical volume
diff --git a/checkman/lvm_vgs b/checkman/lvm_vgs
new file mode 100644
index 0000000..4a5b450
--- /dev/null
+++ b/checkman/lvm_vgs
@@ -0,0 +1,15 @@
+title: LVM: Volume groups
+agents: linux
+catalog: os/storage
+license: GPL
+distribution: check_mk
+description:
+ This Check monitors the size and the usage of LVM volume groups.
+ It useses same configuration like normal filesystems and supports almost the same
+ options (except inodes etc.)
+
+ You need to install the agent plugin {lvm}.
+
+
+inventory:
+ One item is generated per volume group
diff --git a/checks/lvm_pvs b/checks/lvm_pvs
new file mode 100644
index 0000000..6962c8d
--- /dev/null
+++ b/checks/lvm_pvs
@@ -0,0 +1,39 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+
+# (c) 2013 Heinlein Support GmbH
+# Robert Sander <r.sander(a)heinlein-support.de>
+
+# This 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. This file 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.
+
+lvm_pvs_default_values = ( 90, 95 )
+
+def inventory_lvm_pvs(info):
+ for line in info:
+ yield line[0], {}
+
+def check_lvm_pvs(item, params, info):
+ pvlist = []
+ for pv, vg, fmt, attr, size, free in info:
+ size_mb = int(size) / 1048576
+ avail_mb = int(free) / 1048576
+ pvlist.append((pv, size_mb, avail_mb, 0))
+ return df_check_filesystem_list(item, params, pvlist)
+
+check_info['lvm_pvs'] = {
+ "check_function" : check_lvm_pvs,
+ "inventory_function" : inventory_lvm_pvs,
+ "service_description" : "LVM PVs %s",
+ "has_perfdata" : True,
+ "group" : "filesystem",
+ "default_levels_variable" : "filesystem_default_levels",
+}
diff --git a/checks/lvm_vgs b/checks/lvm_vgs
new file mode 100644
index 0000000..b3b5f10
--- /dev/null
+++ b/checks/lvm_vgs
@@ -0,0 +1,38 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+
+# (c) 2013 Heinlein Support GmbH
+# Robert Sander <r.sander(a)heinlein-support.de>
+
+# This 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. This file 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_lvm_vgs(info):
+ for line in info:
+ yield line[0], {}
+
+def check_lvm_vgs(item, params, info):
+ vglist = []
+ for vg, pvs, lvs, sns, attr, size, free in info:
+ size_mb = int(size) / 1048576
+ avail_mb = int(free) / 1048576
+ vglist.append((vg, size_mb, avail_mb, 0))
+ return df_check_filesystem_list(item, params, vglist)
+
+
+check_info['lvm_vgs'] = {
+ "check_function" : check_lvm_vgs,
+ "inventory_function" : inventory_lvm_vgs,
+ "service_description" : "LVM VG %s",
+ "has_perfdata" : True,
+ "group" : "filesystem",
+ "default_levels_variable" : "filesystem_default_levels",
+}
Module: check_mk
Branch: master
Commit: 5baf0f471836958dc4d4a607aad1c3c76b43eecf
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5baf0f47183695…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Tue May 26 17:17:30 2015 +0200
Updated bug entries #2301
---
.bugs/2301 | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/.bugs/2301 b/.bugs/2301
new file mode 100644
index 0000000..b20691f
--- /dev/null
+++ b/.bugs/2301
@@ -0,0 +1,10 @@
+Title: in roles & permissions, section "Multisite Views", also show the IDs of the views
+Component: wato
+State: open
+Date: 2015-05-26 17:14:34
+Targetversion: future
+Class: nastiness
+
+In roles & permissions, section "Multisite Views" the shown view descriptions are not unique (have duplicates)
+and it is not always clear which real view they correspond to. As some additional help, it would be nice
+to have the view id listed in brackets after the descriptive text.