Module: check_mk
Branch: master
Commit: 6c84a34d54ab2e9600a6d144306d4ca43a87d911
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6c84a34d54ab2e…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Oct 31 16:50:09 2014 +0100
#1482 FIX Fix exception when editing a visual of type single host group
Context editor was broken, because there were two filters with the
same HTML variable name <tt>hostgroup</tt>. This has been fixed
by renaming the name of the host group selection filter to <tt>host_group</tt>.
---
.werks/1482 | 12 ++++++++++++
ChangeLog | 1 +
web/htdocs/visuals.py | 10 +++++++---
web/plugins/visuals/filters.py | 4 ++--
4 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/.werks/1482 b/.werks/1482
new file mode 100644
index 0000000..2797d3a
--- /dev/null
+++ b/.werks/1482
@@ -0,0 +1,12 @@
+Title: Fix exception when editing a visual of type single host group
+Level: 1
+Component: multisite
+Compatible: compat
+Version: 1.2.5i7
+Date: 1414770553
+Class: fix
+
+Context editor was broken, because there were two filters with the
+same HTML variable name <tt>hostgroup</tt>. This has been fixed
+by renaming the name of the host group selection filter to <tt>host_group</tt>.
+
diff --git a/ChangeLog b/ChangeLog
index ec8160c..69fd65b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,7 @@
* 1164 FIX: Fixed links from servicegroup overviews to single servicegroups
* 1166 FIX: Also prevting stylesheet update issues during version updates (just like for JS files)
* 1481 FIX: Fix broken layout of Host-, Service- and Contactgroup filters
+ * 1482 FIX: Fix exception when editing a visual of type single host group...
WATO:
* 1165 FIX: Fixed exception in service discovery of logwatch event console forwarding checks...
diff --git a/web/htdocs/visuals.py b/web/htdocs/visuals.py
index 4dd059f..ab59a2f 100644
--- a/web/htdocs/visuals.py
+++ b/web/htdocs/visuals.py
@@ -848,9 +848,13 @@ class Filter:
# Is used to populate a value, for example loaded from persistance, into
# the HTML context where it can be used by e.g. the display() method.
def set_value(self, value):
- val = {}
- for varname in self.htmlvars:
- html.set_var(varname, value.get(varname))
+ try:
+ val = {}
+ for varname in self.htmlvars:
+ html.set_var(varname, value.get(varname))
+ except:
+ html.debug("%r, %s" % (self, self.name))
+ raise
def get_filter(name):
return multisite_filters[name]
diff --git a/web/plugins/visuals/filters.py b/web/plugins/visuals/filters.py
index 573fc49..7fe6150 100644
--- a/web/plugins/visuals/filters.py
+++ b/web/plugins/visuals/filters.py
@@ -184,13 +184,13 @@ class FilterGroupCombo(Filter):
def __init__(self, what, title, enforce):
self.enforce = enforce
self.prefix = not self.enforce and "opt" or ""
- htmlvars = [ self.prefix + what + "group" ]
+ htmlvars = [ self.prefix + what + "_group" ]
if not enforce:
htmlvars.append("neg_" + htmlvars[0])
Filter.__init__(self, self.prefix + what + "group", # name, e.g. "hostgroup"
title, # title, e.g. "Hostgroup"
what.split("_")[0], # info, e.g. "host"
- htmlvars, # htmlvars, e.g. "hostgroup"
+ htmlvars, # htmlvars, e.g. "host_group"
[ what + "group_name" ]) # rows needed to fetch for link information
self.what = what
Module: check_mk
Branch: master
Commit: 3525eb2caec37d9a3a4bdb69f04bcf1d3f457441
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3525eb2caec37d…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Oct 31 15:21:55 2014 +0100
Updated bug entries #2222
---
.bugs/2222 | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/.bugs/2222 b/.bugs/2222
new file mode 100644
index 0000000..15605ba
--- /dev/null
+++ b/.bugs/2222
@@ -0,0 +1,9 @@
+Title: Views for services of one host and for all services have icons at different positions
+Component: multisite
+State: open
+Date: 2014-10-31 15:20:29
+Targetversion: future
+Class: nastiness
+
+The position of the column "service icons" is not always the same.
+Sometimes it's at the beginning, sometimes at the end.
Module: check_mk
Branch: master
Commit: 03f5560f2006443edb59e975144efbd0e45073ce
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=03f5560f200644…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Oct 31 14:48:51 2014 +0100
#1168 FIX HTML mails can now be configured to display graphs among each other
By default all graphs are displayed besides eachother, trying to fill
horizontally as much space as possible. Now you can configure the mail
notifications to display the graphs among each other by setting the
notification parmeter.
---
.werks/1168 | 12 ++++++++++++
ChangeLog | 3 +++
notifications/mail | 10 +++++++++-
web/plugins/wato/notifications.py | 16 ++++++++++++----
4 files changed, 36 insertions(+), 5 deletions(-)
diff --git a/.werks/1168 b/.werks/1168
new file mode 100644
index 0000000..94d65a9
--- /dev/null
+++ b/.werks/1168
@@ -0,0 +1,12 @@
+Title: HTML mails can now be configured to display graphs among each other
+Level: 1
+Component: notifications
+Compatible: compat
+Version: 1.2.5i7
+Date: 1414763224
+Class: fix
+
+By default all graphs are displayed besides eachother, trying to fill
+horizontally as much space as possible. Now you can configure the mail
+notifications to display the graphs among each other by setting the
+notification parmeter.
diff --git a/ChangeLog b/ChangeLog
index fcbfb17..c7f7171 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,9 @@
WATO:
* 1165 FIX: Fixed exception in service discovery of logwatch event console forwarding checks...
+ Notifications:
+ * 1168 FIX: HTML mails can now be configured to display graphs among each other...
+
1.2.5i6:
Core & Setup:
diff --git a/notifications/mail b/notifications/mail
index 57f4b28..e77c21b 100755
--- a/notifications/mail
+++ b/notifications/mail
@@ -171,6 +171,11 @@ img {
margin-right: 10px;
}
+img.nofloat {
+ display: block;
+ margin-bottom: 10px;
+}
+
table.context {
border-collapse: collapse;
}
@@ -555,7 +560,10 @@ def construct_content(context):
name = '%s-%s-%d.png' % (context['HOSTNAME'], svc_desc, source)
attachments.append(('img', name, content, 'inline'))
- graph_code += '<img src="cid:%s" />' % name
+ cls = ''
+ if context.get('PARAMETER_NO_FLOATING_GRAPHS'):
+ cls = ' class="nofloat"'
+ graph_code += '<img src="cid:%s"%s />' % (name, cls)
if graph_code:
content_html += (
diff --git a/web/plugins/wato/notifications.py b/web/plugins/wato/notifications.py
index 12d4733..0814e4b 100644
--- a/web/plugins/wato/notifications.py
+++ b/web/plugins/wato/notifications.py
@@ -78,11 +78,11 @@ register_notification_parameters("mail",
),
( "url_prefix",
TextAscii(
- title = _("URL prefix for links to Multisite"),
+ title = _("URL prefix for links to Check_MK"),
help = _("If you specify an URL prefix here, then several parts of the "
- "email body are armed with hyperlinks to your Multisite GUI, so "
+ "email body are armed with hyperlinks to your Check_MK GUI, so "
"that the recipient of the email can directly visit the host or "
- "service in question in Multisite. Specify an absolute URL including "
+ "service in question in Check_MK. Specify an absolute URL including "
"the <tt>.../check_mk/</tt>"),
regex = "^(http|https)://.*/check_mk/$",
regex_error = _("The URL must begin with <tt>http</tt> or "
@@ -91,7 +91,15 @@ register_notification_parameters("mail",
default_value = "http://" + socket.gethostname() + "/" + (
defaults.omd_site and defaults.omd_site + "/" or "") + "check_mk/",
)
- )
+ ),
+ ( "no_floating_graphs", FixedValue(
+ True,
+ title = _("Display graphs among each other"),
+ totext = _("Graphs are shown among each other"),
+ help = _("By default all multiple graphs in emails are displayed floating "
+ "nearby. You can enable this option to show the graphs among each "
+ "other."),
+ )),
]
)
)
Module: check_mk
Branch: master
Commit: cce6fab9056d3487a08ded705a23daaefa1f3a55
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=cce6fab9056d34…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Fri Oct 31 14:25:53 2014 +0100
added missing files
---
checkman/climaveneta_fan | 22 +++++++++++++++++
checks/climaveneta_fan | 60 ++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 82 insertions(+)
diff --git a/checkman/climaveneta_fan b/checkman/climaveneta_fan
new file mode 100644
index 0000000..2c2011f
--- /dev/null
+++ b/checkman/climaveneta_fan
@@ -0,0 +1,22 @@
+title: Climaveneta Fan
+agents: snmp
+catalog: hw/environment/climaveneta
+license: GPL
+distribution:
+description:
+ This check monitors the Fan speeds on Climaveneta mc01_o4cv devices.
+
+item:
+ The id of the Fan (1 or 2)
+
+perfdata:
+ the current Fan speed in rpm
+
+inventory:
+ one service for each Fan
+
+[parameters]
+lower_warning (int): Warning if speed is beneath
+lower_critical (int): Minimum level for the speed
+upper_warning (int): Warning if the speed is above
+upper_critical (int): Maximum level for the speed
diff --git a/checks/climaveneta_fan b/checks/climaveneta_fan
new file mode 100644
index 0000000..d3fac3e
--- /dev/null
+++ b/checks/climaveneta_fan
@@ -0,0 +1,60 @@
+#!/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.
+
+factory_settings["climaveneta_fan_default_levels"] = {
+ "lower" : ( 200, 100 ),
+ "upper" : ( 700, 800 ),
+}
+
+def inventory_climaveneta_fan(info):
+ if len(info[0]) == 2:
+ return [ (1, {}), (2, {}) ]
+
+def check_climaveneta_fan(item, params, info):
+ item = item-1
+ rpm = int(info[0][item])
+ l_warn, l_crit = params['lower']
+ u_warn, u_crit = params['upper']
+ perfdata = [("rpm", rpm )]
+ message = "Speed at %d rpm" % rpm
+ if rpm <= l_crit or rpm >= u_crit:
+ return 2, message, perfdata
+ if rpm <= l_warn or rpm >= u_warn:
+ return 1, messagae, perfdata
+ return 0, message, perfdata
+
+
+check_info["climaveneta_fan"] = {
+ "check_function" : check_climaveneta_fan,
+ "inventory_function" : inventory_climaveneta_fan,
+ "service_description" : "Fan %s",
+ "has_perfdata" : True,
+ "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.1.0") == "pCO Gateway",
+ "snmp_info" : (".1.3.6.1.4.1.9839.2.1.2", [ 42, 43 ] ),
+ "group" : "hw_fans",
+ "default_levels_variable" : "climaveneta_fan_default_levels",
+}
+