Module: check_mk
Branch: master
Commit: 9b9e72c3a966658d5a9ac9f1ee3dc06d3744ff30
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9b9e72c3a96665…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Oct 20 13:24:40 2017 +0200
Cleanup special case in notification logging: Use LOG core command for nagios too
Change-Id: I0c2a70a08cae904a47c8cdf59860f457dc9f03cc
---
cmk_base/notify.py | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/cmk_base/notify.py b/cmk_base/notify.py
index 95035de..dd7955b 100644
--- a/cmk_base/notify.py
+++ b/cmk_base/notify.py
@@ -1808,13 +1808,5 @@ def core_notification_log(plugin, plugin_context):
log_message = "%s NOTIFICATION: %s;%s;%s;%s;%s" % (
what, contact, spec, state, plugin or "plain email", output)
- if config.monitoring_core == "cmc":
- livestatus_send_command("LOG;" +
log_message.encode("utf-8"))
- else:
- # Nagios and friends do not support logging via an
- # external command. We write the files into a help file
- # in var/check_mk/notify. If the users likes he can
- # replace that file with a symbolic link to the nagios
- # log file. But note: Nagios logging might not atomic.
- file(notification_core_log, "a").write("[%d] %s\n" %
(time.time(), log_message.encode("utf-8")))
+ livestatus_send_command("LOG;" + log_message.encode("utf-8"))