Module: check_mk
Branch: master
Commit: 5bc2c7ea3c9520dd8400056cc498db8e34bb11d2
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5bc2c7ea3c9520…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Apr 17 10:04:45 2014 +0200
Force notification number to be at least one (e.g. for custom notifications)
---
modules/notify.py | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/modules/notify.py b/modules/notify.py
index 06da82f..2aa518d 100644
--- a/modules/notify.py
+++ b/modules/notify.py
@@ -203,11 +203,17 @@ def notify_notify(raw_context, analyse=False):
notify_log("Got raw notification context with %s variables" % len(raw_context))
# Add some further variable for the conveniance of the plugins
- complete_raw_context(raw_context)
if notification_logging >= 2:
notify_log("Raw notification context:\n"
- + "\n".join(["%s=%s" % v for v in sorted(raw_context.items())]))
+ + "\n".join([" %s=%s" % v for v in sorted(raw_context.items())]))
+
+ raw_keys = list(raw_context.keys())
+ complete_raw_context(raw_context)
+
+ if notification_logging >= 2:
+ notify_log("Computed variables:\n"
+ + "\n".join(sorted([" %s=%s" % (k, raw_context[k]) for k in raw_context if k not in raw_keys])))
# Spool notification to remote host, if this is enabled
if notification_spool_to:
@@ -1518,6 +1524,12 @@ def complete_raw_context(raw_context):
if not contact or contact == "check-mk-notify":
add_rulebased_macros(raw_context)
+ # For custom notifications the number is set to 0 by the core (Nagios and CMC). We force at least
+ # number 1 here, so that rules with conditions on numbers do not fail (the minimum is 1 here)
+ for what in [ "HOST", "SERVICE" ]:
+ key = what + "NOTIFICATIONNUMBER"
+ if key in raw_context and raw_context[key] == "0":
+ raw_context[key] = "1"
# Add the previous hard state. This is neccessary for notification rules that depend on certain transitions,
# like OK -> WARN (but not CRIT -> WARN). The CMC sends PREVIOUSHOSTHARDSTATE and PREVIOUSSERVICEHARDSTATE.
Module: check_mk
Branch: master
Commit: b8b4d19d191ca5ac55e0eef11b1c101dabfc14fa
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b8b4d19d191ca5…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Wed Apr 16 09:41:42 2014 +0200
Updated bug entries #0841, #0842, #0843
---
.bugs/841 | 8 ++++++++
.bugs/842 | 10 ++++++++++
.bugs/843 | 9 +++++++++
3 files changed, 27 insertions(+)
diff --git a/.bugs/841 b/.bugs/841
new file mode 100644
index 0000000..3bed1c3
--- /dev/null
+++ b/.bugs/841
@@ -0,0 +1,8 @@
+Title: View Editor: It's not possible to delete a view
+Component: multisite
+State: open
+Date: 2014-04-16 09:34:07
+Targetversion: 1.2.5i1
+Class: bug
+
+Currently it is not possible to delete a view in Multisite. I think this has to do with the new security features regarding to the CVE's
diff --git a/.bugs/842 b/.bugs/842
new file mode 100644
index 0000000..52d4d2e
--- /dev/null
+++ b/.bugs/842
@@ -0,0 +1,10 @@
+Title: HW/SW Inventory should not be appear on Clusters or some Special Agents
+Component: inv
+State: open
+Date: 2014-04-16 09:35:42
+Targetversion: 1.2.5i1
+Class: bug
+
+In Wato there is no option like PHYSICAL_HOSTS or CLUSTER_HOSTS so there should be a easy way to deactivate the HW/SW Inventory check using Wato for clusters.
+If you have a big enviroment it is not fine solution to click through a couple of folders to find all clusters an add a Cluster Tag.
+Same Problem with special agents like VMware ESX.
diff --git a/.bugs/843 b/.bugs/843
new file mode 100644
index 0000000..dd133dd
--- /dev/null
+++ b/.bugs/843
@@ -0,0 +1,9 @@
+Title: Wato service parametr icon
+Component: wato
+State: open
+Date: 2014-04-16 09:39:19
+Targetversion: 1.2.5i1
+Class: bug
+
+If you reenter the service view in wato and you have missing services, they allready have the icon with the link to the parameter information page. But
+the link only works after activating the new services.