Commit graph

45 commits

Author SHA1 Message Date
Nick Satterly
60fb52cba0 build(slack): bump version 5.5.1 -> 5.5.2 2020-12-15 23:14:24 +01:00
Nick Satterly
bc0de15765 Update READMEs 2020-11-20 22:39:32 +01:00
Matthieu Serrepuy
63f8827c8b
slack: Don't send recovery message if the previous_severity is in SLACK_SEVERITY_FILTER () 2020-11-19 22:50:05 +01:00
eli
862c47064a
add SLACK_CHANNEL_MAP for environment and severity mapping ()
* making ICON_EMOJI optional

* adding SLACK_CHANNEL_MAP

* fix payload dictionary access

* update default ICON_EMOJI in readme

* require pytest>=5.4.3

Co-authored-by: Nick Satterly <nfsatterly@gmail.com>
2020-06-18 16:58:35 +02:00
mdfischer
2d0bf01c98
SLACK_SEVERITY_FILTER allows pre-filtering of alerts sent to Slack solely by severity ()
* Adds configuration setting SLACK_SEVERITY_FILTER (list) to allow filtering of alerts to be forwarded to Slack based upon their severity.

* Fixes incorrect parsing of list from alertad.conf for SLACK_SEVERITY_FILTER

* Updates comment in README

* Fixes incorrect string formatting.

* Reverses the logic of SLACK_SEVERITY_FILTER to be more permissive, such that alerts with severity matching one listed will NOT be forwarded to Slack (i.e. Alerts with severity not listed in SLACK_SEVERITY_FILTER will pass through the filter).

Co-authored-by: Michael Fischer <michael@marinelabs.io>
2020-06-14 22:26:40 +02:00
Nick Satterly
b66f140b46
Update travis CI config and add tests () 2020-04-18 21:14:40 +02:00
Nick Satterly
4d0961a003
Run pylint in build pipeline ()
* Run pylint in build pipeline

* Only report on pylint errors and fix them
2020-02-19 22:45:42 +01:00
Matthieu Serrepuy
897f3f2de3 Add 2 new env variables/config to override slack channel per event or severity ()
Update documentation
2019-10-28 22:17:52 +01:00
Sam Hampton
595f7412f5 Per-message config in slack plugin ()
* Per-message config in slack plugin

* Slack plugin: remove erroneous space
2019-07-05 19:12:59 +02:00
fshaikh-eg
b3ae980300 Update alerta_slack.py ()
added try/catch block around the SLACK_CHANNEL_ENV_MAP
2019-04-23 10:53:13 +02:00
seasurfpete
2824fac5ea Added json.loads to SLACK_CHANNEL_ENV_MAP os.env loading to resolve issue () 2019-03-11 01:24:36 +01:00
kwesterfeld2
596b4cf8fa Fix alert payload formatting issue where template text could introduce newlines, which in turn ()
caused the json.loads() to fail.  The code now properly logs with a traceback any issues
with template formatting, and in DEBUG will print what its doing and what the template
processor spat out.
2018-09-25 16:34:33 +02:00
Gerben Meijer
76b1b35d99 Fix SLACK_TOKEN error on plugin init () 2018-09-18 14:53:19 +02:00
kwesterfeld2
c8013c139a Further work to allow customization of slack payload: ()
- Refactor template expansion logic to be used in several places
- Implement SLACK_PAYLOAD, which allows complete customization of the post payload,
  unlocking all Slack API features and providing Jinja2 templating
- The payload support reverts the need for the SLACK_ATTACHMENT_SIZE_MAP.
- Put back the default behavior with SLACK_ATTACHMENTS
- Update doc to show how to use SLACK_PAYLOAD
- Add example use including button to launch alert console
2018-09-07 19:17:15 +02:00
kwesterfeld2
52629caed7 Port jinja2 template from hipchat plugin to slack: ()
- Use SLACK_SUMMARY_FMT to use a templatized alert text
 - Allow the slack message attachment sizes to be tuned from short True|False for readability
