Module: check_mk
Branch: master
Commit: bb564411fc7807d0df20caa0a73a1a529bee9ba7
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=bb564411fc7807…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Tue Mar 7 11:05:05 2017 +0100
4485 FIX Removed uptime and snmp_uptime inventory plugins and other monitoring data from oracle_tablespaces inventory plugin
Uptime, snmp_uptime and oracle_tablespaces inventory plugins produced
a lot of monitoring data which filled up inventory archive and slowed
down the monitoring system. These plugins have been removed now resp.
oracle_tablespace has been adapted.
Change-Id: I83c1d5b1c312d6ce26f01d32681fcf101873bdf1
---
.werks/4485 | 14 ++++++
inventory/oracle_tablespaces | 102 +++--------------------------------------
inventory/snmp_uptime | 37 ---------------
inventory/uptime | 39 ----------------
web/plugins/views/inventory.py | 13 ++----
5 files changed, 24 insertions(+), 181 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=bb564411fc…
Module: check_mk
Branch: master
Commit: 05e3f17e9df81ad1469e16e2d29d563626b53774
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=05e3f17e9df81a…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Tue Mar 7 09:31:58 2017 +0100
4429 FIX Freshness check respects check period now
The freshness check didn't take the check period of host/service into
account, so these objects were considered "unfresh" outside the check
period. This has been fixed.
Change-Id: I14273df96218c7ad86daaa74a049aedd4f2479c1
---
.werks/4429 | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/.werks/4429 b/.werks/4429
new file mode 100644
index 0000000..f55b737
--- /dev/null
+++ b/.werks/4429
@@ -0,0 +1,12 @@
+Title: Freshness check respects check period now
+Level: 1
+Component: core
+Compatible: compat
+Edition: cee
+Version: 1.5.0i1
+Date: 1488874943
+Class: fix
+
+The freshness check didn't take the check period of host/service into
+account, so these objects were considered "unfresh" outside the check
+period. This has been fixed.
Module: check_mk
Branch: master
Commit: e3480e07d38d9a319c32450dc357e2da54e28b68
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e3480e07d38d9a…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Mar 7 07:57:04 2017 +0100
Updated bug entries #2337, #2467
Change-Id: Ie6863a0a132c8a904515bc0963a7767ddbda6dc1
---
.bugs/2337 | 7 +++++--
.bugs/2467 | 7 +++++--
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/.bugs/2337 b/.bugs/2337
index 3b9db01..b35491d 100644
--- a/.bugs/2337
+++ b/.bugs/2337
@@ -1,9 +1,9 @@
Title: Better handling of situation where /sbin/sendmail is missing
Component: notification
-State: open
+Class: bug
+State: done
Date: 2015-06-02 15:16:00
Targetversion: future
-Class: bug
If you do not have installed a local SMTP agent then the notification
plugin mail will crash with an exception:
@@ -37,3 +37,6 @@ But no further information is being displayed at the GUI.
itself...
- Do some default monitoring of errors in the notification log.
+
+2017-03-07 07:57:00: changed state open -> done
+Has now been fixed (failed notification tracking, ...)
diff --git a/.bugs/2467 b/.bugs/2467
index a499f0e..7ac9c9e 100644
--- a/.bugs/2467
+++ b/.bugs/2467
@@ -1,9 +1,9 @@
Title: Distributed Monitoring: Ensure that local site entry exists (not deletable)
Component: wato
-State: open
+Class: bug
+State: done
Date: 2016-08-23 09:09:48
Targetversion: future
-Class: bug
Maybe this is already fixed in master. Please test this case:
@@ -13,3 +13,6 @@ Auf dem Master sollte nichts gemonitored werden.
Jetzt war der Master allerdings nicht bei der Site Konfiguriation eingerichtet.
Er hatte damit keine distributed_wato.mk bekommen und dachte somit er
wäre für alles verantwortlich.
+
+2017-03-07 07:51:33: changed state open -> done
+This should be fixed now
Module: check_mk
Branch: master
Commit: 78406d6adc85dece880986b4954fa83f33f3d795
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=78406d6adc85de…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Mar 7 09:36:26 2017 +0100
4424 FIX Fixed user language selection showing wrong language after change
Change-Id: Ied4dee2a93ac75ce30e01ea7e326bd7451d24dbc
---
.werks/4424 | 11 +++++++++++
web/htdocs/i18n.py | 2 +-
web/htdocs/wato.py | 3 ++-
3 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/.werks/4424 b/.werks/4424
new file mode 100644
index 0000000..872d245
--- /dev/null
+++ b/.werks/4424
@@ -0,0 +1,11 @@
+Title: Fixed user language selection showing wrong language after change
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1488875764
+
+
diff --git a/web/htdocs/i18n.py b/web/htdocs/i18n.py
index f922f66..30764ee 100644
--- a/web/htdocs/i18n.py
+++ b/web/htdocs/i18n.py
@@ -64,7 +64,7 @@ def get_languages():
# Add the hard coded english language to the language list
# It must be choosable even if the administrator changed the default
# language to a custom value
- languages = set([ (None, _('English')) ])
+ languages = set([ ('', _('English')) ])
for lang_dir in get_language_dirs():
try:
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index a176e3d..46d20a0 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -13929,7 +13929,8 @@ def select_language(user):
html.div(default_label, class_="inherited", id_="attr_default_language", style= "display: none" if active else "")
html.open_div(id_="attr_entry_language", style="display: none" if not active else "")
- html.select("language", languages, user.get('language') or '')
+ language = user.get('language') if user.get('language') != None else ''
+ html.select("language", languages, language)
html.close_div()
html.help(_('Configure the default language '
'to be used by the user in the user interface here. If you do not check '
Module: check_mk
Branch: master
Commit: fa456fabd39e2f41afdebddb7587f27db08a9876
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fa456fabd39e2f…
Author: Andreas Umbreit <au(a)mathias-kettner.de>
Date: Mon Mar 6 15:34:30 2017 +0100
Combined graphs: Limiting display of combined graph button to host/service tables
---
web/htdocs/views.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index 384f3a7..0f31676 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -1804,7 +1804,9 @@ def render_view(view, rows, datasource, group_painters, painters,
# Show link to availability
datasource["table"] in [ "hosts", "services" ] or "aggr" in datasource["infos"],
# Show link to combined graphs
- "host" in datasource["infos"] or "service" in datasource["infos"])
+ ("host" in datasource["infos"] or "service" in datasource["infos"]) and \
+ ("host" in datasource["table"] or "service" in datasource["table"]),
+ )
# User errors in filters
html.show_user_errors()
Module: check_mk
Branch: master
Commit: 4077ba19ad7fd8f5dfeeb705d35eb71baa80a9ef
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4077ba19ad7fd8…
Author: Andreas Umbreit <au(a)mathias-kettner.de>
Date: Tue Mar 7 08:19:27 2017 +0100
Combined graphs: New class AutomaticDict
Adding new module containers to lib, including new class
AutomaticDict. This class derives from OrderedDict and
provides list-like appending while generating an
automatic key.
---
lib/containers.py | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
web/htdocs/metrics.py | 8 +++++---
2 files changed, 53 insertions(+), 3 deletions(-)
diff --git a/lib/containers.py b/lib/containers.py
new file mode 100644
index 0000000..f8ae783
--- /dev/null
+++ b/lib/containers.py
@@ -0,0 +1,48 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2014 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.
+
+# This file contains special containers needed for data representation
+
+from collections import OrderedDict
+
+# Dictionary class with the ability of appending items like provided
+# by a list.
+class AutomaticDict(OrderedDict):
+
+ def __init__(self, list_identifier = None, start_index = None):
+ OrderedDict.__init__(self)
+ self._list_identifier = list_identifier or "item"
+ self._item_index = start_index or 0
+
+ def __getitem__(self, item):
+ if item in self.keys():
+ return OrderedDict.__getitem__(self, item)
+ else:
+ return self["%s_%i" %(self._list_identifier, item)]
+
+ def append(self, item):
+ self["%s_%i" %(self._list_identifier, self._item_index)] = item
+ self._item_index += 1
diff --git a/web/htdocs/metrics.py b/web/htdocs/metrics.py
index d51a57f..f300256 100644
--- a/web/htdocs/metrics.py
+++ b/web/htdocs/metrics.py
@@ -33,17 +33,17 @@
# unit_name: The ID of a unit, e.g. "%"
# unit: The definition-dict of a unit like in unit_info
# graph_template: Template for a graph. Essentially a dict with the key "metrics"
-
import math, time, colorsys, shlex, operator, random
import config, pagetypes, table
import sites
import traceback
+from collections import OrderedDict
from log import logger
from lib import *
from valuespec import *
import livestatus
from cmk.regex import regex
-from collections import OrderedDict
+from cmk.containers import AutomaticDict
try:
import simplejson as json
@@ -72,7 +72,9 @@ def load_plugins(force):
global metric_info ; metric_info = {}
global check_metrics ; check_metrics = {}
global perfometer_info ; perfometer_info = []
- global graph_info ; graph_info = OrderedDict()
+ # mk_collections.AutomaticDict is used here to provide some list methods.
+ # This is needed to maintain backwards-compatibility.
+ global graph_info ; graph_info = AutomaticDict("manual_graph_template")
load_web_plugins("metrics", globals())
loaded_with_language = current_language
Module: check_mk
Branch: master
Commit: ac29ff47b7f2209f2c1581325ff8227db7f2df44
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ac29ff47b7f220…
Author: Andreas Umbreit <au(a)mathias-kettner.de>
Date: Tue Mar 7 09:22:10 2017 +0100
Combined graphs: Fix button visibility
Restricting display of Combined graps button to datasources
with str-type tables
---
web/htdocs/views.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index 0f31676..3ae10c5 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -1794,8 +1794,11 @@ def render_view(view, rows, datasource, group_painters, painters,
# Is the layout able to display checkboxes?
can_display_checkboxes = layout.get('checkboxes', False)
-
if show_buttons:
+ show_combined_graphs_button = \
+ ("host" in datasource["infos"] or "service" in datasource["infos"]) and \
+ (type(datasource["table"]) == str) and \
+ ("host" in datasource["table"] or "service" in datasource["table"])
show_context_links(view, datasource, show_filters,
# Take into account: permissions, display_options
row_count > 0 and command_form,
@@ -1804,10 +1807,7 @@ def render_view(view, rows, datasource, group_painters, painters,
# Show link to availability
datasource["table"] in [ "hosts", "services" ] or "aggr" in datasource["infos"],
# Show link to combined graphs
- ("host" in datasource["infos"] or "service" in datasource["infos"]) and \
- ("host" in datasource["table"] or "service" in datasource["table"]),
- )
-
+ show_combined_graphs_button,)
# User errors in filters
html.show_user_errors()