Skip to content
Permalink
Browse files

7440 Added Mattermost support in notification plugin

Mattermost is an Open Source alternative to Slack. It provides an
equivalent Web Hook API to Slack and thus can be used in the same way as
the current Slack notification plugin works.

FEED-3491

Change-Id: Icd9db1b8ec6cff34f4e6c444b2d9564a9f0799b7
  • Loading branch information...
Titan-C committed May 7, 2019
1 parent d4e7ae6 commit f05e3632b01d57eee02d3f11f96c33267a319194
Showing with 18 additions and 11 deletions.
  1. +10 −0 .werks/7440
  2. +7 −10 cmk/gui/plugins/wato/notifications.py
  3. +1 −1 notifications/slack
@@ -0,0 +1,10 @@
Title: Added Mattermost support in notification plugin
Level: 1
Component: notifications
Compatible: compat
Edition: cre
Version: 1.6.0i1
Date: 1557244621
Class: feature

Mattermost is an Open Source alternative to Slack. It provides an equivalent Web Hook API to Slack and thus can be used in the same way as the current Slack notification plugin works.
@@ -239,19 +239,16 @@ def spec(self):
elements=[
("webhook_url",
CascadingDropdown(
title=_("Slack Webhook-URL"),
title=_("Webhook-URL"),
help=
_("URL from Slack Webhook. Setup one " +
"<a href=\"https://my.slack.com/services/new/incoming-webhook/\" target=\"_blank\"> here </a>"
_("Webhook URL. Setup Slack Webhook " +
"<a href=\"https://my.slack.com/services/new/incoming-webhook/\" target=\"_blank\">here</a>"
"<br />For Mattermost follow the documentation "
"<a href=\"https://docs.mattermost.com/developer/webhooks-incoming.html\" target=\"_blank\">here</a>"
"<br />This URL can also be collected from the Password Store from Check_MK."
),
choices=[("webhook_url", _("Webhook URL"),
HTTPUrl(
size=80,
allow_empty=False,
regex="^https://hooks.slack.com/services/.+",
regex_error=_("The Webhook-URL must begin with "
"<tt>https://hooks.slack.com/services/</tt>"))),
choices=[("webhook_url", _("Webhook URL"), HTTPUrl(size=80,
allow_empty=False)),
("store", _("URL from password store"),
DropdownChoice(
sorted=True,
@@ -1,5 +1,5 @@
#!/usr/bin/env python
# Slack
# Slack or Mattermost
from cmk.notification_plugins.slack import slack_msg
from cmk.notification_plugins.utils import post_request

0 comments on commit f05e363

Please sign in to comment.
You can’t perform that action at this time.