2018-09-05 16:38:07 +02:00
Nick Satterly
a809a53ede Bump slack plugin version 2018-08-27 20:35:09 +02:00
kwesterfeld2
8c5ff5eab9 Add support for Slack "Apps" API instead of Webhook API, which allows the use ()
of "channel" when posting to slack.  As of some time ago, the Webhook API stopped supporting setting
channel, and instead solely relied on the associated channel established during app install
2018-08-23 22:50:28 +02:00
Nick Satterly
c6eee79a49 Fix slack severity config 2017-09-17 19:42:44 +01:00
Nick Satterly
6c15db4c51 Update plugins for Release 5.0 2017-09-17 16:22:46 +01:00
Matteo Cerutti
92689748e6 added support for sending slack message upon ack
added ability to override severity mapping
2017-09-04 11:16:24 +01:00
Damien Guihal
bc4eddf69d Simplify code 2017-06-19 14:08:14 +02:00
Damien Guihal
6526b09b53 Add support for per environment channel 2017-05-31 14:15:56 +02:00
Christian Blunden
3238441935 increment slack plugin version id 2016-12-13 16:03:48 +00:00
Christian Blunden
2bbd105362 use dashboard url instead of missing ALERTA_UI_URL 2016-12-13 15:59:05 +00:00
Nick Satterly
ee97227cd7 Update Slack plugin 2016-12-03 20:19:36 +00:00
Aivars Šterns
230a596e25 update readme 2016-11-08 14:08:48 +02:00
Aivars Šterns
4c829ebd82 add proper configuration for emoji, username and ui url 2016-11-08 14:05:42 +02:00
Aivars Šterns
90bc2c1c9f add slack channel empty default, empty means use from incoming hooks configuration 2016-11-08 14:01:28 +02:00
Aivars Šterns
8f96f19036 Add configuration variables for ALERTAUI, ICON_EMOJI and USERNAME 2016-11-08 12:17:47 +02:00
Карамышев Степан
36802e5b98 More colors in slack messages 2016-10-26 17:57:48 +03:00
Nick Satterly
80c6ebcb51 Fix slack plugin filename 2016-09-29 20:57:51 +01:00
Nick Satterly
53fc1b2360 Set useful logger name for plugins 2016-09-15 10:18:03 +01:00
Nick Satterly
b2b53352a1 Standardise setup.py for all plugins 2016-09-14 14:23:41 +01:00
Nick Satterly
4c7744e435 Fix alerta plugin package namespace clashes 2016-09-14 11:57:44 +01:00
Minh Danh
c474d3dd63 Bump slack plugin version to 0.1.4 2016-05-27 13:52:21 +07:00
Minh Danh
3a92ef26f9 Fix empty service field when posting to slack 2016-05-27 13:50:56 +07:00
Minh Danh
b11d7cd1a4 Bump slack plugin version to 0.1.3 2016-05-26 17:13:43 +07:00
Minh Danh
9ed2b62fb0 Add SLACK_CHANNEL and ALERTA_UI_URL vars 2016-05-26 16:59:09 +07:00
Nick Satterly
c09064e0b0 Add image to slack readme 2016-05-20 12:31:07 +01:00
Nick Satterly
a79d4ea8f6 Fix slack attachment config var and add README 2016-05-20 12:17:16 +01:00
Nick Satterly
aa892047db Bump plugin versions 2016-03-07 23:02:06 +10:00
Nick Satterly
792899fecf Add prometheus plugin and update other plugins 2016-03-07 22:25:58 +10:00
Nick Satterly
e3edc875f6 Use env vars or server config for plugin settings 2015-12-16 09:59:38 +00:00
Nick Satterly
86439befc1 add alert service to slack 2014-12-17 08:48:37 +00:00
Nick Satterly
1a54a1931a add slack plug-in 2014-12-17 00:14:03 +00:00