Module: check_mk
Branch: master
Commit: 4347be5861356faabde4fb19bef3e133a54685a6
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4347be5861356f…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu May 8 12:02:29 2014 +0200
Notification plugins now configurable via WATO
Check_MK now has a new alternative API for notification script, which allows
them to be configured via WATO. The classical API provided the possibility of
a list of strings that was passed to the script as <tt>PARAMETER_1</tt>,
<tt>PARAMETER_2</tt>, etc. The new API passes arguments according
to keys in a configured dictionary, like <tt>PARAMETER_FROM</tt> and
<tt>PARAMETER_REPLY_TO</tt>.
Two notification scripts have been converted to use the new API:
<tt>mail</tt>
(sending HTML emails) and <tt>mkeventd</tt> (forwarding to the Event
Console).
The configuration of a notification script does only work with the new
<i>Rule Based Notifications</i> can be done at two places:
<ul>
<li>In new rulesets below <i>Host & Service Parameters</i>
→ <i>Monitoring Configuration</i> →
<i>Notifications</i></li>
<li>Right in a notification rule</li>
</ul>
Both configurations are being merged on a per-key basis. That way you
can e.g. setup a <tt>From:</tt> header for your outgoing emails via
a global rule, but select various different <tt>Reply-To:</tt> addresses
in different notification rules.
If a configuration key appears both in <i>Host & Service
Parameters</i> and
in a notification rule then the latter one has precedence.
---
.werks/968 | 33 +++
ChangeLog | 1 +
modules/check_mk.py | 1 +
modules/notify.py | 74 +++++--
notifications/mail | 408 +++++++++++++++++++++----------------
notifications/mkeventd | 14 +-
web/htdocs/wato.py | 137 ++++++++++---
web/plugins/wato/notifications.py | 119 +++++++++++
8 files changed, 565 insertions(+), 222 deletions(-)
Diff:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=4347be5861…