Module: check_mk
Branch: master
Commit: 8d501436171ccd54a120efff90cc707428d0c785
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8d501436171ccd…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Mar 18 11:21:36 2014 +0100
RBN: Fix exception when a user is saving a new rule
---
web/htdocs/wato.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index f4784eb..bc9cf2f 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -257,7 +257,7 @@ def page_handler():
html.set_var("mode", newmode) # will be used by makeuri
# Check general permissions for the new mode
- if not config.may("wato.seeall"):
+ if modeperms != None and not config.may("wato.seeall"):
for pname in modeperms:
if '.' not in pname:
pname = "wato." + pname
Module: check_mk
Branch: master
Commit: babfd065300b0a242f6e779a33403b77d835724c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=babfd065300b0a…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Mar 17 17:33:06 2014 +0100
BI aggregates now acknowledgement information
Check_MK BI now also aggregates the information wether problems that make the aggregate
non-OK are acknowledged. Please refer to the updated <a href="checkmk_bi.html">documentation
about BI</a> for details.
---
.werks/715 | 11 +++++++++++
ChangeLog | 1 +
web/htdocs/bi.py | 24 ++++++++++++++++++++++--
web/plugins/views/bi.py | 2 ++
4 files changed, 36 insertions(+), 2 deletions(-)
diff --git a/.werks/715 b/.werks/715
new file mode 100644
index 0000000..e15fb26
--- /dev/null
+++ b/.werks/715
@@ -0,0 +1,11 @@
+Title: BI aggregates now acknowledgement information
+Level: 2
+Component: bi
+Version: 1.2.5i1
+Date: 1395073928
+Class: feature
+
+Check_MK BI now also aggregates the information wether problems that make the aggregate
+non-OK are acknowledged. Please refer to the updated <a href="checkmk_bi.html">documentation
+about BI</a> for details.
+
diff --git a/ChangeLog b/ChangeLog
index b962247..0037d89 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -334,6 +334,7 @@
BI:
* 0721 Use hard states in BI aggregates...
* 0714 BI aggregations now also honor scheduled downtimes...
+ * 0715 BI aggregates now acknowledgement information...
* 0669 FIX: Fixed regex matching in BI when using character groups [...]...
Reporting & Availability:
diff --git a/web/htdocs/bi.py b/web/htdocs/bi.py
index 8fda93a..aac8a89 100644
--- a/web/htdocs/bi.py
+++ b/web/htdocs/bi.py
@@ -1107,13 +1107,22 @@ def execute_rule_node(node, status_info, use_hard_states):
node_states = []
assumed_states = []
downtime_states = []
+ ack_states = [] # Needed for computing the acknowledgement of non-OK nodes
one_assumption = False
for n in node["nodes"]:
result = execute_node(n, status_info, use_hard_states) # state, assumed_state, node [, subtrees]
subtrees.append(result)
- # Assume items in downtime as CRIT
+
+ # Assume items in downtime as CRIT when computing downtime state
downtime_states.append(({"state": result[0]["in_downtime"] and 2 or 0, "output" : ""}, result[2]))
+ # Assume non-OK nodes that are acked as OK
+ if result[0]["acknowledged"]:
+ acked_state = 0
+ else:
+ acked_state = result[0]["state"]
+ ack_states.append(({"state": acked_state, "output" : ""}, result[2]))
+
node_states.append((result[0], result[2]))
if result[1] != None:
assumed_states.append((result[1], result[2]))
@@ -1125,9 +1134,16 @@ def execute_rule_node(node, status_info, use_hard_states):
downtime_state = func(*([downtime_states] + funcargs))
state = func(*([node_states] + funcargs))
state["in_downtime"] = downtime_state["state"] >= 2
+ if state["state"] > 0: # Non-OK-State -> compute acknowledgedment
+ ack_state = func(*([ack_states] + funcargs))
+ state["acknowledged"] = ack_state["state"] == 0 # would be OK if acked problems would be OK
+ else:
+ state["acknowledged"] = False
+
if one_assumption:
assumed_state = func(*([assumed_states] + funcargs))
assumed_state["in_downtime"] = state["in_downtime"]
+ assumed_state["acknowledged"] = state["acknowledged"]
else:
assumed_state = None
return (state, assumed_state, node, subtrees)
@@ -1529,7 +1545,7 @@ def render_tree_foldable(row, boxes, omit_root, expansion_level, only_problems,
return "aggrtree" + (boxes and "_box" or ""), htmlcode
def aggr_render_node(tree, title, mousecode, show_host):
-
+
# Check if we have an assumed state: comparing assumed state (tree[1]) with state (tree[0])
if tree[1] and tree[0] != tree[1]:
addclass = " " + _("assumed")
@@ -1542,6 +1558,10 @@ def aggr_render_node(tree, title, mousecode, show_host):
title = ('<img class="icon bi" src="images/icon_downtime.png" title="%s">' % \
_("This element is currently in a scheduled downtime")) + title
+ if tree[0]["acknowledged"]:
+ title = ('<img class="icon bi" src="images/icon_ack.png" title="%s">' % \
+ _("This problem has been acknowledged")) + title
+
h = '<span class="content state state%d%s">%s</span>\n' \
% (effective_state["state"], addclass, render_bi_state(effective_state["state"]))
if mousecode:
diff --git a/web/plugins/views/bi.py b/web/plugins/views/bi.py
index 9a89b2c..a335f1c 100644
--- a/web/plugins/views/bi.py
+++ b/web/plugins/views/bi.py
@@ -80,6 +80,8 @@ def paint_bi_icons(row):
html.icon_button(avail_url, _("Analyse availability of this aggregation"), "availability")
if row["aggr_effective_state"]["in_downtime"]:
html.icon(_("This aggregation is currently in a scheduled downtime"), "downtime")
+ if row["aggr_effective_state"]["acknowledged"]:
+ html.icon(_("The critical problems that make this aggregation non-OK have been acknowledged"), "ack")
code = html.drain()
html.unplug()
return "buttons", code
Module: check_mk
Branch: master
Commit: 7075b91027a8a9be530ca9c6efe7b42f89d55895
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7075b91027a8a9…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Mar 17 17:10:47 2014 +0100
BI aggregations now also honor scheduled downtimes
A BI aggregate now also aggregates the additional information wether it is
in a scheduled downtime or not. Please refer to the updated <a href="checkmk_bi.html">documentation
about BI</a> for details.
---
.werks/714 | 10 ++++++
ChangeLog | 1 +
web/htdocs/bi.css | 9 ++++-
web/htdocs/bi.py | 71 ++++++++++++++++++++++++++++++-------
web/plugins/views/availability.py | 25 +++++++++----
web/plugins/views/bi.py | 4 ++-
6 files changed, 100 insertions(+), 20 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=7075b91027…
Module: check_mk
Branch: master
Commit: 3be1151f5520fa55725af6e7f25ff855328655f4
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3be1151f5520fa…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon Mar 17 16:05:07 2014 +0100
df: now able to monitor inodes
The df check is now able to monitor the number of remaining inodes.
In WATO you can configure the limits of the remaining inodes, either in
absolute or as percentage values.
---
.werks/732 | 10 +++++
ChangeLog | 3 +-
agents/check_mk_agent.linux | 6 +++
checkman/df | 6 +++
checks/df | 39 +++++++++++++++---
checks/df.include | 72 +++++++++++++++++++++++++++++-----
checks/esx_vsphere_datastores | 2 +-
web/plugins/wato/check_parameters.py | 21 ++++++++++
8 files changed, 141 insertions(+), 18 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=3be1151f55…