Module: check_mk
Branch: master
Commit: b4bb7681bd46babcefd6eb8d14fb853b5f338044
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b4bb7681bd46ba…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Apr 1 11:55:12 2013 +0200
notify: FIX: handle case where type HOST/SERVICE not correctly detected
---
ChangeLog | 1 +
modules/notify.py | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 0fd96f0..b405865 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -100,6 +100,7 @@
Notifications:
* FIX: fix event type for recoveries
* FIX: fix custom notifications on older nagios versions
+ * FIX: handle case where type HOST/SERVICE not correctly detected
Livestatus:
* FIX: memory leak when removing downtime / comment
diff --git a/modules/notify.py b/modules/notify.py
index 7d19662..a2d6f94 100644
--- a/modules/notify.py
+++ b/modules/notify.py
@@ -334,7 +334,7 @@ def do_notify(args):
context["OMD_ROOT"] = omd_root
context["OMD_SITE"] = os.getenv("OMD_SITE",
"")
- context["WHAT"] = "SERVICEDESC" in context and
"SERVICE" or "HOST"
+ context["WHAT"] = context.get("SERVICEDESC") and
"SERVICE" or "HOST"
context["MAIL_COMMAND"] = notification_mail_command
# Handle interactive calls